forked from VoxeLibre/VoxeLibre
[WIP] rename style variables.
This commit is contained in:
parent
ad232fbf66
commit
f09db9098c
|
@ -11,8 +11,8 @@ mcl_formspec.padding = 0.375
|
|||
--------------------------------------------------------------------------------
|
||||
mcl_formspec.label_color = "#313131"
|
||||
mcl_formspec.label_size = tonumber(minetest.settings:get("mcl_label_font_size")) or 24
|
||||
mcl_formspec.style_label = string.format("style_type[label;font_size=%f]", mcl_formspec.label_size)
|
||||
mcl_formspec.style_label_reset = "style_type[label;font=;font_size=;noclip=]"
|
||||
mcl_formspec.label_style = string.format("style_type[label;font_size=%f]", mcl_formspec.label_size)
|
||||
mcl_formspec.label_style_reset = "style_type[label;font=;font_size=;noclip=]"
|
||||
|
||||
function mcl_formspec.get_itemslot_bg(x, y, w, h)
|
||||
local out = ""
|
||||
|
@ -56,8 +56,7 @@ function mcl_formspec.itemslot_unit(n, border, spacing, factor)
|
|||
end
|
||||
mcl_formspec.itemslot_iu = mcl_formspec.itemslot_unit() -- itemslot unit
|
||||
|
||||
mcl_formspec.style_list_reset = "style_type[list;noclip=;size=;spacing=]"
|
||||
function mcl_formspec.get_style_list(border, spacing)
|
||||
function mcl_formspec.get_itemslot_style(border, spacing)
|
||||
local border = border or mcl_formspec.itemslot_border_size
|
||||
local spacing = spacing or mcl_formspec.itemslot_spacing_size
|
||||
return table.concat{
|
||||
|
@ -66,6 +65,8 @@ function mcl_formspec.get_style_list(border, spacing)
|
|||
"]",
|
||||
}
|
||||
end
|
||||
mcl_formspec.itemslot_style_reset = "style_type[list;noclip=;size=;spacing=]"
|
||||
mcl_formspec.itemslot_style = mcl_formspec.get_itemslot_style()
|
||||
|
||||
local function create_itemslot_bg(i, j, x, y, iu, bu, factor)
|
||||
local img_x = x + i * iu - bu
|
||||
|
|
|
@ -206,8 +206,8 @@ local function set_inventory(player, armor_change_only)
|
|||
local form = table.concat({
|
||||
"formspec_version[4]",
|
||||
"size[", 2 * padding + 9 * iu - 2 * bu, ",", 4 * padding + 8 * iu - 2 * bu, "]",
|
||||
mcl_formspec.style_label,
|
||||
mcl_formspec.get_style_list(),
|
||||
mcl_formspec.label_style,
|
||||
mcl_formspec.itemslot_style,
|
||||
|
||||
armor_slots_formspec,
|
||||
ppreview_formspec,
|
||||
|
|
|
@ -487,7 +487,7 @@ local function register_chest(basename, desc, longdesc, usagehelp, tt_help, tile
|
|||
table.concat({
|
||||
"formspec_version[4]",
|
||||
"size[11.75,10.425]",
|
||||
mcl_formspec.style_label,
|
||||
mcl_formspec.label_size,
|
||||
|
||||
"label[0.375,0.375;"..F(C(mcl_formspec.label_color, name)).."]",
|
||||
|
||||
|
@ -647,7 +647,7 @@ local function register_chest(basename, desc, longdesc, usagehelp, tt_help, tile
|
|||
table.concat({
|
||||
"formspec_version[4]",
|
||||
"size[11.75,14.15]",
|
||||
mcl_formspec.style_label,
|
||||
mcl_formspec.label_style,
|
||||
|
||||
"label[0.375,0.375;"..F(C(mcl_formspec.label_color, name)).."]",
|
||||
|
||||
|
@ -806,7 +806,7 @@ local function register_chest(basename, desc, longdesc, usagehelp, tt_help, tile
|
|||
table.concat({
|
||||
"formspec_version[4]",
|
||||
"size[11.75,14.15]",
|
||||
mcl_formspec.style_label,
|
||||
mcl_formspec.label_style,
|
||||
|
||||
"label[0.375,0.375;"..F(C(mcl_formspec.label_color, name)).."]",
|
||||
|
||||
|
@ -1167,7 +1167,7 @@ local function formspec_shulker_box(name)
|
|||
return table.concat({
|
||||
"formspec_version[4]",
|
||||
"size[11.75,10.425]",
|
||||
mcl_formspec.style_label,
|
||||
mcl_formspec.label_style,
|
||||
|
||||
"label[0.375,0.375;"..F(C(mcl_formspec.label_color, name)).."]",
|
||||
|
||||
|
|
Loading…
Reference in New Issue