2018-08-03 11:04:50 +02:00
|
|
|
local S = upgrade_packs.translator
|
2022-12-13 17:49:31 +01:00
|
|
|
local ui = unified_inventory
|
2018-08-03 11:04:50 +02:00
|
|
|
|
2022-12-13 17:49:31 +01:00
|
|
|
ui.register_button("ugpacks", {
|
2018-05-15 19:32:23 +02:00
|
|
|
type = "image",
|
|
|
|
image = "heart.png",
|
2018-08-03 11:04:50 +02:00
|
|
|
tooltip = S("Upgrade Packs")
|
2018-05-15 19:32:23 +02:00
|
|
|
})
|
|
|
|
|
2022-12-13 17:49:31 +01:00
|
|
|
ui.register_page("ugpacks", {
|
2018-05-15 19:32:23 +02:00
|
|
|
get_formspec = function(player, perplayer_formspec)
|
|
|
|
local y = perplayer_formspec.formspec_y
|
|
|
|
|
|
|
|
return { formspec = (
|
2022-12-13 17:49:31 +01:00
|
|
|
ui.style_full.standard_inv_bg ..
|
|
|
|
ui.make_inv_img_grid(3.9, (y+0.6), 2, 2, true) ..
|
2018-07-14 10:02:06 +02:00
|
|
|
"no_prepend[]" ..
|
2022-12-13 17:49:31 +01:00
|
|
|
"label["..ui.style_full.form_header_x..","..ui.style_full.form_header_y..";" .. S("Upgrade Packs") .. "]" ..
|
|
|
|
"list[current_player;ugpacks;4," .. (y + 0.7) .. ";2,2;]" ..
|
|
|
|
"listring[current_player;main]"..
|
|
|
|
"listring[current_player;ugpacks]"
|
|
|
|
), draw_inventory = true}
|
2018-05-15 19:32:23 +02:00
|
|
|
end
|
2022-12-13 17:49:31 +01:00
|
|
|
})
|