public class GuiConfig extends GuiScreen
Modifier and Type | Field and Description |
---|---|
boolean |
allRequireMcRestart |
boolean |
allRequireWorldRestart |
protected GuiButtonExt |
btnDefaultAll |
protected GuiButtonExt |
btnUndoAll |
protected HoverChecker |
checkBoxHoverChecker |
protected GuiCheckBox |
chkApplyGlobally |
java.util.List<IConfigElement> |
configElements |
java.lang.String |
configID
When set to a non-null value the OnConfigChanged and PostConfigChanged events will be posted when the Done button is pressed
if any configElements were changed (includes child screens).
|
GuiConfigEntries |
entryList |
java.util.List<GuiConfigEntries.IConfigEntry> |
initEntries |
boolean |
isWorldRunning |
java.lang.String |
modID |
boolean |
needsRefresh |
GuiScreen |
parentScreen
A reference to the screen object that created this.
|
protected HoverChecker |
resetHoverChecker |
java.lang.String |
title |
java.lang.String |
titleLine2 |
protected HoverChecker |
undoHoverChecker |
allowUserInput, buttonList, fontRendererObj, height, itemRender, labelList, mc, width
ICONS, OPTIONS_BACKGROUND, STAT_ICONS, zLevel
Constructor and Description |
---|
GuiConfig(GuiScreen parentScreen,
java.util.List<IConfigElement> configElements,
java.lang.String modID,
boolean allRequireWorldRestart,
boolean allRequireMcRestart,
java.lang.String title)
GuiConfig constructor that will use ConfigChangedEvent when editing is concluded.
|
GuiConfig(GuiScreen parentScreen,
java.util.List<IConfigElement> configElements,
java.lang.String modID,
boolean allRequireWorldRestart,
boolean allRequireMcRestart,
java.lang.String title,
java.lang.String titleLine2)
GuiConfig constructor that will use ConfigChangedEvent when editing is concluded.
|
GuiConfig(GuiScreen parentScreen,
java.util.List<IConfigElement> configElements,
java.lang.String modID,
java.lang.String configID,
boolean allRequireWorldRestart,
boolean allRequireMcRestart,
java.lang.String title)
GuiConfig constructor that will use ConfigChangedEvent when editing is concluded.
|
GuiConfig(GuiScreen parentScreen,
java.util.List<IConfigElement> configElements,
java.lang.String modID,
java.lang.String configID,
boolean allRequireWorldRestart,
boolean allRequireMcRestart,
java.lang.String title,
java.lang.String titleLine2)
GuiConfig constructor that will use ConfigChangedEvent when editing is concluded. titleLine2 is specified in this constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
actionPerformed(GuiButton button) |
void |
drawScreen(int mouseX,
int mouseY,
float partialTicks) |
void |
drawToolTip(java.util.List<java.lang.String> stringList,
int x,
int y) |
static java.lang.String |
getAbridgedConfigPath(java.lang.String path) |
void |
handleMouseInput() |
void |
initGui() |
protected void |
keyTyped(char eventChar,
int eventKey) |
protected void |
mouseClicked(int x,
int y,
int mouseEvent) |
protected void |
mouseReleased(int x,
int y,
int mouseEvent) |
void |
onGuiClosed() |
void |
updateScreen() |
confirmClicked, doesGuiPauseGame, drawBackground, drawCreativeTabHoveringText, drawDefaultBackground, drawHoveringText, drawHoveringText, drawWorldBackground, getClipboardString, handleComponentClick, handleComponentHover, handleInput, handleKeyboardInput, isAltKeyDown, isCtrlKeyDown, isKeyComboCtrlA, isKeyComboCtrlC, isKeyComboCtrlV, isKeyComboCtrlX, isShiftKeyDown, mouseClickMove, onResize, renderToolTip, sendChatMessage, sendChatMessage, setClipboardString, setGuiSize, setText, setWorldAndResolution
drawCenteredString, drawGradientRect, drawHorizontalLine, drawModalRectWithCustomSizedTexture, drawRect, drawScaledCustomSizeModalRect, drawString, drawTexturedModalRect, drawTexturedModalRect, drawTexturedModalRect, drawVerticalLine
public final GuiScreen parentScreen
public java.lang.String title
public java.lang.String titleLine2
public final java.util.List<IConfigElement> configElements
public final java.util.List<GuiConfigEntries.IConfigEntry> initEntries
public GuiConfigEntries entryList
protected GuiButtonExt btnDefaultAll
protected GuiButtonExt btnUndoAll
protected GuiCheckBox chkApplyGlobally
public final java.lang.String modID
public final java.lang.String configID
public final boolean isWorldRunning
public final boolean allRequireWorldRestart
public final boolean allRequireMcRestart
public boolean needsRefresh
protected HoverChecker undoHoverChecker
protected HoverChecker resetHoverChecker
protected HoverChecker checkBoxHoverChecker
public GuiConfig(GuiScreen parentScreen, java.util.List<IConfigElement> configElements, java.lang.String modID, java.lang.String configID, boolean allRequireWorldRestart, boolean allRequireMcRestart, java.lang.String title)
parentScreen
- the parent GuiScreen objectconfigElements
- a List of IConfigElement objectsmodID
- the mod ID for the mod whose config settings will be editedconfigID
- an identifier that will be passed to the OnConfigChanged and PostConfigChanged events. Setting this value will force
the save action to be called when the Done button is pressed on this screen if any configElements were changed.allRequireWorldRestart
- send true if all configElements on this screen require a world restartallRequireMcRestart
- send true if all configElements on this screen require MC to be restartedtitle
- the desired title for this screen. For consistency it is recommended that you pass the path of the config file being
edited.public GuiConfig(GuiScreen parentScreen, java.util.List<IConfigElement> configElements, java.lang.String modID, boolean allRequireWorldRestart, boolean allRequireMcRestart, java.lang.String title)
parentScreen
- the parent GuiScreen objectconfigElements
- a List of IConfigElement objectsmodID
- the mod ID for the mod whose config settings will be editedallRequireWorldRestart
- send true if all configElements on this screen require a world restartallRequireMcRestart
- send true if all configElements on this screen require MC to be restartedtitle
- the desired title for this screen. For consistency it is recommended that you pass the path of the config file being
edited.public GuiConfig(GuiScreen parentScreen, java.util.List<IConfigElement> configElements, java.lang.String modID, boolean allRequireWorldRestart, boolean allRequireMcRestart, java.lang.String title, java.lang.String titleLine2)
parentScreen
- the parent GuiScreen objectconfigElements
- a List of IConfigElement objectsmodID
- the mod ID for the mod whose config settings will be editedallRequireWorldRestart
- send true if all configElements on this screen require a world restartallRequireMcRestart
- send true if all configElements on this screen require MC to be restartedtitle
- the desired title for this screen. For consistency it is recommended that you pass the path of the config file being
edited.titleLine2
- the desired title second line for this screen. Typically this is used to send the category name of the category
currently being edited.public GuiConfig(GuiScreen parentScreen, java.util.List<IConfigElement> configElements, java.lang.String modID, java.lang.String configID, boolean allRequireWorldRestart, boolean allRequireMcRestart, java.lang.String title, java.lang.String titleLine2)
parentScreen
- the parent GuiScreen objectconfigElements
- a List of IConfigElement objectsmodID
- the mod ID for the mod whose config settings will be editedconfigID
- an identifier that will be passed to the OnConfigChanged and PostConfigChanged eventsallRequireWorldRestart
- send true if all configElements on this screen require a world restartallRequireMcRestart
- send true if all configElements on this screen require MC to be restartedtitle
- the desired title for this screen. For consistency it is recommended that you pass the path of the config file being
edited.titleLine2
- the desired title second line for this screen. Typically this is used to send the category name of the category
currently being edited.public static java.lang.String getAbridgedConfigPath(java.lang.String path)
public void onGuiClosed()
onGuiClosed
in class GuiScreen
protected void actionPerformed(GuiButton button)
actionPerformed
in class GuiScreen
public void handleMouseInput() throws java.io.IOException
handleMouseInput
in class GuiScreen
java.io.IOException
protected void mouseClicked(int x, int y, int mouseEvent) throws java.io.IOException
mouseClicked
in class GuiScreen
java.io.IOException
protected void mouseReleased(int x, int y, int mouseEvent)
mouseReleased
in class GuiScreen
protected void keyTyped(char eventChar, int eventKey)
public void updateScreen()
updateScreen
in class GuiScreen
public void drawScreen(int mouseX, int mouseY, float partialTicks)
drawScreen
in class GuiScreen
public void drawToolTip(java.util.List<java.lang.String> stringList, int x, int y)