@Override
    public void update() {
        super.update();

        if (shouldRender) {
            //make the cursor flash
            long p = registry.getImageLoader().getPeriod();
            cursorTotalTime = (cursorTotalTime
                    + registry.getImageLoader().getPeriod())
                    % (long) (1000 * CURSOR_MAX_TIME * 2);

            if ((cursorTotalTime / (CURSOR_MAX_TIME * 1000)) > 1) {
                cursorTotalTime = 0;
                cursorShow = !cursorShow;
            }

            if (cursorShow) {
                mainArea.setText("> " + consoleText + "_");
            } else {
                mainArea.setText("> " + consoleText);
            }

            if (opening) {
                positionY += ANIMATE_SPEED;
                if (positionY >= 0) {
                    positionY = 0;
                    opening = false;
                }
            }

            if (closing) {
                positionY -= ANIMATE_SPEED;
                if (positionY <= (0 - MAX_HEIGHT)) {
                    positionY = 0 - MAX_HEIGHT;
                    closing = false;
                    shouldRender = false;
                    consoleText = "";
                }
            }
        }
    }