private void drawTitlebox(boolean loggedIn) { // drawLoginScreen
        resetImageProducers();
        leftCanvas.initDrawingArea();
        titleBox.drawIndexedSprite(0, 0);
        if (loginScreenState == 0) { // Default
            smallFont.drawCenteredText(0x75a9a9, 180, onDemandFetcher.statusString, 180, true);
            boldFont.drawCenteredText(0xffff00, 180, "Welcome to RuneScape", 80, true);
            titleButton.drawIndexedSprite(27, 100);
            boldFont.drawCenteredText(0xffffff, 100, "New User", 125, true);
            titleButton.drawIndexedSprite(187, 100);
            boldFont.drawCenteredText(0xffffff, 260, "Existing User", 125, true);
        }
        if (loginScreenState == 2) { // Existing User
            if (loginMessage1.length() > 0) {
                boldFont.drawCenteredText(0xffff00, 180, loginMessage1, 45, true);
                boldFont.drawCenteredText(0xffff00, 180, loginMessage2, 60, true);
            } else {
                boldFont.drawCenteredText(0xffff00, 180, loginMessage2, 53, true);
            }
            boldFont.drawText(true, 90, 0xffffff, "Username: " + myUsername + (loginScreenCursorPos == 0 & Client.loopCycle % 40 < 20 ? "@yel@|" : ""), 90);
            boldFont.drawText(true, 92, 0xffffff, "Password: " + TextUtil.censorPassword(myPassword) + (loginScreenCursorPos == 1 & Client.loopCycle % 40 < 20 ? "@yel@|" : ""), 105);
            if (!loggedIn) {
                titleButton.drawIndexedSprite(27, 130);
                boldFont.drawCenteredText(0xffffff, 100, "Login", 155, true);
                titleButton.drawIndexedSprite(187, 130);
                boldFont.drawCenteredText(0xffffff, 260, "Cancel", 155, true);
            }
        }
        if (loginScreenState == 3) { // New User
            boldFont.drawCenteredText(0xffff00, 180, "Create a free account", 40, true);
            boldFont.drawCenteredText(0xffffff, 180, "To create a new account you need to", 65, true);
            boldFont.drawCenteredText(0xffffff, 180, "go back to the main RuneScape webpage", 80, true);
            boldFont.drawCenteredText(0xffffff, 180, "and choose the red 'create account'", 95, true);
            boldFont.drawCenteredText(0xffffff, 180, "button at the top right of that page.", 110, true);
            titleButton.drawIndexedSprite(107, 130);
            boldFont.drawCenteredText(0xffffff, 180, "Cancel", 155, true);
        }
        leftCanvas.drawGraphics(171, super.graphics, 202);
        if (welcomeScreenRaised) {
            welcomeScreenRaised = false;
            topLeftCanvas.drawGraphics(0, super.graphics, 128);
            bottomLeftCanvas.drawGraphics(371, super.graphics, 202);
            titleBoxLeftCanvas.drawGraphics(265, super.graphics, 0);
            bottomRightCanvas.drawGraphics(265, super.graphics, 562);
            smallLeftCanvas.drawGraphics(171, super.graphics, 128);
            smallRightCanvas.drawGraphics(171, super.graphics, 562);
        }
    }