mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
update gui.create_frame return value
This commit is contained in:
parent
8468ab184d
commit
8ee2edef5c
5 changed files with 37 additions and 21 deletions
|
|
@ -234,6 +234,14 @@ menu = _MENU
|
|||
gui.root = _GUI_ROOT
|
||||
gui.main_frame_id = "core:main"
|
||||
|
||||
local __gui_create_frame = gui.create_frame
|
||||
function gui.create_frame(id, output, size)
|
||||
__gui_create_frame(id, output, size)
|
||||
|
||||
local document = Document.new(id)
|
||||
return document.root, document
|
||||
end
|
||||
|
||||
do
|
||||
local status, err = pcall(function()
|
||||
local default_styles = toml.parse(file.read(
|
||||
|
|
@ -440,6 +448,8 @@ function __vc_on_hud_open()
|
|||
end
|
||||
elseif hud.is_inventory_open() then
|
||||
hud.close_inventory()
|
||||
elseif gui.get_active_frame() then
|
||||
gui.set_active_frame("")
|
||||
else
|
||||
hud.pause()
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue