Skip to content

Commit 73d545c

Browse files
committed
Fix Last Server Button
1 parent 721f328 commit 73d545c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/main/java/net/wurstclient/mixin/MultiplayerScreenMixin.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ private void onInit(CallbackInfo ci)
6767
private void refreshCustomButtons()
6868
{
6969
updateLastServerButton();
70+
positionLastServerButton();
7071

7172
if(!WurstClient.INSTANCE.isEnabled())
7273
return;
@@ -132,6 +133,19 @@ private void onConnect(ServerData entry, CallbackInfo ci)
132133
updateLastServerButton();
133134
}
134135

136+
@Unique
137+
private void positionLastServerButton()
138+
{
139+
if(lastServerButton == null)
140+
return;
141+
142+
// Position the button above the left edge of the server list to mirror
143+
// the VIA button on the right.
144+
lastServerButton.setX(width / 2 - 154);
145+
lastServerButton.setY(10);
146+
lastServerButton.setWidth(100);
147+
}
148+
135149
@Unique
136150
private void updateLastServerButton()
137151
{

0 commit comments

Comments
 (0)