From 0e538ee6e879c5bb06e4cf2f9a2241e9fb35f14e Mon Sep 17 00:00:00 2001 From: FlorianMichael <60033407+FlorianMichael@users.noreply.github.com> Date: Fri, 22 Sep 2023 23:02:08 +0200 Subject: [PATCH] Fixed Via Button in 1.20.2 --- .../textures/gui/sprites/widget_focused.png | Bin 0 -> 2916 bytes .../textures/gui/sprites/widget_unfocused.png | Bin 0 -> 2929 bytes .../viaversion/fabric/mc120/ViaFabricClient.java | 4 +--- 3 files changed, 1 insertion(+), 3 deletions(-) create mode 100644 src/main/resources/assets/viafabric/textures/gui/sprites/widget_focused.png create mode 100644 src/main/resources/assets/viafabric/textures/gui/sprites/widget_unfocused.png diff --git a/src/main/resources/assets/viafabric/textures/gui/sprites/widget_focused.png b/src/main/resources/assets/viafabric/textures/gui/sprites/widget_focused.png new file mode 100644 index 0000000000000000000000000000000000000000..d4273160127c65e6117a62efe15ca85cb34c41f8 GIT binary patch literal 2916 zcmV-q3!C(bP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D3i(MyK~!i%<(YYG zRL2>>-+O!cKGqkPF*e3_4L%6iU=BOjI1Lm7A%>PF4V0!5QdKo1p=n85(zKx}DQ(n0 z+A3)!R6CS}5L=W0p@P`P_F{8x@QJyM&&BxI^||NkH}j3xZ+G8%Ng`EI`3a4``DXUL zH}icn-!}sgqH#o=%;31&!m)H&jL9!hT>ByE+-(h~KERQ7B| zyyIOq@9b9gaM(QUCL#*P3=N87|+`FM~ z@6(&cLD;i01-=25PO6*kUm6?@RS26>=P;Ekm+u;yM$BBGmWy4;R8c{EtX8~wpH(^T z`>OT`VE{b{2V7cO3MF$1PXaYUMu4CnbL`$)xUOIo(@N;ils|${+XtglQ+SSZ!-|z7E10TUNdF!|kYaqwLiAE$?it6S-L4t`!DZZ&%pzfR6xRr2#4m*m*%XS)wH;Dxe9wNtrV%=10qt zSVfNSd@GMhuC(2`f26q+gm24rXl%Jv+h+oyaCH`HJXx8Y$-H8?9}1x`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.png b/src/main/resources/assets/viafabric/textures/gui/sprites/widget_unfocused.png new file mode 100644 index 0000000000000000000000000000000000000000..86364b47376d829552a04eca1a45845551ca22d8 GIT binary patch literal 2929 zcmV-%3y$=OP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D3kFF?_pZE=@CJc`Jba4}P>?iQ@fEbSNuy)a8D~13#u%G6X{$|JJDt=v_MdiQ zJJV^55{ZwoMvWZ}Ac&w*i9AIS9QzW5-ZX#A>y2i4e6~&86uO1p0DO6tU`n^r=*~*=!DaM5R)3X`+o( zgSgU{mzP6%@Zdox9iM&ek*zS!1k!1+nk-zFf$P9Z4O?vsTYu+ym7-#6g};)5Yl5JR z7KGix)@sR{W#7_A5S4}s6K&8gEchOQM3RT&`tD(>8zw>ozj*Gg#X=#JRFk5`n~xgh>8 zzunC%62S0YePe&Mq3uVRNq^k?W3HWG+-zC7{aq0DZCdum54NJxfsbNXxO=7707BmK1*mam>B0Nd|{u=eX^kiO< zQ(W;Sl)+j}#_UAYNI6?v31xmvP|~be)Ho9y=)Y%0DwPJhps-!JV=HSQ#xXKz6z|dP z8b*5QQziI-!S6Y^Sy*ImPq(?=bSg_KZlclw7*e=ac~iW%IorqEi&rF!jE)`nv;>5` z1=-$So~X1lU>MqWh7Nf9x@@(2s>LW+&F0!POiUvL_On(kn#{KHCStZF3T8jeFpdbV z6=A=dE)GXCtKM695ju(*DbVA0H!It1&eC~Yl2cvVcxQzA!j((rqDD&PjT#HHz2%GM zpvD!c$qA{x%#{wY#q2bQm+ufWb+<{vW2$ihAFzdiwvOPg4%NH)2&BVgxp})DTRM=P zsnG9@aUluu(Yzw3@L$DH=Enp(H-L{G`K%O#cXHE%0{v0x3J-Vfn_F_IGzcD8=3-_F zz4rdIp@_JX@#!=x3}!W7Pumq6Gh{hJmtdK2)kmKdS#zSzTwh zf+qm4zHR+VUYWp^L6%qDLLp13L0J{`6sbCo^b`eW=1fdf_>OdDCTP`+FmsQYF~Y!| z%%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;Dw0>Q^;sG0m?>nbovRQ`{=l26YPZG-d@3pLDD^VLRN-dX}85$Z*H?h#VLgs32~ zhvirhjosYg6#BPQC7agf;$6HVwT<^Kw9(}Dd-+)^r^{Lhzn`$HyybYTb)w>W^*I-r z?1J>f{1+8&S{BZk?Is9SgSM1VqH$rnvH`=639s`_k-g!+5B$4Lhc2?X~ETKfoj8OO??xu$oXdW zLMU5Y`)aqR_#$k_1DPL;38QJ86< z>QO5c;77~R}LGe;?PP4_YU`ssb0p91GD(aD;EPtTS>h~^auTCH1%oBGma?3f80sBmCwe{2peZ=BK;tFqeJcL zqSx0)j~<1RyPT+~sE&?~_V)JS;b9}AMw{5HcDy&91pHP%Gw){=i^&?IG4}WO4-E~` zvwx^zpdRKx*f*TLs!gLfoVPkxEhy+iC{Vow08KIXx z_%`V~v2Sq7$EqFtt*0klCzSCG2>!v48#mqzpp0NN)-hOk<}FdiIYXJoYeDd0(5R { if (!(screen instanceof MultiplayerScreen)) return; - // TODO This is broken - Identifier widgetIdentifier = new Identifier("viafabric:textures/gui/widgets.png"); ButtonWidget enableClientSideViaVersion = new TexturedButtonWidget(scaledWidth / 2 + 113, 10, 40, 20, // Size - new ButtonTextures(widgetIdentifier, widgetIdentifier), + new ButtonTextures(new Identifier("viafabric", "widget_unfocused"), new Identifier("viafabric", "widget_focused")), it -> MinecraftClient.getInstance().setScreen(new ViaConfigScreen(screen)), Text.translatable("gui.via_button")); if (ViaFabric.config.isHideButton()) enableClientSideViaVersion.visible = false;