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
|
|
@ -128,11 +128,13 @@ function on_hud_open()
|
|||
hud.default_hand_controller = update_hand
|
||||
|
||||
local name = "misc/moon"
|
||||
gui.create_frame(name, name, {128, 128})
|
||||
local frame = gui.create_frame(name, name, {128, 128})
|
||||
frame:add("<button>Hello, World</button>")
|
||||
frame.color = {255, 0, 0, 255}
|
||||
|
||||
local document = Document.new(name)
|
||||
document.root:add("<button>Hello, World</button>")
|
||||
document.root.color = {255, 0, 0, 255}
|
||||
input.add_callback('key:y', function ()
|
||||
gui.set_active_frame(name)
|
||||
end)
|
||||
end
|
||||
|
||||
function on_hud_render()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue