[swell-foop] Fix cursor bug.



commit b124eb232d165bfe2ca8fd19a5579e6dc526bd7d
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Fri May 22 19:29:16 2020 +0200

    Fix cursor bug.
    
    Commit f9dcfa1319 broke the cursor.

 src/game-view.vala | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/game-view.vala b/src/game-view.vala
index 5fca4ff..d106db0 100644
--- a/src/game-view.vala
+++ b/src/game-view.vala
@@ -358,18 +358,18 @@ private class GameGroup : Clutter.Group
             cursor_active = true;
 
         // highlight and unhighlight
-        TileActor? cursor = find_tile_at_position (cursor_x, cursor_y);
+        TileActor? cursor_tile = find_tile_at_position (cursor_x, cursor_y);
 
-        if ((highlighted != null && cursor == null)
-         || (highlighted == null && cursor != null)
-         || (highlighted != null && cursor != null && ((!) highlighted).tile.color != ((!) 
cursor).tile.color))
+        if ((highlighted != null && cursor_tile == null)
+         || (highlighted == null && cursor_tile != null)
+         || (highlighted != null && cursor_tile != null && ((!) highlighted).tile.color != ((!) 
cursor_tile).tile.color))
         {
             // opacity_for_connected_tiles() handles correctly a null TileActor
             opacity_for_connected_tiles (highlighted, Opacity.HALF);
-            opacity_for_connected_tiles (cursor,      Opacity.FULL);
+            opacity_for_connected_tiles (cursor_tile, Opacity.FULL);
         }
 
-        highlighted = cursor;
+        highlighted = cursor_tile;
 
         // update visual cursor position
         float xx, yy;


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