From bc17aa6ade5bae222f3763fd48e72ba83aaf6b04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Fri, 28 Jun 2024 23:01:09 +0300 Subject: [PATCH] d --- v5/desktop.py | 14 ++++++++++++++ v5/desktop_Platform.py | 1 + v5/main-gui.py | 1 + 3 files changed, 16 insertions(+) diff --git a/v5/desktop.py b/v5/desktop.py index 817bae9..394269a 100644 --- a/v5/desktop.py +++ b/v5/desktop.py @@ -34,3 +34,17 @@ def desktop_createDeselectedTiles(p): tile.top = pos[1] #} #} + +def desktop_createSelectedTiles(p): + for (id, pos) in enumerate(p.c.tilePositions): + tile = arcade.Sprite() + p.selectedTiles.append(tile) + p.sprites.append(tile) + + tile.guid = id + tile.texture = p.textures[2] + # Position. + tile.left = pos[0] + tile.top = pos[1] + # Invisible by default. + tile.visible = False diff --git a/v5/desktop_Platform.py b/v5/desktop_Platform.py index 4d7b035..62b76e9 100644 --- a/v5/desktop_Platform.py +++ b/v5/desktop_Platform.py @@ -4,5 +4,6 @@ class desktop_Platform: def __init__(self): self.c = None self.deselectedTiles = [] + self.selectedTiles = [] self.sprites = arcade.SpriteList() self.textures = [] diff --git a/v5/main-gui.py b/v5/main-gui.py index 76c84c6..5fcd3ba 100644 --- a/v5/main-gui.py +++ b/v5/main-gui.py @@ -103,6 +103,7 @@ ctrl.set("windowTitle", "OGS Memory") desktop_loadTextures(p) desktop_createDeselectedTiles(p) +desktop_createSelectedTiles(p) wnd = desktop_Window(p) arcade.run()