d
This commit is contained in:
BIN
py/__pycache__/desktop_Platform.cpython-312.pyc
Normal file
BIN
py/__pycache__/desktop_Platform.cpython-312.pyc
Normal file
Binary file not shown.
BIN
py/__pycache__/desktop_Window.cpython-312.pyc
Normal file
BIN
py/__pycache__/desktop_Window.cpython-312.pyc
Normal file
Binary file not shown.
BIN
py/__pycache__/ht_Context.cpython-312.pyc
Normal file
BIN
py/__pycache__/ht_Context.cpython-312.pyc
Normal file
Binary file not shown.
9
py/desktop_Platform.py
Normal file
9
py/desktop_Platform.py
Normal file
@@ -0,0 +1,9 @@
|
||||
import arcade
|
||||
|
||||
class desktop_Platform:
|
||||
def __init__(self):
|
||||
self.c = None
|
||||
self.ctrl = None
|
||||
self.mousePosition = []
|
||||
self.dbgSprites = arcade.SpriteList()
|
||||
self.dbgTextures = []
|
||||
23
py/desktop_Window.py
Normal file
23
py/desktop_Window.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import arcade
|
||||
|
||||
class desktop_Window(arcade.Window):
|
||||
def __init__(self, p):
|
||||
super().__init__(
|
||||
p.c.windowWidth,
|
||||
p.c.windowHeight,
|
||||
p.c.windowTitle,
|
||||
)
|
||||
self.antialiasing = p.c.windowAntialiasing
|
||||
self.background_color = arcade.color_from_hex_string(p.c.windowBackgroundColor)
|
||||
self.p = p
|
||||
|
||||
def on_draw(self):
|
||||
arcade.start_render()
|
||||
self.p.dbgSprites.draw()
|
||||
|
||||
def on_mouse_press(self, x, y, button, key_modifiers):
|
||||
print("mouse press:", x, y)
|
||||
pass
|
||||
|
||||
def on_update(self, delta):
|
||||
pass
|
||||
17
py/ht_Context.py
Normal file
17
py/ht_Context.py
Normal file
@@ -0,0 +1,17 @@
|
||||
class ht_Context:
|
||||
def __init__(self):
|
||||
self.didLaunch = False
|
||||
self.recentField = "none"
|
||||
self.windowBackgroundColor = "#000000"
|
||||
self.windowHeight = 0
|
||||
self.windowTitle = ""
|
||||
self.windowWidth = 0
|
||||
|
||||
def field(self, fieldName):
|
||||
return getattr(self, fieldName)
|
||||
|
||||
def setField(self, fieldName, value):
|
||||
setattr(self, fieldName, value)
|
||||
|
||||
def ht_createContext():
|
||||
return ht_Context()
|
||||
Reference in New Issue
Block a user