[gnome-nibbles/wip/vala] worm: Fix bug with scoreboard not showing more than 6 lives



commit 0e8eedab8cec30f3cf1407c63e5f5906f985234f
Author: Iulian Radu <iulian radu67 gmail com>
Date:   Wed Sep 16 13:57:53 2015 +0300

    worm: Fix bug with scoreboard not showing more than 6 lives

 src/gnome-nibbles.vala |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/gnome-nibbles.vala b/src/gnome-nibbles.vala
index 69719ac..6ddba90 100644
--- a/src/gnome-nibbles.vala
+++ b/src/gnome-nibbles.vala
@@ -853,8 +853,10 @@ private class PlayerScoreBox : Gtk.Box
         for (int i = 0; i < Worm.MAX_LIVES; i++)
         {
             var life = new Gtk.Image.from_pixbuf (life_pixbuf);
-            if (i < Worm.STARTING_LIVES)
-                life.show ();
+            life.show ();
+
+            if (i >= Worm.STARTING_LIVES)
+                life.set_opacity (0);
 
             life_images.add (life);
             lives_grid.attach (life, i % 6, i / 6);


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