mirror of
https://github.com/SmallJoker/upgrade_packs.git
synced 2024-08-20 05:14:07 +02:00
Improve styling on unified_inventory (#2)
This commit is contained in:
parent
3c46d71707
commit
793e397ab7
@ -1,22 +1,24 @@
|
|||||||
local S = upgrade_packs.translator
|
local S = upgrade_packs.translator
|
||||||
|
local ui = unified_inventory
|
||||||
|
|
||||||
unified_inventory.register_button("ugpacks", {
|
ui.register_button("ugpacks", {
|
||||||
type = "image",
|
type = "image",
|
||||||
image = "heart.png",
|
image = "heart.png",
|
||||||
tooltip = S("Upgrade Packs")
|
tooltip = S("Upgrade Packs")
|
||||||
})
|
})
|
||||||
|
|
||||||
unified_inventory.register_page("ugpacks", {
|
ui.register_page("ugpacks", {
|
||||||
get_formspec = function(player, perplayer_formspec)
|
get_formspec = function(player, perplayer_formspec)
|
||||||
local y = perplayer_formspec.formspec_y
|
local y = perplayer_formspec.formspec_y
|
||||||
|
|
||||||
return { formspec = (
|
return { formspec = (
|
||||||
|
ui.style_full.standard_inv_bg ..
|
||||||
|
ui.make_inv_img_grid(3.9, (y+0.6), 2, 2, true) ..
|
||||||
"no_prepend[]" ..
|
"no_prepend[]" ..
|
||||||
"listcolors[#888;#AAA;#111]" ..
|
"label["..ui.style_full.form_header_x..","..ui.style_full.form_header_y..";" .. S("Upgrade Packs") .. "]" ..
|
||||||
"label[3," .. (y - 0.1) .. ";" .. S("Upgrade Packs") .. "]" ..
|
"list[current_player;ugpacks;4," .. (y + 0.7) .. ";2,2;]" ..
|
||||||
"list[current_player;ugpacks;3," .. (y + 0.7) .. ";2,2;]" ..
|
"listring[current_player;main]"..
|
||||||
"list[current_player;main;0," .. (y + 3.5) .. ";8,4;]" ..
|
"listring[current_player;ugpacks]"
|
||||||
"listring[]"
|
), draw_inventory = true}
|
||||||
), draw_inventory = false}
|
|
||||||
end
|
end
|
||||||
})
|
})
|
Loading…
Reference in New Issue
Block a user