mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-29 22:33:46 +01:00
Add minimal formspec prepend
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]
|
||||||
|
1
mods/HUD/mcl_formspec_prepend/depends.txt
Normal file
1
mods/HUD/mcl_formspec_prepend/depends.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
mcl_init
|
3
mods/HUD/mcl_formspec_prepend/init.lua
Normal file
3
mods/HUD/mcl_formspec_prepend/init.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
minetest.register_on_joinplayer(function(player)
|
||||||
|
player:set_formspec_prepend(mcl_vars.gui_nonbg)
|
||||||
|
end)
|
1
mods/HUD/mcl_formspec_prepend/mod.conf
Normal file
1
mods/HUD/mcl_formspec_prepend/mod.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
name = mcl_formspec_prepend
|
Loading…
Reference in New Issue
Block a user