Skip to content

Commit a4e2198

Browse files
sapiersapier
sapier
authored and
sapier
committedMar 5, 2014
Replace pause and message menu by formspec ones
1 parent 062de11 commit a4e2198

14 files changed

+273
-711
lines changed
 

Diff for: ‎builtin/mainmenu.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ function update_menu()
176176

177177
-- handle errors
178178
if gamedata.errormessage ~= nil then
179-
formspec = "size[12,5.2]" ..
179+
formspec = "size[12,5.2,true]" ..
180180
"textarea[1,2;10,2;;ERROR: " ..
181181
engine.formspec_escape(gamedata.errormessage) ..
182182
";]"..
@@ -365,7 +365,7 @@ end
365365

366366
function tabbuilder.gettab()
367367
local tsize = tabbuilder.tabsizes[tabbuilder.current_tab] or {width=12, height=5.2}
368-
local retval = "size[" .. tsize.width .. "," .. tsize.height .. "]"
368+
local retval = "size[" .. tsize.width .. "," .. tsize.height .. ",true]"
369369

370370
if tabbuilder.show_buttons then
371371
retval = retval .. tabbuilder.tab_header()

Diff for: ‎builtin/modmgr.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ function modmgr.dialog_configure_world()
422422
local mod = filterlist.get_list(modmgr.modlist)[modmgr.world_config_selected_mod]
423423

424424
local retval =
425-
"size[11,6.5]" ..
425+
"size[11,6.5,true]" ..
426426
"label[0.5,-0.25;" .. fgettext("World:") .. "]" ..
427427
"label[1.75,-0.25;" .. worldspec.name .. "]"
428428

Diff for: ‎builtin/modstore.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ end
9898
-- @function [parent=#modstore] getsuccessfuldialog
9999
function modstore.getsuccessfuldialog()
100100
local retval = ""
101-
retval = retval .. "size[6,2]"
101+
retval = retval .. "size[6,2,true]"
102102
if modstore.lastmodentry ~= nil then
103103
retval = retval .. "label[0,0.25;" .. fgettext("Successfully installed:") .. "]"
104104
retval = retval .. "label[3,0.25;" .. modstore.lastmodentry.moddetails.title .. "]"
@@ -152,7 +152,7 @@ end
152152
--------------------------------------------------------------------------------
153153
-- @function [parent=#modstore] tabheader
154154
function modstore.tabheader(tabname)
155-
local retval = "size[12,10.25]"
155+
local retval = "size[12,10.25,true]"
156156
retval = retval .. "tabheader[-0.3,-0.99;modstore_tab;" ..
157157
"Unsorted,Search;" ..
158158
modstore.nametoindex(tabname) .. ";true;false]" ..

Diff for: ‎doc/lua_api.txt

+7-6
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ Example stuff:
849849

850850
local meta = minetest.get_meta(pos)
851851
meta:set_string("formspec",
852-
"invsize[8,9;]"..
852+
"size[8,9]"..
853853
"list[context;main;0,0;8,4;]"..
854854
"list[current_player;main;0,5;8,4;]")
855855
meta:set_string("infotext", "Chest");
@@ -861,7 +861,7 @@ meta:from_table({
861861
main = {[1] = "default:dirt", [2] = "", [3] = "", [4] = "", [5] = "", [6] = "", [7] = "", [8] = "", [9] = "", [10] = "", [11] = "", [12] = "", [13] = "", [14] = "default:cobble", [15] = "", [16] = "", [17] = "", [18] = "", [19] = "", [20] = "default:cobble", [21] = "", [22] = "", [23] = "", [24] = "", [25] = "", [26] = "", [27] = "", [28] = "", [29] = "", [30] = "", [31] = "", [32] = ""}
862862
},
863863
fields = {
864-
formspec = "invsize[8,9;]list[context;main;0,0;8,4;]list[current_player;main;0,5;8,4;]",
864+
formspec = "size[8,9]list[context;main;0,0;8,4;]list[current_player;main;0,5;8,4;]",
865865
infotext = "Chest"
866866
}
867867
})
@@ -876,26 +876,27 @@ examples.
876876

877877
Examples:
878878
- Chest:
879-
invsize[8,9;]
879+
size[8,9]
880880
list[context;main;0,0;8,4;]
881881
list[current_player;main;0,5;8,4;]
882882
- Furnace:
883-
invsize[8,9;]
883+
size[8,9]
884884
list[context;fuel;2,3;1,1;]
885885
list[context;src;2,1;1,1;]
886886
list[context;dst;5,1;2,2;]
887887
list[current_player;main;0,5;8,4;]
888888
- Minecraft-like player inventory
889-
invsize[8,7.5;]
889+
size[8,7.5]
890890
image[1,0.6;1,2;player.png]
891891
list[current_player;main;0,3.5;8,4;]
892892
list[current_player;craft;3,0;3,3;]
893893
list[current_player;craftpreview;7,1;1,1;]
894894

895895
Elements:
896896

897-
size[<W>,<H>]
897+
size[<W>,<H>,<fixed_size>]
898898
^ Define the size of the menu in inventory slots
899+
^ fixed_size true/false (optional)
899900
^ deprecated: invsize[<W>,<H>;]
900901

901902
list[<inventory location>;<list name>;<X>,<Y>;<W>,<H>;]

Diff for: ‎src/CMakeLists.txt

-2
Original file line numberDiff line numberDiff line change
@@ -424,11 +424,9 @@ set(minetest_SRCS
424424
chat.cpp
425425
hud.cpp
426426
guiKeyChangeMenu.cpp
427-
guiMessageMenu.cpp
428427
guiTextInputMenu.cpp
429428
guiFormSpecMenu.cpp
430429
guiTable.cpp
431-
guiPauseMenu.cpp
432430
guiPasswordChange.cpp
433431
guiVolumeChange.cpp
434432
guiDeathScreen.cpp

0 commit comments

Comments
 (0)
Please sign in to comment.