Something like:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_gui({
objects: {
{GUI_LABEL,name="label1",x=5,y=23,width=5,height=10,text="Label"}
{GUI_BUTTON,name="button1",x=15,y=23,width=5,height=4,text="Button",action_click = (function(gui)
minetest.gui:get_gui("gui1").label1.text = "Hello World!"
end)
{GUI_BUTTON,name="button2",x=25,y=23,width=5,height=4,text="Exit",action_click = (function(gui)
minetest.gui:hide("gui1")
end)
{GUI_SPRITE,name="bg",x=0,y=0,image="background.png"}
}
name: "gui1"
})
minetest.register_on_punchnode(function(node, puncher)
if node.name == "hw:hello_world" then
minetest.gui:show("gui1")
end
end)