[lightsoff/wip/gtkview] Clutter game view takes boardview size into account



commit ef4cc172585606e27c43c776b08e3cde241bec66
Author: Robert Roth <robert roth off gmail com>
Date:   Thu Jul 19 23:07:23 2018 +0300

    Clutter game view takes boardview size into account

 src/board-view.vala        | 2 +-
 src/game-view-clutter.vala | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/board-view.vala b/src/board-view.vala
index cc85db4..73d80e4 100644
--- a/src/board-view.vala
+++ b/src/board-view.vala
@@ -9,7 +9,7 @@
  */
 public interface BoardView: GLib.Object {
 
-    protected new const int size = 5;
+    public new const int size = 5;
 
     public abstract int get_moves ();
     public abstract PuzzleGenerator get_puzzle_generator ();
diff --git a/src/game-view-clutter.vala b/src/game-view-clutter.vala
index 7359e8b..5e1760d 100644
--- a/src/game-view-clutter.vala
+++ b/src/game-view-clutter.vala
@@ -83,8 +83,8 @@ public class ClutterGameView : Clutter.Group, GameView
         board_view.playable = true;
         board_group.add_child (board_view);
 
-        var real_board_width = 5 * off_texture.width + 4;
-        var real_board_height = 5 * off_texture.height + 4;
+        var real_board_width = BoardView.size * off_texture.width + 4;
+        var real_board_height = BoardView.size * off_texture.height + 4;
         set_size (real_board_width, real_board_height);
 
         key_cursor_view.set_pivot_point (0.5f, 0.5f);


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