diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2014-06-12 20:38:48 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2014-06-16 15:26:39 (GMT) |
commit | 2304399994e1f29ad87e8df1bbc4c7fd8810a9c4 (patch) | |
tree | 2b32093f4dae18430ac48239516af79bc0180129 | |
parent | 022d935cb2e95a975d49ab6ec7626b4d63ce6e86 (diff) |
Show elased time as min:secs if time > 1 minute - Fixes #3467
-rw-r--r-- | game.py | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -627,9 +627,16 @@ class FinishWindow(Gtk.Window): 0, row, 1, 1) time = Gtk.Label() - time.set_markup('<span font="%d" color="%s">%3.2f</span>' % + if player.elapsed > 60: + minutes = int(player.elapsed / 60) + seconds = player.elapsed - minutes * 60 + elapsed = "%d:%2.2f" % (minutes, seconds) + else: + elapsed = "%3.2f" % player.elapsed + + time.set_markup('<span font="%d" color="%s">%s</span>' % (text_font_size, player.fg.get_html(), - player.elapsed)) + elapsed)) players_grid.attach(time, 1, row, 1, 1) name = Gtk.Label() |