[lightsoff/wip/gtkview] Added param to choose clutter vs gtk



commit 55c2eee72b9ba0f4fa8287482901894a422594da
Author: Robert Roth <robert roth off gmail com>
Date:   Sun Jul 15 23:43:05 2018 +0300

    Added param to choose clutter vs gtk

 src/lightsoff-window.vala | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/lightsoff-window.vala b/src/lightsoff-window.vala
index 89d0c8b..741e6e5 100644
--- a/src/lightsoff-window.vala
+++ b/src/lightsoff-window.vala
@@ -65,7 +65,7 @@ public class LightsoffWindow : ApplicationWindow
         return aspect_frame;
     }
 
-    public LightsoffWindow ()
+    public LightsoffWindow (bool gtk = false)
     {
         settings = new GLib.Settings ("org.gnome.lightsoff");
 
@@ -75,7 +75,10 @@ public class LightsoffWindow : ApplicationWindow
         int level = settings.get_int ("level");
         level_changed_cb (level);
 
-        this.add (build_gtk_game_container (level, out game_view));
+        if (gtk)
+            this.add (build_gtk_game_container (level, out game_view));
+        else
+            this.add (build_clutter_game_container (level, out game_view));
 
         this.key_release_event.connect (key_release_event_cb);
         game_view.level_changed.connect (level_changed_cb);


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