/** * Draw all the text in this state. * * @param graphics context to use * @param container appgamecontainer to use */ private void drawText(Graphics graphics, GameContainer container) { RND.getInstance() .text( graphics, TEXT_HELP_X, TEXT_HELP_Y_1, "# You can play a game together with another player, over LAN."); RND.getInstance() .text( graphics, TEXT_HELP_X, TEXT_HELP_Y_2, "# If you are the host, you will have to wait until another player joins you."); RND.getInstance() .text( graphics, TEXT_HELP_X, TEXT_HELP_Y_3, "# If you wish to join another player," + " please enter their IP-address below."); RND.getInstance().text(graphics, TEXT_HELP_X, TEXT_HELP_Y_4, "# Your player name:"); if (mainGame.isHost()) { try { RND.getInstance() .text( graphics, TEXT_HOST_X, TEXT_HOST_Y, "# Hosting game on IP: " + InetAddress.getLocalHost().getHostAddress()); } catch (UnknownHostException e) { e.printStackTrace(); } } RND.getInstance().text(graphics, TEXT_HELP_X, TEXT_JOIN_Y, "# Join this IP: "); RND.getInstance() .text( graphics, container.getWidth() / 2 - BOTTOM_TEXT_OFFSET_X, container.getHeight() - BOTTOM_TEXT_OFFSET_Y, "Waiting for user input..."); }