Major default formspec style update

- Uses formspec_prepend to set e.g. button style
- Make all formspecs use the MCL2 style consistently
This commit is contained in:
Wuzzy 2020-03-10 05:01:49 +01:00
parent 0e867e5247
commit 03ad3cca29
49 changed files with 38 additions and 32 deletions

View file

@ -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]