mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 10:11:33 +01:00
Update ServerComponent.java
This commit is contained in:
parent
be6627e741
commit
57c23a03f8
@ -37,7 +37,7 @@ public class ServerComponent {
|
|||||||
private static final ResourceLocation SERVER_SELECTION_BUTTONS = new ResourceLocation("textures/gui/server_selection.png");
|
private static final ResourceLocation SERVER_SELECTION_BUTTONS = new ResourceLocation("textures/gui/server_selection.png");
|
||||||
private final SilentMultiplayerGui owner;
|
private final SilentMultiplayerGui owner;
|
||||||
private final Minecraft mc;
|
private final Minecraft mc;
|
||||||
private final ServerData server;
|
private ServerData server;
|
||||||
private final ResourceLocation serverIcon;
|
private final ResourceLocation serverIcon;
|
||||||
private String field_148299_g;
|
private String field_148299_g;
|
||||||
private DynamicTexture field_148305_h;
|
private DynamicTexture field_148305_h;
|
||||||
@ -82,7 +82,7 @@ public class ServerComponent {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
boolean isHovered = MouseUtils.isInside(mouseX, mouseY, x, y, 240, 35);
|
boolean isHovered = MouseUtils.isInside(mouseX, mouseY, x, y, 240, 35);
|
||||||
RenderUtil.drawRoundedOutline(x, y, 240, 35, 3, 1, Theme.borderColor().getRGB());
|
RenderUtil.drawRoundedOutline(x, y, 240, 35, 3, isSelected ? 3 : 1, isSelected ? -1 : Theme.borderColor().getRGB());
|
||||||
if(isHovered || isSelected) {
|
if(isHovered || isSelected) {
|
||||||
RenderUtil.drawRoundedRect(x, y, 240, 35, 3, new Color(255, 255, 255, 30).getRGB());
|
RenderUtil.drawRoundedRect(x, y, 240, 35, 3, new Color(255, 255, 255, 30).getRGB());
|
||||||
if(isHovered) {
|
if(isHovered) {
|
||||||
@ -248,4 +248,10 @@ public class ServerComponent {
|
|||||||
public ServerData getServer() {
|
public ServerData getServer() {
|
||||||
return server;
|
return server;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setServer(ServerData server) {
|
||||||
|
if(!server.serverIP.equalsIgnoreCase(this.server.serverIP)) {
|
||||||
|
this.server = new ServerData(server.serverName, server.serverIP, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user