package client.gui.options;

import client.gui.Gui;
import client.gui.GuiMenu;
import client.gui.element.NavButton;

public abstract class GuiOptions extends Gui {
	private static final GuiOptions[] PAGES = {lastPage = new GuiBinds(), new GuiStyle(), new GuiDisplay(), new GuiSound(), new GuiGraphics()};
	
	private static GuiOptions lastPage;
	
	public static GuiOptions getPage() {
		return lastPage;
	}
	
	public void init(int width, int height) {
		lastPage = this;
		this.shift();
		for(int z = 0; z < PAGES.length; z++) {
			GuiOptions gui = PAGES[z];
			this.add(new NavButton(z % 2 == 1 ? width - 212 : 2, 2 + 20 * (z / 2), 210, 0, gui, gui.getTitle()));
		}
		this.add(new NavButton((width - 280) / 2, height - 20, 280, 0, GuiMenu.INSTANCE, "Zurück"));
	}
}
