Remove 'notabs' pages (get_pages handles it now)
This commit is contained in:
parent
f1a55b23aa
commit
8bb2c60044
@ -40,7 +40,7 @@ minetest.register_craftitem(
|
||||
title = data:get_string("book:title")
|
||||
end
|
||||
|
||||
local form = rp_formspec.get_page("rp_formspec:notabs")
|
||||
local form = rp_formspec.get_page("rp_formspec:default")
|
||||
form = form .. "field[0.5,1.25;8,0;title;"..F(S("Title:"))..";"..F(title).."]"
|
||||
form = form .. "textarea[0.5,1.75;8,6.75;text;"..F(S("Contents:"))..";"..F(text).."]"
|
||||
form = form .. rp_formspec.button_exit(2.75, 7.75, 3, 1, "write", S("Write"))
|
||||
|
@ -63,7 +63,7 @@ minetest.register_node(
|
||||
end,
|
||||
})
|
||||
|
||||
local form_chest = rp_formspec.get_page("rp_formspec:notabs_2part")
|
||||
local form_chest = rp_formspec.get_page("rp_formspec:2part")
|
||||
form_chest = form_chest .. "list[current_name;main;0.25,0.25;8,4;]"
|
||||
form_chest = form_chest .. "listring[current_name;main]"
|
||||
form_chest = form_chest .. rp_formspec.get_itemslot_bg(0.25, 0.25, 8, 4)
|
||||
@ -113,7 +113,7 @@ minetest.register_node(
|
||||
end,
|
||||
})
|
||||
|
||||
local form_bookshelf = rp_formspec.get_page("rp_formspec:notabs_2part")
|
||||
local form_bookshelf = rp_formspec.get_page("rp_formspec: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 .. rp_formspec.get_hotbar_itemslot_bg(0.25, 4.75, 8, 1)
|
||||
|
@ -6,7 +6,7 @@ local S = minetest.get_translator("rp_default")
|
||||
local F = minetest.formspec_escape
|
||||
|
||||
function default.furnace_active_formspec(percent, item_percent)
|
||||
local form = rp_formspec.get_page("rp_formspec:notabs_2part")
|
||||
local form = rp_formspec.get_page("rp_formspec:2part")
|
||||
form = form .. "list[current_player;main;0.25,4.75;8,4;]"
|
||||
form = form .. rp_formspec.get_hotbar_itemslot_bg(0.25, 4.75, 8, 1)
|
||||
form = form .. rp_formspec.get_itemslot_bg(0.25, 5.75, 8, 3)
|
||||
@ -35,7 +35,7 @@ function default.furnace_active_formspec(percent, item_percent)
|
||||
return form
|
||||
end
|
||||
|
||||
local form_furnace = rp_formspec.get_page("rp_formspec:notabs_2part")
|
||||
local form_furnace = rp_formspec.get_page("rp_formspec:2part")
|
||||
form_furnace = form_furnace .. "list[current_player;main;0.25,4.75;8,4;]"
|
||||
form_furnace = form_furnace .. rp_formspec.get_hotbar_itemslot_bg(0.25, 4.75, 8, 1)
|
||||
form_furnace = form_furnace .. rp_formspec.get_itemslot_bg(0.25, 5.75, 8, 3)
|
||||
|
@ -159,17 +159,10 @@ pages to build the player inventory.
|
||||
|
||||
This mod offers a few built-in pages for mods to use:
|
||||
|
||||
* `"rp_formspec:default"`: A simple empty formspec frame, about the size of an inventory. With tabs.
|
||||
* `"rp_formspec:notabs"`: A simple empty formspec frame, about the size of an inventory. Without tabs.
|
||||
* `"rp_formspec:2part"`: A page with two parts, separated by a horizontal line in the middle. With tabs.
|
||||
* `"rp_formspec:notabs_2part"`: A page with two parts, separated by a horizontal line in the middle. Without tabs.
|
||||
* `"rp_formspec:default"`: A simple empty formspec frame
|
||||
* `"rp_formspec:2part"`: An empty frame with two parts, separated by a horizontal line in the middle
|
||||
* `"rp_formspec:field"`: A small page containing a single text input field and a button “Write” (the text field ID is `"text"`)
|
||||
|
||||
“Tabs” here means whether the tabs for the player inventory pages like crafting, armor, achievements, etc.
|
||||
are shown. Using a page with tabs is only recommended for the player inventory. Outside the
|
||||
player inventory, these tabs are buggy.
|
||||
|
||||
|
||||
|
||||
### `rp_formspec.register_page(name, form)`
|
||||
|
||||
|
@ -331,10 +331,6 @@ local form_2part = form_default .. "background[0,0;8.5,4.5;ui_formspec_bg_short.
|
||||
rp_formspec.register_page("rp_formspec:default", form_default)
|
||||
-- 2-part frame
|
||||
rp_formspec.register_page("rp_formspec:2part", form_2part)
|
||||
-- 1-part frame (legacy). TODO: remove
|
||||
rp_formspec.register_page("rp_formspec:notabs", form_default)
|
||||
-- 2-part frame (legacy). TODO: remove
|
||||
rp_formspec.register_page("rp_formspec:notabs_2part", form_2part)
|
||||
|
||||
-- Simple text input field
|
||||
local form_default_field = ""
|
||||
|
@ -183,7 +183,7 @@ end
|
||||
|
||||
local form_trading = ""
|
||||
|
||||
form_trading = form_trading .. rp_formspec.get_page("rp_formspec:notabs_2part")
|
||||
form_trading = form_trading .. rp_formspec.get_page("rp_formspec:2part")
|
||||
|
||||
form_trading = form_trading .. "list[current_player;main;0.25,4.75;8,4;]"
|
||||
form_trading = form_trading .. rp_formspec.get_hotbar_itemslot_bg(0.25, 4.75, 8, 1)
|
||||
|
@ -18,7 +18,7 @@ jewels.registered_jewel_parents = {}
|
||||
|
||||
-- Formspec
|
||||
|
||||
local form_bench = rp_formspec.get_page("rp_formspec:notabs_2part")
|
||||
local form_bench = rp_formspec.get_page("rp_formspec:2part")
|
||||
|
||||
form_bench = form_bench .. "list[current_name;main;2.25,1.75;1,1;]"
|
||||
form_bench = form_bench .. "listring[current_name;main]"
|
||||
|
@ -246,7 +246,7 @@ minetest.register_node(
|
||||
|
||||
if not locks.is_locked(meta, player) then
|
||||
local np = pos.x .. "," .. pos.y .. "," .. pos.z
|
||||
local form = rp_formspec.get_page("rp_formspec:notabs_2part")
|
||||
local form = rp_formspec.get_page("rp_formspec:2part")
|
||||
form = form .. "list[nodemeta:" .. np .. ";main;0.25,0.25;8,4;]"
|
||||
form = form .. "listring[nodemeta:" .. np .. ";main]"
|
||||
form = form .. rp_formspec.get_itemslot_bg(0.25, 0.25, 8, 4)
|
||||
|
Loading…
x
Reference in New Issue
Block a user