mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-12-01 02:33:00 +00:00
Creative: Replace fake slider with page buttons
This commit is contained in:
parent
c6d6a2ce26
commit
1e5f3ee610
7 changed files with 5 additions and 10 deletions
|
@ -269,10 +269,6 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local pagemax = math.max(1, math.floor((inv_size-1) / (9*5) + 1))
|
local pagemax = math.max(1, math.floor((inv_size-1) / (9*5) + 1))
|
||||||
local slider_height
|
|
||||||
local arrow_height = 0.85
|
|
||||||
slider_height = (6.2-arrow_height*2) / pagemax
|
|
||||||
local slider_pos = (slider_height*(pagenum-1)*0.8713125)+2.23
|
|
||||||
local name = "nix"
|
local name = "nix"
|
||||||
local formspec = ""
|
local formspec = ""
|
||||||
local main_list
|
local main_list
|
||||||
|
@ -358,11 +354,10 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz
|
||||||
else
|
else
|
||||||
-- Creative inventory slots
|
-- Creative inventory slots
|
||||||
main_list = "list[detached:creative_"..playername..";main;0,1.75;9,5;"..tostring(start_i).."]"..
|
main_list = "list[detached:creative_"..playername..";main;0,1.75;9,5;"..tostring(start_i).."]"..
|
||||||
-- ... and scroll bar
|
-- Page buttons
|
||||||
"image[9.033,2.230;0.78,4.525;mcl_inventory_slider_bg.png]"..
|
"label[9.0,5.5;"..F(S("@1/@2", pagenum, pagemax)).."]"..
|
||||||
"image[9.033," .. tostring(slider_pos) .. ";0.78,"..tostring(slider_height) .. ";mcl_inventory_slider.png]"..
|
"image_button[9.0,6.0;0.7,0.7;crafting_creative_prev.png;creative_prev;]"..
|
||||||
"image_button[9.015,1.77;0.85,0.6;crafting_creative_up.png;creative_prev;]"..
|
"image_button[9.5,6.0;0.7,0.7;crafting_creative_next.png;creative_next;]"
|
||||||
"image_button[9.015,6.15;0.85,0.6;crafting_creative_down.png;creative_next;]"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local tab_icon = {
|
local tab_icon = {
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 629 B |
BIN
mods/HUD/mcl_inventory/textures/crafting_creative_next.png
Normal file
BIN
mods/HUD/mcl_inventory/textures/crafting_creative_next.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 528 B |
BIN
mods/HUD/mcl_inventory/textures/crafting_creative_prev.png
Normal file
BIN
mods/HUD/mcl_inventory/textures/crafting_creative_prev.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 532 B |
Binary file not shown.
Before Width: | Height: | Size: 613 B |
Binary file not shown.
Before Width: | Height: | Size: 104 B |
Binary file not shown.
Before Width: | Height: | Size: 96 B |
Loading…
Reference in a new issue