Files
waila/mcp/mobius/waila/gui/GuiBaseConfigScreen.java
T
Thomas Guimbretiere db75285bc5 Import cleanup
Eclipse source cleanup is NOT RECURSIVE !
2013-06-15 16:50:14 +02:00

42 lines
1.2 KiB
Java

package mcp.mobius.waila.gui;
import mcp.mobius.waila.gui.widget.Button2States;
import mcp.mobius.waila.gui.widget.ButtonChangeScreen;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
public class GuiBaseConfigScreen extends GuiScreen {
protected GuiScreen parentGui; // GUI we will return to in the case we are call from a GUI
public GuiBaseConfigScreen(GuiScreen _parentGui) {
this.parentGui = _parentGui;
}
@Override
/* Here we draw anything special, and super takes care of the buttons for us */
public void drawScreen(int i, int j, float f)
{
drawDefaultBackground();
super.drawScreen(i, j, f);
}
@Override
/* Here we handle key presses. Super will just close the gui on ESC, and we like it like that */
public void keyTyped(char keyChar, int keyID)
{
super.keyTyped(keyChar, keyID);
}
@Override
protected void actionPerformed(GuiButton guibutton)
{
if (guibutton instanceof ButtonChangeScreen)
((ButtonChangeScreen)guibutton).pressButton();
else if (guibutton instanceof Button2States)
((Button2States)guibutton).pressButton();
}
}