forked from MineClone5/MineClone5
Add minimal formspec prepend
This commit is contained in:
parent
a84f7935fa
commit
3edf880301
|
@ -1,12 +1,16 @@
|
||||||
-- Some global variables (don't overwrite them!)
|
-- Some global variables (don't overwrite them!)
|
||||||
mcl_vars = {}
|
mcl_vars = {}
|
||||||
|
|
||||||
--- GUI / inventory menu colors
|
--- GUI / inventory menu settings
|
||||||
mcl_vars.gui_slots = "listcolors[#9990;#FFF7;#FFF0;#000;#FFF]"
|
mcl_vars.gui_slots = "listcolors[#9990;#FFF7;#FFF0;#000;#FFF]"
|
||||||
|
-- nonbg is added as formspec prepend in mcl_formspec_prepend
|
||||||
|
mcl_vars.gui_nonbg = mcl_vars.gui_slots
|
||||||
|
|
||||||
|
-- Background stuff must be manually added by mods (no formspec prepend)
|
||||||
mcl_vars.gui_bg = "bgcolor[#080808BB;true]"
|
mcl_vars.gui_bg = "bgcolor[#080808BB;true]"
|
||||||
mcl_vars.gui_bg_img = ""
|
mcl_vars.gui_bg_img = ""
|
||||||
|
|
||||||
mcl_vars.inventory_header = mcl_vars.gui_slots .. mcl_vars.gui_bg
|
mcl_vars.inventory_header = mcl_vars.gui_bg
|
||||||
|
|
||||||
-- Mapgen variables
|
-- Mapgen variables
|
||||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||||
|
|
|
@ -315,8 +315,7 @@ function craftguide:get_formspec(player_name, is_fuel)
|
||||||
data.pagemax = max(1, ceil(#data.items / ipp))
|
data.pagemax = max(1, ceil(#data.items / ipp))
|
||||||
|
|
||||||
local formspec = "size["..data.iX..","..(iY+3)..".6;]"..
|
local formspec = "size["..data.iX..","..(iY+3)..".6;]"..
|
||||||
mcl_vars.gui_slots ..
|
mcl_vars.inventory_header..
|
||||||
mcl_vars.gui_bg ..
|
|
||||||
[=[background[1,1;1,1;craftguide_bg.png;true]
|
[=[background[1,1;1,1;craftguide_bg.png;true]
|
||||||
button[2.4,0.21;0.8,0.5;search;?]
|
button[2.4,0.21;0.8,0.5;search;?]
|
||||||
button[3.05,0.21;0.8,0.5;clear;X]
|
button[3.05,0.21;0.8,0.5;clear;X]
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
mcl_init
|
|
@ -0,0 +1,3 @@
|
||||||
|
minetest.register_on_joinplayer(function(player)
|
||||||
|
player:set_formspec_prepend(mcl_vars.gui_nonbg)
|
||||||
|
end)
|
|
@ -0,0 +1 @@
|
||||||
|
name = mcl_formspec_prepend
|
Loading…
Reference in New Issue