Михаил Капелько 1 week ago
parent
commit
a019d1bfa6
3 changed files with 34 additions and 1 deletions
  1. +2
    -1
      v5/desktop_Platform.py
  2. +31
    -0
      v5/gui.py
  3. +1
    -0
      v5/memory_Context.py

+ 2
- 1
v5/desktop_Platform.py View File

@@ -6,7 +6,8 @@ class desktop_Platform:
self.cell = 0
self.sprites = arcade.SpriteList()
self.textures = []
self.title = ""
self.windowAntialiasing = False
self.windowBackgroundColor = arcade.color.WHITE
self.windowHeight = 0
self.windowTitle = ""
self.windowWidth = 0

+ 31
- 0
v5/gui.py View File

@@ -2,6 +2,37 @@ from memory_Context import *
from gui_TextureDescription import *
from llm import *

# Generate tile position
#
# Conditions:
# 1.
@llm_by_value
def gui_generateTilePositions(
c: memory_Context
) -> memory_Context:
if (
c.recentField == "windowHeight" or
c.recentField == "windowWidth"
):
tds: list[gui_TextureDescription] = []
for id in range(0, c.tileImageCount):
td = gui_createTextureDescription()
td.fileName = c.tileImage
td.height = c.tileImageHeight
td.width = c.tileImageWidth
td.x = id * c.tileImageWidth
td.y = 0
tds.append(td)
#}
c.textureDescriptions = tds
c.recentField = "textureDescriptions"
return c
#}

c.recentField = "none"
return c
#}

# Generate textures descriptions
#
# Conditions:


+ 1
- 0
v5/memory_Context.py View File

@@ -22,6 +22,7 @@ class memory_Context:
self.tileImageCount = 0
self.tileImageHeight = 0
self.tileImageWidth = 0
self.tilePositions = []
self.victory = False

def field(self, fieldName):


Loading…
Cancel
Save