feat(P.3.5): use engine.window.size() instead of hardcoded 1280x720
This commit is contained in:
3
init.lua
3
init.lua
@@ -8,7 +8,7 @@ local state = STATE_LIST
|
|||||||
|
|
||||||
local modules = {} -- [{id, version, name, rect={x,y,w,h}}]
|
local modules = {} -- [{id, version, name, rect={x,y,w,h}}]
|
||||||
local quit_buttons = {} -- {yes = rect, no = rect}
|
local quit_buttons = {} -- {yes = rect, no = rect}
|
||||||
local screen_w, screen_h = 1280, 720 -- matched ENGINE_WINDOW_DEFAULT_WIDTH/HEIGHT
|
local screen_w, screen_h -- queried in init() via engine.window.size() (P.3.5)
|
||||||
|
|
||||||
-- CI-conditional self-exit (matches spine-prototype's pattern).
|
-- CI-conditional self-exit (matches spine-prototype's pattern).
|
||||||
-- Interactive runs (no SPOREL_CI=1) loop until ESC or quit-confirm.
|
-- Interactive runs (no SPOREL_CI=1) loop until ESC or quit-confirm.
|
||||||
@@ -36,6 +36,7 @@ local COLOR_MODAL = 0x303030FF
|
|||||||
local hit = engine.spatial.aabb_contains_point
|
local hit = engine.spatial.aabb_contains_point
|
||||||
|
|
||||||
function init(ctx)
|
function init(ctx)
|
||||||
|
screen_w, screen_h = engine.window.size()
|
||||||
local list = engine.module.list()
|
local list = engine.module.list()
|
||||||
local y = 80
|
local y = 80
|
||||||
for i, m in ipairs(list) do
|
for i, m in ipairs(list) do
|
||||||
|
|||||||
Reference in New Issue
Block a user