Михаил Капелько 5 months ago
parent
commit
bc17aa6ade
3 changed files with 16 additions and 0 deletions
  1. +14
    -0
      v5/desktop.py
  2. +1
    -0
      v5/desktop_Platform.py
  3. +1
    -0
      v5/main-gui.py

+ 14
- 0
v5/desktop.py View File

@@ -34,3 +34,17 @@ def desktop_createDeselectedTiles(p):
tile.top = pos[1] 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

+ 1
- 0
v5/desktop_Platform.py View File

@@ -4,5 +4,6 @@ class desktop_Platform:
def __init__(self): def __init__(self):
self.c = None self.c = None
self.deselectedTiles = [] self.deselectedTiles = []
self.selectedTiles = []
self.sprites = arcade.SpriteList() self.sprites = arcade.SpriteList()
self.textures = [] self.textures = []

+ 1
- 0
v5/main-gui.py View File

@@ -103,6 +103,7 @@ ctrl.set("windowTitle", "OGS Memory")


desktop_loadTextures(p) desktop_loadTextures(p)
desktop_createDeselectedTiles(p) desktop_createDeselectedTiles(p)
desktop_createSelectedTiles(p)


wnd = desktop_Window(p) wnd = desktop_Window(p)
arcade.run() arcade.run()

Loading…
Cancel
Save