Skip to content

Commit

Permalink
Add a UPnP status indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaming32 committed Sep 23, 2023
1 parent 0accf64 commit aab8240
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
public class WorldHostConfigScreen extends WorldHostScreen {
private static final Component TITLE = Components.translatable("world-host.config.title");
private static final Component SERVER_IP = Components.translatable("world-host.config.serverIp");
private static final Component UPNP = Components.literal("UPnP");

private final Screen parent;

Expand Down Expand Up @@ -166,6 +167,8 @@ public void render(

final int yOffset = height / 6 + 10 - font.lineHeight / 2;
drawString(context, font, SERVER_IP, width / 2 - 150, yOffset, 0xffffff);

drawRightString(context, font, UPNP, width - 7, height - 15, WorldHost.upnpGateway != null ? 0x55ff55 : 0xff5555);
}

@Override
Expand Down

0 comments on commit aab8240

Please sign in to comment.