From a019d1bfa659a955416b22425cba8ec1d5467f97 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: Tue, 25 Jun 2024 22:50:29 +0300 Subject: [PATCH] d --- v5/desktop_Platform.py | 3 ++- v5/gui.py | 31 +++++++++++++++++++++++++++++++ v5/memory_Context.py | 1 + 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/v5/desktop_Platform.py b/v5/desktop_Platform.py index 9940411..e20374b 100644 --- a/v5/desktop_Platform.py +++ b/v5/desktop_Platform.py @@ -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 diff --git a/v5/gui.py b/v5/gui.py index 35c9e24..0caa118 100644 --- a/v5/gui.py +++ b/v5/gui.py @@ -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: diff --git a/v5/memory_Context.py b/v5/memory_Context.py index e79b148..3fffb2b 100644 --- a/v5/memory_Context.py +++ b/v5/memory_Context.py @@ -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):