forked from LizzyFleckenstein03/Memeclone
Use label instead of extra texture
This commit is contained in:
parent
1483c45cc9
commit
bcb6251d20
|
@ -1,5 +1,6 @@
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
local F = minetest.formspec_escape
|
local F = minetest.formspec_escape
|
||||||
|
local C = minetest.colorize
|
||||||
|
|
||||||
-- Prepare player info table
|
-- Prepare player info table
|
||||||
local players = {}
|
local players = {}
|
||||||
|
@ -360,10 +361,7 @@ function mcl_inventory.set_creative_formspec(player, start_i, pagenum, inv_size,
|
||||||
armor_slot_imgs = armor_slot_imgs .. "image[5.5,2.75;1,1;mcl_inventory_empty_armor_slot_boots.png]"
|
armor_slot_imgs = armor_slot_imgs .. "image[5.5,2.75;1,1;mcl_inventory_empty_armor_slot_boots.png]"
|
||||||
end
|
end
|
||||||
|
|
||||||
local switch_overlay = "blank.png"
|
local stack_size = get_stack_size(player)
|
||||||
if get_stack_size(player) == 64 then
|
|
||||||
switch_overlay = "mcl_inventory_button_switch_stack.png"
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Survival inventory slots
|
-- Survival inventory slots
|
||||||
main_list = "list[current_player;main;0,3.75;9,3;9]"..
|
main_list = "list[current_player;main;0,3.75;9,3;9]"..
|
||||||
|
@ -394,7 +392,8 @@ function mcl_inventory.set_creative_formspec(player, start_i, pagenum, inv_size,
|
||||||
--"style_type[image_button;border=;bgimg=;bgimg_pressed=]"..
|
--"style_type[image_button;border=;bgimg=;bgimg_pressed=]"..
|
||||||
"tooltip[__mcl_achievements;"..F(S("Achievements")).."]"..
|
"tooltip[__mcl_achievements;"..F(S("Achievements")).."]"..
|
||||||
-- switch stack size button
|
-- switch stack size button
|
||||||
"image_button[9,5;1,1;default_apple.png^" .. switch_overlay .. ";__switch_stack;]"..
|
"image_button[9,5;1,1;default_apple.png;__switch_stack;]"..
|
||||||
|
"label[9.4,5.4;".. F(C("#FFFFFF", stack_size ~= 1 and stack_size or "")) .."]"..
|
||||||
"tooltip[__switch_stack;"..F(S("Switch stack size")).."]"
|
"tooltip[__switch_stack;"..F(S("Switch stack size")).."]"
|
||||||
|
|
||||||
-- For shortcuts
|
-- For shortcuts
|
||||||
|
|
Loading…
Reference in New Issue