Михаил Капелько 1 week ago
parent
commit
223bea168d
5 changed files with 51 additions and 3 deletions
  1. +2
    -1
      v5/Window.py
  2. +10
    -0
      v5/desktop.py
  3. +10
    -0
      v5/desktop_Platform.py
  4. +22
    -0
      v5/desktop_Window.py
  5. +7
    -2
      v5/main-gui.py

+ 2
- 1
v5/Window.py View File

@@ -3,6 +3,7 @@ import arcade
CELL = 25
HEIGHT = 600
WIDTH = 900
TITLE = "OGS Memory"

class Context:
def __init__(self):
@@ -39,7 +40,7 @@ class Context:

class Window(arcade.Window):
def __init__(self):
super().__init__(WIDTH, HEIGHT, "OGS Memory")
super().__init__(WIDTH, HEIGHT, TITLE)
arcade.set_background_color(arcade.color.WHITE)
self.all_sprites = arcade.SpriteList()
self.c = Context()


+ 10
- 0
v5/desktop.py View File

@@ -0,0 +1,10 @@
from desktop_Platform import *

# Configure window parameters
def desktop_configureFixedWindow(p):
p.cell = 25
p.windowAntialiasing = False
p.windowHeight = 600
p.windowTitle = "OGS Memory"
p.windowWidth = 900
#}

+ 10
- 0
v5/desktop_Platform.py View File

@@ -0,0 +1,10 @@
import arcade

class desktop_Platform:
def __init__(self):
self.cell = 0
self.sprites = arcade.SpriteList()
self.title = ""
self.windowBackgroundColor = arcade.color.WHITE
self.windowHeight = 0
self.windowWidth = 0

+ 22
- 0
v5/desktop_Window.py View File

@@ -0,0 +1,22 @@
import arcade

class desktop_Window(arcade.Window):
def __init__(self, p):
super().__init__(
p.windowWidth,
p.windowHeight,
p.windowTitle,
)
self.antialiasing = p.windowAntialiasing
arcade.set_background_color(p.windowBackgroundColor)
self.p = p

def on_draw(self):
arcade.start_render()
self.p.sprites.draw()

def on_mouse_press(self, x, y, button, key_modifiers):
print("click", x, y)

def on_update(self, delta):
pass

+ 7
- 2
v5/main-gui.py View File

@@ -3,12 +3,14 @@ from cli import *
from cli_test import *
from ctx import *
from ctx_test2 import *
from desktop import *
from desktop_Platform import *
from desktop_Window import *
from gui import *
from gui_test import *
from llm_test import *
from llm_test_Python import *
from memory_test import *
from Window import *
import sys

print(ctx_test_Controller_executeFunctions_registerFunction_set())
@@ -81,5 +83,8 @@ ctrl.set("tileImageCount", 3)
ctrl.set("tileImageHeight", 100)
ctrl.set("tileImageWidth", 75)

wnd = Window()
p = desktop_Platform()
desktop_configureFixedWindow(p)

wnd = desktop_Window(p)
arcade.run()

Loading…
Cancel
Save