temporary fix
This commit is contained in:
parent
d7f3bf9c7c
commit
9bd6b39952
@ -1,6 +1,7 @@
|
|||||||
local menubg
|
local menubg
|
||||||
|
|
||||||
function on_menu_clear()
|
function on_menu_clear()
|
||||||
|
print("menu clear")
|
||||||
if menubg then
|
if menubg then
|
||||||
menubg:destruct()
|
menubg:destruct()
|
||||||
menubg = nil
|
menubg = nil
|
||||||
@ -8,20 +9,24 @@ function on_menu_clear()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function on_menu_setup()
|
function on_menu_setup()
|
||||||
local controller = {}
|
-- //TODO:
|
||||||
function controller.resize_menu_bg()
|
time.post_runnable(function()
|
||||||
local w, h = unpack(gui.get_viewport())
|
local controller = {}
|
||||||
if menubg then
|
function controller.resize_menu_bg()
|
||||||
menubg.region = {0, math.floor(h / 48), math.floor(w / 48), 0}
|
local w, h = unpack(gui.get_viewport())
|
||||||
menubg.pos = {0, 0}
|
if menubg then
|
||||||
|
menubg.region = {0, math.floor(h / 48), math.floor(w / 48), 0}
|
||||||
|
menubg.pos = {0, 0}
|
||||||
|
end
|
||||||
|
return w, h
|
||||||
end
|
end
|
||||||
return w, h
|
gui.root.root:add(
|
||||||
end
|
|
||||||
gui.root.root:add(
|
|
||||||
"<image id='menubg' src='gui/menubg' size-func='DATA.resize_menu_bg' "..
|
"<image id='menubg' src='gui/menubg' size-func='DATA.resize_menu_bg' "..
|
||||||
"z-index='-1' interactive='true'/>", controller)
|
"z-index='-1' interactive='true'/>", controller)
|
||||||
menubg = gui.root.menubg
|
menubg = gui.root.menubg
|
||||||
controller.resize_menu_bg()
|
controller.resize_menu_bg()
|
||||||
|
end)
|
||||||
|
|
||||||
menu.page = "main"
|
menu.page = "main"
|
||||||
menu.visible = true
|
menu.visible = true
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user