@Override
    public void render(int mouseX, int mouseY) {
        drawFadingBox(0, 0, width, height, 1610941696, -1607454624);
        drawCenteredString(fontRenderer, TITLE, width / 2, 20, 16777215);
        if (frozen) {
            drawCenteredString(fontRenderer, "Selecting file...",
                    width / 2 - 100, height / 6 + 120 + 12, 16777215);
        } else {
            String morePacksText = String.format("%s-%s out of %s",
                    1 + page, Math.min(5 + page, texturePacks.size()), texturePacks.size());
            drawCenteredString(fontRenderer, morePacksText, width / 2, height / 6 + 120, 16777215);

            if (status != null) {
                // Show an error message if packs could not be indexed
                drawCenteredString(fontRenderer, status, width / 2, height / 2 - 4, 16777215);
            }

            // Render buttons
            super.render(mouseX, mouseY);

            // Show an indicator (asterisk) for the currently-selected texture pack
            if (minecraft.settings.lastUsedTexturePack != null && texturePacks != null) {
                for (int i = 0; i < PACKS_PER_PAGE; ++i) {
                    if (page + i < texturePacks.size()) {
                        if (minecraft.settings.lastUsedTexturePack.equals(texturePacks.get(page + i).location)) {
                            drawString(fontRenderer, ACTIVE_PACK_INDICATOR,
                                    width / 2 + 100 - fontRenderer.getWidth(ACTIVE_PACK_INDICATOR) - 2,
                                    height / 6 + i * 24 + 2, 16777215);
                            break;
                        }
                    }
                }
            } else {
                // Default texture pack selected.
                drawString(fontRenderer, ACTIVE_PACK_INDICATOR,
                        width / 2 + 100 - fontRenderer.getWidth(ACTIVE_PACK_INDICATOR) - 2,
                        height / 6 + 154 + 2, 16777215);
            }
        }
    }