mirror of
https://github.com/minetest-mods/unified_inventory.git
synced 2024-11-13 05:40:18 +01:00
Centre page number label and move refill/trash labels (#221)
* Centre page number label * Move refill and trash labels
This commit is contained in:
parent
82cdf24045
commit
b590764026
|
@ -274,9 +274,11 @@ local function formspec_add_item_browser(player, formspec, ui_peruser)
|
|||
end
|
||||
end
|
||||
end
|
||||
formspec[n] = string.format("label[%f,%f;%s: %s]",
|
||||
ui_peruser.page_buttons_x + ui_peruser.btn_spc * (ui_peruser.is_lite_mode and 1 or 2),
|
||||
ui_peruser.page_buttons_y + 0.1 + ui_peruser.btn_spc * 2,
|
||||
formspec[n] = "style[page_number;content_offset=0]"
|
||||
formspec[n + 1] = string.format("image_button[%f,%f;%f,0.4;;page_number;%s: %s;false;false;]",
|
||||
ui_peruser.page_buttons_x,
|
||||
ui_peruser.page_buttons_y + ui_peruser.btn_spc * 2 - 0.1,
|
||||
ui_peruser.btn_spc * (bn - 1) + ui_peruser.btn_size,
|
||||
F(S("Page")), S("@1 of @2",page2,pagemax))
|
||||
end
|
||||
|
||||
|
|
|
@ -183,14 +183,14 @@ ui.register_page("craft", {
|
|||
local n=#formspec+1
|
||||
|
||||
if ui.trash_enabled or ui.is_creative(player_name) or minetest.get_player_privs(player_name).give then
|
||||
formspec[n] = string.format("label[%f,%f;%s]", craftx + 6.45, crafty + 2.4, F(S("Trash:")))
|
||||
formspec[n] = string.format("label[%f,%f;%s]", craftx + 6.35, crafty + 2.3, F(S("Trash:")))
|
||||
formspec[n+1] = ui.make_trash_slot(craftx + 6.25, crafty + 2.5)
|
||||
n=n + 2
|
||||
end
|
||||
|
||||
if ui.is_creative(player_name) then
|
||||
formspec[n] = ui.single_slot(craftx - 2.5, crafty + 2.5)
|
||||
formspec[n+1] = string.format("label[%f,%f;%s]", craftx - 2.3, crafty + 2.4,F(S("Refill:")))
|
||||
formspec[n+1] = string.format("label[%f,%f;%s]", craftx - 2.4, crafty + 2.3, F(S("Refill:")))
|
||||
formspec[n+2] = string.format("list[detached:%srefill;main;%f,%f;1,1;]",
|
||||
F(player_name), craftx - 2.5 + ui.list_img_offset, crafty + 2.5 + ui.list_img_offset)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user