@Override
    public void render(Graphics2D g2d, int width, int height) {
	drawBackground(g2d, width, height);

	Font f = Client.instance.translation.font.deriveFont(Font.BOLD, 80F);
	g2d.setFont(f);
	String title = Client.instance.translation.translate("gui.options" + (section != Section.MAIN ? "." + section.name().toLowerCase() : ""));
	Rectangle2D bounds = g2d.getFontMetrics().getStringBounds(title, g2d);
	int titleX = (int) (width / 2 - bounds.getCenterX());
	int titleY = (int) (80 + bounds.getMaxY());
	g2d.setColor(Color.WHITE);
	g2d.drawString(title, titleX, titleY);

	int buttonWidth = width - width / 4;
	int buttonHeight = height / 10;
	int buttonSpacing = buttonHeight / 4;
	int topMargin = 150;
	int leftMargin = width / 2 - buttonWidth / 2;
	int buttonWidthSmall = (buttonWidth - buttonSpacing) / 2;
	backButton.setX(leftMargin);
	backButton.setY(height - buttonSpacing - buttonHeight);
	backButton.setWidth(buttonWidth);
	backButton.setHeight(buttonHeight);

	if (section == Section.MAIN) {
	    videoButton.setX(leftMargin);
	    videoButton.setY(topMargin);
	    videoButton.setWidth(buttonWidthSmall);
	    videoButton.setHeight(buttonHeight);
	    languageButton.setX(leftMargin + buttonWidthSmall + buttonSpacing);
	    languageButton.setY(topMargin);
	    languageButton.setWidth(buttonWidthSmall);
	    languageButton.setHeight(buttonHeight);
	    gameButton.setX(leftMargin);
	    gameButton.setY(topMargin + buttonHeight + buttonSpacing);
	    gameButton.setWidth(buttonWidthSmall);
	    gameButton.setHeight(buttonHeight);
	} else if (section == Section.VIDEO) {
	    videoVsyncButton.setX(leftMargin);
	    videoVsyncButton.setY(topMargin);
	    videoVsyncButton.setWidth(buttonWidthSmall);
	    videoVsyncButton.setHeight(buttonHeight);
	    videoFullscreenButton.setX(leftMargin + buttonWidthSmall + buttonSpacing);
	    videoFullscreenButton.setY(topMargin);
	    videoFullscreenButton.setWidth(buttonWidthSmall);
	    videoFullscreenButton.setHeight(buttonHeight);
	} else if (section == Section.LANGUAGE) {
	    int i = 0;
	    for (GuiButton b : languageButtons) {
		b.setX(leftMargin);
		b.setY(topMargin + (i++) * (buttonHeight + buttonSpacing));
		b.setWidth(buttonWidth);
		b.setHeight(buttonHeight);
	    }
	} else if (section == Section.GAME) {
	    gameArrowButton.setX(leftMargin);
	    gameArrowButton.setY(topMargin);
	    gameArrowButton.setWidth(buttonWidthSmall);
	    gameArrowButton.setHeight(buttonHeight);
	    gameZoomButton.setX(leftMargin + buttonWidthSmall + buttonSpacing);
	    gameZoomButton.setY(topMargin);
	    gameZoomButton.setWidth(buttonWidthSmall);
	    gameZoomButton.setHeight(buttonHeight);
	} else if (section == Section.ARROWS) {
	    int i = 0;
	    for (GuiButton b : arrowButtons) {
		b.setX((int) (width / 2 - buttonHeight * 2 - buttonSpacing * 7.5 + (i % 4) * (buttonHeight + buttonSpacing * 5)));
		b.setY(topMargin + (i / 4) * (buttonHeight + buttonSpacing * 5));
		b.setWidth(buttonHeight);
		b.setHeight(buttonHeight);
		i++;
	    }
	}
	super.render(g2d, width, height);
    }