diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2014-06-12 20:38:48 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2014-06-12 20:38:48 (GMT) |
commit | 2becc6a8464340afbbe6b0a2acd6309de913cafd (patch) | |
tree | 9f6e31791a8eb71752c1ed7149bd015efdc710fc | |
parent | cf028e9bbb2d8baad7e1192274252b173e077639 (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() |