From 1e5f3ee61026fb261419cf7ff3fb9d49cfe9bf84 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 10 Mar 2020 06:10:54 +0100 Subject: [PATCH] Creative: Replace fake slider with page buttons --- mods/HUD/mcl_inventory/creative.lua | 15 +++++---------- .../textures/crafting_creative_down.png | Bin 629 -> 0 bytes .../textures/crafting_creative_next.png | Bin 0 -> 528 bytes .../textures/crafting_creative_prev.png | Bin 0 -> 532 bytes .../textures/crafting_creative_up.png | Bin 613 -> 0 bytes .../textures/mcl_inventory_slider.png | Bin 104 -> 0 bytes .../textures/mcl_inventory_slider_bg.png | Bin 96 -> 0 bytes 7 files changed, 5 insertions(+), 10 deletions(-) delete mode 100644 mods/HUD/mcl_inventory/textures/crafting_creative_down.png create mode 100644 mods/HUD/mcl_inventory/textures/crafting_creative_next.png create mode 100644 mods/HUD/mcl_inventory/textures/crafting_creative_prev.png delete mode 100644 mods/HUD/mcl_inventory/textures/crafting_creative_up.png delete mode 100644 mods/HUD/mcl_inventory/textures/mcl_inventory_slider.png delete mode 100644 mods/HUD/mcl_inventory/textures/mcl_inventory_slider_bg.png diff --git a/mods/HUD/mcl_inventory/creative.lua b/mods/HUD/mcl_inventory/creative.lua index ff623e1c2e..4a449355a2 100644 --- a/mods/HUD/mcl_inventory/creative.lua +++ b/mods/HUD/mcl_inventory/creative.lua @@ -269,10 +269,6 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz end end 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 formspec = "" local main_list @@ -357,12 +353,11 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz "listring[current_player;main]" else -- Creative inventory slots - main_list = "list[detached:creative_"..playername..";main;0,1.75;9,5;"..tostring(start_i).."]" .. - -- ... and scroll bar - "image[9.033,2.230;0.78,4.525;mcl_inventory_slider_bg.png]".. - "image[9.033," .. tostring(slider_pos) .. ";0.78,"..tostring(slider_height) .. ";mcl_inventory_slider.png]".. - "image_button[9.015,1.77;0.85,0.6;crafting_creative_up.png;creative_prev;]".. - "image_button[9.015,6.15;0.85,0.6;crafting_creative_down.png;creative_next;]" + main_list = "list[detached:creative_"..playername..";main;0,1.75;9,5;"..tostring(start_i).."]".. + -- Page buttons + "label[9.0,5.5;"..F(S("@1/@2", pagenum, pagemax)).."]".. + "image_button[9.0,6.0;0.7,0.7;crafting_creative_prev.png;creative_prev;]".. + "image_button[9.5,6.0;0.7,0.7;crafting_creative_next.png;creative_next;]" end local tab_icon = { diff --git a/mods/HUD/mcl_inventory/textures/crafting_creative_down.png b/mods/HUD/mcl_inventory/textures/crafting_creative_down.png deleted file mode 100644 index c7849992efeaec6377b62eedfde3735e06ad97d4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 629 zcmV-*0*d{KP)ERDOAR zi-v|)RaH+Fcd|{eJ>nUuFGsx!_52N z*FaDXnuhM-z&+AOeai~N$X0cg3BdoPVlH1O9{)?Rkk2uOs#Hd$Dvp^%wSsafvWnNz z1a7R`!#~_wH-IUx8BN8~9ez=<4$dX43Vv}{VkA}W-o%oJ$EWZ&Pmd2+V&3N>sQ4_g zq4FX^XL_k%gM8*i)$5yyo$Fm_ruUr*=G*H<)yJo%f^8MIRbbiBRG%LgRdihFE^mD< z;pry04ljqDexRRAeJ#&b{8IXv0-uqJp(aD;`c)@V;IPUOjSPs5#}pzT&a%k P00000NkvXXu0mjf|1Bgo diff --git a/mods/HUD/mcl_inventory/textures/crafting_creative_next.png b/mods/HUD/mcl_inventory/textures/crafting_creative_next.png new file mode 100644 index 0000000000000000000000000000000000000000..fa71a50f3312d3a5e29e9ac47cb5f82f9add7f3c GIT binary patch literal 528 zcmV+r0`L8aP)A!75Qg6XouC_ZkT5fgxwi$-BF8WDu?0q{dN*N=~c!(g>qwK)_F z!fZGs2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Zi?yrlYr zwkQp|>`&dHXtf9Zm(*x1P?ISaev9cupvI$@6lU&!Y0jAtpZ~Yq86xc9V)9V_ZFXsiKQ!o2Ulq69mWlDVqTq7zVno-HY00000NkvXXu0mjfg<%vh diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_slider.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_slider.png deleted file mode 100644 index d93273a7bd30c24e1e5d764ca9202efc461919ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 104 zcmeAS@N?(olHy`uVBq!ia0vp^UO+6s$P6UAxvLigDYgKg5Z7ujSjuL*4Jg7`666=m u;PC858c40Di(^OyWAcXo{H#3AO`HtQ-OYuHqE9k_atxlXelF{r5}E*iLK#>9 diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_slider_bg.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_slider_bg.png deleted file mode 100644 index beefdb20ba378505019639a28db73e434482d092..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 96 zcmeAS@N?(olHy`uVBq!ia0vp^UO+6s#0(_QtY$0*Qk(%kA+GN3?sMnP{r~@e%)Eb5 tKtUl-7srqa#^eNES9b0WacNOzhKZX}7J6MP5(LUJc)I$ztaD0e0stn37~}u|