-- temp.lua g_commandMap = -- name of the command map (not used) { -- The default input mode is special. Its commands are always evaluated in any input mode unless the current -- input mode overrides them. default = { -- key = { "type", "command" }, Esc = { "Event", "QuitGame" }, F1 = { "Script", "Go" }, Space = { "Event", "FireRequest" }, Q = { "Event", "SecondRequest" }, }, -- This is a normal input mode. run = { -- key = { "type", "command" }, Left = { "Script", "GoAain" }, }, }; function InputEventCallback(event) if (event.down) then print(event.command); end end InitCommandMap(g_commandMap); SetInputMode("run"); g_rootWindow = { x = 0, y = 0, w = 1280, h = 800, type = "Window", children = { testWindow = { x = 100, y = 100, w = 256, h = 256, z = 10, type = "TexturedWindow", texture = 0x35c51733, children = { titleBar = { x = 10, y = 20, w = 64, h = 64, z = 11, type = "TestWindow", texture = 0x35c51733, }, }, }, testButton = { x = 125, y = 125, w = 64, h = 64, z = 5, type = "Button", upTexture = 0x35c51733, --downTexture = 0x35c51733, command = "print('Test Button')", }, } }; --[[ g_test = { x = 100, y = 100, w = 64, h = 64, type = "Window", texture = 0x35c51733, }; --]] CreateRootWindow(g_rootWindow); --PushWidget("test", g_test);