[gnome-nibbles] game: Improve transition to the 'Level Completed' screen



commit e8c2dc2ccdc209ad76229687dd41db1fa088b9e2
Author: Iulian Radu <iulian radu67 gmail com>
Date:   Wed Sep 16 15:30:10 2015 +0300

    game: Improve transition to the 'Level Completed' screen

 src/gnome-nibbles.vala |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/gnome-nibbles.vala b/src/gnome-nibbles.vala
index 6ddba90..b3765d6 100644
--- a/src/gnome-nibbles.vala
+++ b/src/gnome-nibbles.vala
@@ -648,14 +648,18 @@ public class Nibbles : Gtk.Application
 
             restart_game_cb ();
         });
-        button.show ();
 
         overlay.add_overlay (label);
         overlay.add_overlay (button);
 
-        button.grab_focus ();
-
         overlay.show ();
+
+        Timeout.add (500, () => {
+            button.show ();
+            button.grab_focus ();
+
+            return Source.REMOVE;
+        });
     }
 
     private void game_over_cb (int score, long last_score)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]