[gnome-games/gsoc-seed-games] [lightsoff] Lots of various bits of cleanup



commit a451e132e15877f6e0b9f9a338216cabb60c4231
Author: Tim Horton <hortont424 gmail com>
Date:   Fri Jun 26 23:17:39 2009 -0400

    [lightsoff] Lots of various bits of cleanup

 lightsoff/Game.js |   11 +++++------
 lightsoff/LED.js  |    7 ++-----
 2 files changed, 7 insertions(+), 11 deletions(-)
---
diff --git a/lightsoff/Game.js b/lightsoff/Game.js
index ca2d31d..bb3d5c8 100644
--- a/lightsoff/Game.js
+++ b/lightsoff/Game.js
@@ -113,7 +113,6 @@ GameView = new GType({
 		
 		var theme_changed = function()
 		{
-			// TODO: only animate if theme changes!
 			timeline = new Clutter.Timeline({duration: 1500});
 			
 			create_next_board();
@@ -173,9 +172,7 @@ GameView = new GType({
 		}
 		
 		// Implementation
-		
-		// TODO: wrong::
-		
+				
 		score_view.set_width(5);
 		score_changed(Settings.score);
 		
@@ -192,13 +189,15 @@ GameView = new GType({
 		score_view.set_position(board_view.width / 2, board_view.height + 18);
 		this.add_actor(score_view);
 		
+		// TODO: The -10 term in the next two Y locations makes me sad.
+		
 		left_arrow.set_position((score_view.x - score_view.anchor_x) / 2,
-		                        score_view.y + (score_view.height / 2));
+		                        score_view.y + (score_view.height / 2) - 10);
 		this.add_actor(left_arrow);
 		
 		right_arrow.flip_arrow();
 		right_arrow.set_position(board_view.width - left_arrow.x,
-		                         score_view.y + (score_view.height / 2));
+		                         score_view.y + (score_view.height / 2) - 10);
 		this.add_actor(right_arrow);
 		
 		left_arrow.signal.button_release_event.connect(swap_board, {direction: -1});
diff --git a/lightsoff/LED.js b/lightsoff/LED.js
index e6e6d0c..0951f25 100644
--- a/lightsoff/LED.js
+++ b/lightsoff/LED.js
@@ -73,7 +73,7 @@ LEDDigit = new GType({
 			cr.fill();
 		}
 		
-		// Creates and arranges segments of the LEDDigit, lit based on the
+		// Draws each segment of the LEDDigit, lit based on the
 		// represented digit.
 		var draw_leds = function(group)
 		{
@@ -81,6 +81,7 @@ LEDDigit = new GType({
 			context = self.create();
 			cr = new cairo.Context.steal(context);
 		
+			// TODO: I can't find the cairo enums...
 			cr.operator = 0;
 			cr.paint();
 			cr.operator = 2;
@@ -129,7 +130,6 @@ LEDView = new GType({
 		var inner_y_margin = -1;
 		
 		back = new Clutter.Clone({source: Settings.theme.led_back});
-		//front = new Clutter.Clone({source: Settings.theme.led_front});
 		
 		// Public
 		
@@ -142,7 +142,6 @@ LEDView = new GType({
 			digits = [];
 			
 			this.add_actor(back);
-			//this.add_actor(front);
 			
 			for(var i = 0; i < width; i++)
 			{
@@ -154,7 +153,6 @@ LEDView = new GType({
 			}
 			
 			back.lower_bottom();
-			//this.raise_child(front, null);
 		}
 		
 		// Set the value represented by the LEDView, and update its
@@ -178,7 +176,6 @@ LEDView = new GType({
 		// Implementation
 		
 		this.add_actor(back);
-		//this.add_actor(front);
 	}
 });
 



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