[seed] Quiiick fixes to make Same Seed run again. However, there's an annotation missing in Clutter, so you
- From: Tim Horton <hortont src gnome org>
- To: svn-commits-list gnome org
- Subject: [seed] Quiiick fixes to make Same Seed run again. However, there's an annotation missing in Clutter, so you
- Date: Wed, 15 Apr 2009 01:12:07 -0400 (EDT)
commit 5cddaef1692519895f6d22c79d21ee5cd319a324
Author: Tim Horton <hortont hortont com>
Date: Wed Apr 15 01:11:24 2009 -0400
Quiiick fixes to make Same Seed run again. However, there's an annotation missing in Clutter, so you'll have to wait some time to be able to run it yourself.
---
examples/same-seed/board.js | 4 +-
examples/same-seed/main.js | 50 +++++++++++++++++++++++++-----------------
2 files changed, 32 insertions(+), 22 deletions(-)
diff --git a/examples/same-seed/board.js b/examples/same-seed/board.js
index a799f70..4746bcc 100644
--- a/examples/same-seed/board.js
+++ b/examples/same-seed/board.js
@@ -13,7 +13,7 @@ Board = new GType({
{
animating = false;
- var x = {}, y = {};
+ /*var x = {}, y = {};
window.window.get_pointer(x, y, null);
var picked = stage.get_actor_at_pos(x.value, y.value);
@@ -31,7 +31,7 @@ Board = new GType({
oldpicked = picked;
light_lights_from(picked);
- }
+ }*/
return false;
}
diff --git a/examples/same-seed/main.js b/examples/same-seed/main.js
index 0ca71f6..2176202 100755
--- a/examples/same-seed/main.js
+++ b/examples/same-seed/main.js
@@ -10,15 +10,19 @@ var offset = tile_size/2;
var max_colors = 4;
var fly_score = true;
-Seed.import_namespace("Gtk");
-Seed.import_namespace("Clutter", "0.9");
-Seed.import_namespace("GtkClutter", "0.9");
-Seed.import_namespace("GdkPixbuf");
-Seed.import_namespace("GConf");
-Seed.import_namespace("GLib");
-Seed.import_namespace("Pango");
-
-GtkClutter.init(null, null);
+imports.gi.versions.Clutter = "0.9";
+imports.gi.versions.GtkClutter = "0.9";
+
+Gtk = imports.gi.Gtk;
+Clutter = imports.gi.Clutter;
+GtkClutter = imports.gi.GtkClutter;
+GdkPixbuf = imports.gi.GdkPixbuf;
+GConf = imports.gi.GConf;
+GLib = imports.gi.GLib;
+Pango = imports.gi.Pango;
+GObject = imports.gi.GObject;
+
+Clutter.init(null, null);
GConf.init(null, null);
Seed.include("light.js");
@@ -28,14 +32,18 @@ Seed.include("score.js");
var score = 0;
var timelines = [];
-var gb = new Gtk.Builder();
-gb.add_from_file("same-seed.ui");
+//var gb = new Gtk.Builder();
+//gb.add_from_file("same-seed.ui");
-var window = gb.get_object("main_window");
-var clutter = gb.get_object("clutter");
-var stage = clutter.get_stage();
+//var window = new Gtk.Window
-window.signal.hide.connect(function () { Gtk.main_quit(); });
+var stage = new Clutter.Stage;
+
+//var window = gb.get_object("main_window");
+//var clutter = gb.get_object("clutter");
+//var stage = clutter.get_stage();
+
+//window.signal.hide.connect(function () { Gtk.main_quit(); });
stage.color = {alpha: 0};
stage.set_size((tiles_w * tile_size),(tiles_h * tile_size));
@@ -43,11 +51,13 @@ stage.set_size((tiles_w * tile_size),(tiles_h * tile_size));
var board = new Board();
stage.add_actor(board);
-gb.get_object("new_game_item").signal.activate.connect(function () { board.new_game(); });
-gb.get_object("quit_item").signal.activate.connect(function () { Gtk.main_quit(); });
+//gb.get_object("new_game_item").signal.activate.connect(function () { board.new_game(); });
+//gb.get_object("quit_item").signal.activate.connect(function () { Gtk.main_quit(); });
-clutter.set_size_request(stage.width, stage.height);
-window.show_all();
+//clutter.set_size_request(stage.width, stage.height);
+//window.show_all();
+stage.show_all();
-Gtk.main();
+//Gtk.main();
+Clutter.main();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]