public void drawChat(Graphics2D g) {
        GameState state = ((GameState) Engine.getInstance().getGState());
        List<Message> cbText = Chat.getCbText();

        if (cbText.size() > 15)
            getInnerPanel().setCurrentHeight(cbText.size() * getLineHeight());

        int inputTextHeight = (int) (getBounds().getY() + getBounds().getHeight() - 5);
        g.setColor(Color.white);

        drawColoredText(g, Client.getClient().getUsername() + ": ", PLAYER_NAME,
                (int) (getBounds().getX()) + 5, inputTextHeight);

        drawColoredText(
                g,
                state.playerEnteredText
                        + (GameState.getInstance().chatSelected ? "|"
                        : "<0xbdbdbd>[Press enter to start typing]"),
                PLAYER_INPUT,
                (int) (getBounds().getX()) + 5
                        + WzFont.getStringWidth(g, Client.getClient().getUsername() + ": "),
                inputTextHeight);

        g.setClip((int) getBounds().getX() + 3, (int) getBounds().getY() + 3, (int) (getBounds()
                .getWidth() - 23), 216);
        int initialY = (int) inputTextHeight - (int) WzFont.getDefaultFontSize() - 7;
        for (int i = 0; i < cbText.size(); i++) {
            drawColoredText(
                    g,
                    "<" + textForColor(colorForChatType(OTHER_PLAYER_NAME)) + ">"
                            + cbText.get(i).getUsername() + ": " + "<"
                            + textForColor(colorForChatType(SHOUT_TEXT)) + ">"
                            + cbText.get(i).getMessage(),
                    cbText.get(i).getType(),
                    (int) (getBounds().getX()) + 5,
                    initialY
                            - (((cbText.size() - i - 1) * getLineHeight()) + (getScrollY() * getLineHeight())));
        }
        g.setClip(0, 0, Main.app.getWidth(), Main.app.getHeight());
    }