@@ -3,6 +3,7 @@ import arcade | |||||
CELL = 25 | CELL = 25 | ||||
HEIGHT = 600 | HEIGHT = 600 | ||||
WIDTH = 900 | WIDTH = 900 | ||||
TITLE = "OGS Memory" | |||||
class Context: | class Context: | ||||
def __init__(self): | def __init__(self): | ||||
@@ -39,7 +40,7 @@ class Context: | |||||
class Window(arcade.Window): | class Window(arcade.Window): | ||||
def __init__(self): | def __init__(self): | ||||
super().__init__(WIDTH, HEIGHT, "OGS Memory") | |||||
super().__init__(WIDTH, HEIGHT, TITLE) | |||||
arcade.set_background_color(arcade.color.WHITE) | arcade.set_background_color(arcade.color.WHITE) | ||||
self.all_sprites = arcade.SpriteList() | self.all_sprites = arcade.SpriteList() | ||||
self.c = Context() | self.c = Context() | ||||
@@ -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 | |||||
#} |
@@ -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 |
@@ -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 |
@@ -3,12 +3,14 @@ from cli import * | |||||
from cli_test import * | from cli_test import * | ||||
from ctx import * | from ctx import * | ||||
from ctx_test2 import * | from ctx_test2 import * | ||||
from desktop import * | |||||
from desktop_Platform import * | |||||
from desktop_Window import * | |||||
from gui import * | from gui import * | ||||
from gui_test import * | from gui_test import * | ||||
from llm_test import * | from llm_test import * | ||||
from llm_test_Python import * | from llm_test_Python import * | ||||
from memory_test import * | from memory_test import * | ||||
from Window import * | |||||
import sys | import sys | ||||
print(ctx_test_Controller_executeFunctions_registerFunction_set()) | print(ctx_test_Controller_executeFunctions_registerFunction_set()) | ||||
@@ -81,5 +83,8 @@ ctrl.set("tileImageCount", 3) | |||||
ctrl.set("tileImageHeight", 100) | ctrl.set("tileImageHeight", 100) | ||||
ctrl.set("tileImageWidth", 75) | ctrl.set("tileImageWidth", 75) | ||||
wnd = Window() | |||||
p = desktop_Platform() | |||||
desktop_configureFixedWindow(p) | |||||
wnd = desktop_Window(p) | |||||
arcade.run() | arcade.run() |