[seed] Same Seed: Don't remove tiles until button_release_event, not button_press_event.



commit 2b9c64b79ac697ee61de99620bf0010166a274a0
Author: Tim Horton <hortont svn gnome org>
Date:   Thu May 7 22:09:21 2009 -0400

    Same Seed: Don't remove tiles until button_release_event, not button_press_event.
---
 examples/same-seed/board.js |    4 ++--
 examples/same-seed/light.js |    1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/examples/same-seed/board.js b/examples/same-seed/board.js
index 4746bcc..18d6165 100644
--- a/examples/same-seed/board.js
+++ b/examples/same-seed/board.js
@@ -257,7 +257,7 @@ Board = new GType({
 					var new_y = (tiles_h - y - 1) * tile_size + offset;
 					
 					if(!li.get_closed() && ((new_x != li.x) ||
-												 (new_y != li.y)))
+										    (new_y != li.y)))
 					{
 						timeline = li.animate_to(new_x, new_y, timeline);
 						
@@ -327,7 +327,7 @@ Board = new GType({
 					li.set_position(x * tile_size + offset,
 									(tiles_h - y - 1) * tile_size + offset);
 					this.add_actor(li);
-					li.on.signal.button_press_event.connect(this.remove_region);
+					li.on.signal.button_release_event.connect(this.remove_region);
 				
 					lights[x][y] = li;
 					all_lights.push(lights[x][y]);
diff --git a/examples/same-seed/light.js b/examples/same-seed/light.js
index dea7ef9..bc2d38d 100644
--- a/examples/same-seed/light.js
+++ b/examples/same-seed/light.js
@@ -62,7 +62,6 @@ Light = new GType({
 				y: [GObject.TYPE_INT, new_y]
 			});
 			
-			//Seed.print(this.anim);
 			this.anim.timeline.start();
 			
 			GLib.main_context_iteration();



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