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 ff623e1c..4a449355 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 zcmeAS@N?(olHy`uVBq!ia0y~yVDMsKU{K{?W?*2rw5IK^Kn5ZZpAD^1?@_DmoPw46j4-50~@bL5Xttu^@ zJ!3{xWMp(yl%JnpZDr-0S+gc|cUKe_Pw4NDjgD@psp;?Qi;Rfy_4Vy-Zx0O#sjIB) zZfgq*4fXf;udS%)X>adtZ4C?zY^Y>+K$}%Wy-+7SnuiL7*fG_bsB5gV*?S_!S`|rJR!g<5CRUvLmwfbhdY;7vi z+|+gb5=-8i+lTG%M42~eu9x&ZdP%k}a3kM2)iqpoh2cpmq3`Y;nbdxK`3H0Ve*TE0 zd(V|t{LtCB@RO2LdezE==9*`&S6|QWoclU9W7+q)oX>8*cD;Ih`Ld>5(e0rLH!pZY{r0(a3+8**>Yfk%6ZC5))BK5D3)P&T{|a5bNXlyR8pEW{ zYtk12&W5dCx!~do=%=p+p@EWs>z?GRP3dIEizuz^SOtXG1q?j_-^ZJn$>lQ40wfKp2dvf^e z2Zon*^!=7eUoJURQaxca+cc9jpWQ*0h10jsHuzg6*DJc<*kT?r5>Ts#@)LdX3UgydAO$PY~(H@+we=4uQsO~d;hOI<>S?qjS*XZ*4S-6&#>UE z&}CjmjfTsfYr?fRM(Gv){>E@^^Gpv_A%SkUL_;aTmXC}doXxNI_qQBQ*c!FfQiSJF zj)e-xW2Oh}>(qoNb{v0Lb#}I;4A;RqQw+2YR9T6BjNn=OkCCB&q1NVu42nIh4%3eF z*ZhC@K7Iaqce_Lx2AR(%E9U6@e=O7M!f{A~A#u~5BX7P|CEj|k%wq3gIQy){T)#+; zFPvR|dl;7gjl1H#lzsbYRbD|JmV`^M6-WjjRt^KCy^1wBC4jRsF)MOBYYRZ%^FaE5O6>UUqlPzUd)NS?VE7 zva{JA)NWE%RcROg3AX5GcXIjeA3V>N{i_f;>a$Fh+rg`+-I?`(ZA(Fz-x)!-|KUo( zOIgAVm!Ha9*XFi$${gRlzt(;-;bPmCplHw3F6Pc&t|=cUKlg#e+@wV}RqnqqdHurW h`-`Z~Kz;^>-gAfC=HvvgXJBAp@O1TaS?83{1OQ&r-`W5G literal 0 HcmV?d00001 diff --git a/mods/HUD/mcl_inventory/textures/crafting_creative_prev.png b/mods/HUD/mcl_inventory/textures/crafting_creative_prev.png new file mode 100644 index 0000000000000000000000000000000000000000..03225450ea34f0afae785da012dc0f5f59d0ba86 GIT binary patch literal 532 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4mJh`hH$2z?F@1PLn;{G&T7p);vnF< zy&+@*U(g9dg*$et9$enC7GMqs&g7 z&7k9_g91Ym?|+64T}Orl1v|NJ$?p0~LN8NPlSbtkl6dL6&0Ir{9cvFKQG7 z44&4kj@s+?oRh)enPE=L+~a;-XkG$-%hDM5a({(sxlRgomEpL24l>#d`)JNM|BTX1Zf o@kCAjpxNp>FQ%odsvMAgGwqPuD@LUT1_lNOPgg&ebxsLQ00+$NO8@`> literal 0 HcmV?d00001 diff --git a/mods/HUD/mcl_inventory/textures/crafting_creative_up.png b/mods/HUD/mcl_inventory/textures/crafting_creative_up.png deleted file mode 100644 index 12843b3b2591349a6bdba7e5decac8f34275be98..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 613 zcmeAS@N?(olHy`uVBq!ia0y~yVDMsKU{K{?W?*2rw5IK0s{ksgMzwSTf@V`I-8pV z0s_K9LxY2ZLxO|5+uFKXT6){tBf`UdeSOOc3ma={=FXno)81ZFUhd)HQCm?lXXebh z%F6z}zQ~A(s?yR4{r$1g(LO#t4K+0ry1Ofiizjw>M@L2Z`T5mWR?e9DZeIW88uT|+$pvKNG3fo&OL{8b+p3zsfYAtGQS+zB4YKvB?%hCrC zDod_Q_wMp@n%0~lGAl2`NB5jWe(SNPW`eCwh8f+-uS#zA?~*NydAp$Fy2vT73?JKb zbw{fg7HX#MS@NrSn+EUhH~x1QW^85uJN-(APQYYM@w)DpE(?w=o-UI1u0HeJOo93T zx8IRedh;OZXL`))uWhZj)`Zs|+Y;kq&2#(idqZB!-Cg|k{n^`Hk0|ddzwOfgaN^w( z8M%&I@8l-FfAGy^vRHcgqqUrKw-v7Y{HW&Trro9b&si4*>;Lweq7tZ<>Q&1gqpYPc UEAZq&1_lNOPgg&ebxsLQ0EJ-`FaQ7m 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!ia0y~yVDMsKU=UzrW?*3G=B{4Mz`(#3;1l9n4F*fuY_~Bm zFff(``2{mLJiCzwQtRpB7*fHQyx~7TE01#%Cxdf$bD^T>lMDt11_n=8KbLh*2~7Zh CLK#>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!ia0y~yVDMsKU=UzpW?*1AvzoD(fq{WDz$e7j-Q9ie+`0e% z|BspXFN%SILCDj^F{FYqIf2)eox4L^T9lb#;--{^Ue}5Q85kHCJYD@<);T3K0RSe2 B7~}u|