|
|
@@ -0,0 +1,47 @@ |
|
|
|
import os |
|
|
|
import sys |
|
|
|
|
|
|
|
SCRIPT_DIR = os.path.dirname(os.path.realpath(sys.argv[0])) |
|
|
|
|
|
|
|
sys.path.append(f"{SCRIPT_DIR}/../cross-language-dialect/ctx") |
|
|
|
sys.path.append(f"{SCRIPT_DIR}/../cross-language-dialect/lib") |
|
|
|
sys.path.append(f"{SCRIPT_DIR}/py") |
|
|
|
|
|
|
|
import arcade |
|
|
|
from cld import * |
|
|
|
from ctx import * |
|
|
|
from desktop_Platform import * |
|
|
|
from desktop_Window import * |
|
|
|
from ht_Context import * |
|
|
|
|
|
|
|
ctrl = ctx_Controller(ht_createContext()) |
|
|
|
ctrl.registerFunctions([ |
|
|
|
]) |
|
|
|
|
|
|
|
def printDbg(c): |
|
|
|
print(f"Dbg key/value: '{c.recentField}'/'{c.field(c.recentField)}'") |
|
|
|
ctrl.registerCallback(printDbg) |
|
|
|
|
|
|
|
p = desktop_Platform() |
|
|
|
p.ctrl = ctrl |
|
|
|
|
|
|
|
# Bind platform to context changes. |
|
|
|
def process(c): |
|
|
|
# Copy context to platform. |
|
|
|
p.c = c |
|
|
|
# Perform context dependent calls of desktop functions. |
|
|
|
# Similar to context functions, but no platform is returned. |
|
|
|
### desktop_deselectMismatchedTiles(p) |
|
|
|
ctrl.registerCallback(process) |
|
|
|
|
|
|
|
ctrl.set("windowWidth", 900) |
|
|
|
ctrl.set("windowHeight", 600) |
|
|
|
ctrl.set("windowAntialiasing", False) |
|
|
|
ctrl.set("windowBackgroundColor", "#ffffff") |
|
|
|
ctrl.set("windowTitle", "Прототип: Отель") |
|
|
|
|
|
|
|
#desktop_loadTextures(p) |
|
|
|
|
|
|
|
wnd = desktop_Window(p) |
|
|
|
ctrl.set("didLaunch", True) |
|
|
|
arcade.run() |