Major default formspec style update
- Uses formspec_prepend to set e.g. button style - Make all formspecs use the MCL2 style consistently
|
@ -410,8 +410,10 @@ function awards.getFormspec(name, to, sid)
|
|||
if perc > 1 then
|
||||
perc = 1
|
||||
end
|
||||
formspec = formspec .. "background[0,4.80;" .. barwidth ..",0.25;awards_progress_gray.png;false]"
|
||||
formspec = formspec .. "background[0,4.80;" .. (barwidth * perc) ..",0.25;awards_progress_green.png;false]"
|
||||
formspec = formspec .. "background[0,4.80;" .. barwidth ..",0.3;awards_progress_gray.png;false]"
|
||||
if perc > 0 then
|
||||
formspec = formspec .. "background[0,4.80;" .. (barwidth * perc) ..",0.3;awards_progress_green.png;false]"
|
||||
end
|
||||
if label then
|
||||
formspec = formspec .. "label[1.75,4.63;" .. minetest.formspec_escape(label) .. "]"
|
||||
end
|
||||
|
@ -423,7 +425,8 @@ function awards.getFormspec(name, to, sid)
|
|||
end
|
||||
|
||||
-- Create list box
|
||||
formspec = formspec .. "textlist[4.75,0;6,5;awards;"
|
||||
formspec = formspec ..
|
||||
"textlist[4.75,0;6,5;awards;"
|
||||
local first = true
|
||||
for _,award in pairs(listofawards) do
|
||||
local def = awards.def[award.name]
|
||||
|
|
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 71 B |
Before Width: | Height: | Size: 177 B After Width: | Height: | Size: 71 B |
After Width: | Height: | Size: 171 B |
After Width: | Height: | Size: 171 B |
After Width: | Height: | Size: 86 B |
After Width: | Height: | Size: 86 B |
|
@ -1,3 +1,3 @@
|
|||
minetest.register_on_joinplayer(function(player)
|
||||
player:set_formspec_prepend(mcl_vars.gui_nonbg)
|
||||
player:set_formspec_prepend(mcl_vars.gui_nonbg .. mcl_vars.gui_bg_color .. mcl_vars.gui_bg_img)
|
||||
end)
|
||||
|
|
|
@ -348,6 +348,7 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz
|
|||
"tooltip[__mcl_skins;"..F(S("Select player skin")).."]"..
|
||||
-- achievements button
|
||||
"image_button[9,4;1,1;mcl_achievements_button.png;__mcl_achievements;]"..
|
||||
--"style_type[image_button;border=;bgimg=;bgimg_pressed=]"..
|
||||
"tooltip[__mcl_achievements;"..F(S("Achievements")).."]"
|
||||
|
||||
-- For shortcuts
|
||||
|
@ -387,6 +388,7 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz
|
|||
bg_img = "crafting_creative_inactive.png"
|
||||
end
|
||||
return
|
||||
"style["..this_tab..";border=false;bgimg=;bgimg_pressed=]"..
|
||||
"item_image_button[" .. boffset[this_tab] ..";1,1;"..tab_icon[this_tab]..";"..this_tab..";]"..
|
||||
"image[" .. offset[this_tab] .. ";1.5,1.44;" .. bg_img .. hoch[this_tab].. "]" ..
|
||||
"image[" .. boffset[this_tab] .. ";1,1;crafting_creative_marker.png]"
|
||||
|
@ -396,8 +398,9 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz
|
|||
caption = "label[0,1.2;"..F(minetest.colorize("#313131", filtername[name])).."]"
|
||||
end
|
||||
|
||||
formspec = "size[10,9.3]style_type[item_image_button;border=false]"..
|
||||
mcl_vars.inventory_header..
|
||||
formspec = "size[10,9.3]"..
|
||||
"no_prepend[]"..
|
||||
mcl_vars.gui_nonbg..mcl_vars.gui_bg_color..
|
||||
"background[-0.19,-0.25;10.5,9.87;"..inv_bg.."]"..
|
||||
"label[-5,-5;"..name.."]"..
|
||||
tab(name, "blocks") ..
|
||||
|
|
|
@ -90,7 +90,6 @@ local function set_inventory(player, armor_change_only)
|
|||
|
||||
local form = "size[9,8.75]"..
|
||||
"background[-0.19,-0.25;9.41,9.49;crafting_formspec_bg.png]"..
|
||||
mcl_vars.inventory_header..
|
||||
player_preview..
|
||||
--armor
|
||||
"list[detached:"..player_name.."_armor;armor;0,0;1,1;1]"..
|
||||
|
|
Before Width: | Height: | Size: 215 B After Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 629 B |
Before Width: | Height: | Size: 226 B After Width: | Height: | Size: 181 B |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 613 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 861 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.5 KiB |
BIN
mods/HUD/mcl_inventory/textures/mcl_inventory_button9.png
Normal file
After Width: | Height: | Size: 86 B |
After Width: | Height: | Size: 86 B |
Before Width: | Height: | Size: 881 B After Width: | Height: | Size: 104 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 96 B |