Михаил Капелько 5 maanden geleden
bovenliggende
commit
a019d1bfa6
3 gewijzigde bestanden met toevoegingen van 34 en 1 verwijderingen
  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 Bestand weergeven

@@ -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 Bestand weergeven

@@ -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 Bestand weergeven

@@ -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):


Laden…
Annuleren
Opslaan