Move bookshelf formspec code to container.lua
This commit is contained in:
parent
0ce781bab3
commit
b60e11c150
@ -107,4 +107,15 @@ minetest.register_node(
|
||||
end,
|
||||
})
|
||||
|
||||
local form_bookshelf = default.ui.get_page("default:2part")
|
||||
form_bookshelf = form_bookshelf .. "list[current_player;main;0.25,4.75;8,4;]"
|
||||
form_bookshelf = form_bookshelf .. "listring[current_player;main]"
|
||||
form_bookshelf = form_bookshelf .. default.ui.get_hotbar_itemslot_bg(0.25, 4.75, 8, 1)
|
||||
form_bookshelf = form_bookshelf .. default.ui.get_itemslot_bg(0.25, 5.75, 8, 3)
|
||||
|
||||
form_bookshelf = form_bookshelf .. "list[current_name;main;2.25,1.25;4,2;]"
|
||||
form_bookshelf = form_bookshelf .. "listring[current_name;main]"
|
||||
form_bookshelf = form_bookshelf .. default.ui.get_itemslot_bg(2.25, 1.25, 4, 2)
|
||||
default.ui.register_page("default:bookshelf", form_bookshelf)
|
||||
|
||||
default.log("container", "loaded")
|
||||
|
@ -332,17 +332,6 @@ form_default_field = form_default_field .. default.ui.button_exit(2.75, 3, 3, 1,
|
||||
form_default_field = form_default_field .. "field[1,1.75;7,0;text;;${text}]"
|
||||
default.ui.register_page("default:field", form_default_field)
|
||||
|
||||
local form_bookshelf = default.ui.get_page("default:2part")
|
||||
form_bookshelf = form_bookshelf .. "list[current_player;main;0.25,4.75;8,4;]"
|
||||
form_bookshelf = form_bookshelf .. "listring[current_player;main]"
|
||||
form_bookshelf = form_bookshelf .. default.ui.get_hotbar_itemslot_bg(0.25, 4.75, 8, 1)
|
||||
form_bookshelf = form_bookshelf .. default.ui.get_itemslot_bg(0.25, 5.75, 8, 3)
|
||||
|
||||
form_bookshelf = form_bookshelf .. "list[current_name;main;2.25,1.25;4,2;]"
|
||||
form_bookshelf = form_bookshelf .. "listring[current_name;main]"
|
||||
form_bookshelf = form_bookshelf .. default.ui.get_itemslot_bg(2.25, 1.25, 4, 2)
|
||||
default.ui.register_page("default:bookshelf", form_bookshelf)
|
||||
|
||||
function default.ui.receive_fields(player, form_name, fields)
|
||||
local name = player:get_player_name()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user