cpw.mods.fml.client.config

## Class GuiConfig

- java.lang.Object
- - net.minecraft.client.gui.Gui
  - - net.minecraft.client.gui.GuiScreen
    - - cpw.mods.fml.client.config.GuiConfig

- Direct Known Subclasses:
    FMLConfigGuiFactory.FMLConfigGuiScreen, ForgeGuiFactory.ForgeConfigGui

      public class GuiConfig
      extends GuiScreen

  This class is the base GuiScreen for all config GUI screens. It can be extended by mods to provide the top-level config screen that will be called when the Config button is clicked from the Main Menu Mods list.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `boolean` | `allRequireMcRestart`
    `boolean` | `allRequireWorldRestart`
    `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.
    `java.lang.String` | `title`
    `java.lang.String` | `titleLine2`

    - ### Fields inherited from class net.minecraft.client.gui.GuiScreen

      `allowUserInput, buttonList, fontRendererObj, height, itemRender, labelList, mc, width`

    - ### Fields inherited from class net.minecraft.client.gui.Gui

      `icons, optionsBackground, statIcons, zLevel`

  - ### Constructor Summary

    Constructors
    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.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `actionPerformed(GuiButton button)`
    `void` | `drawScreen(int mouseX, int mouseY, float partialTicks)`
    `void` | `drawToolTip(java.util.List stringList, int x, int y)`
    `static java.lang.String` | `getAbridgedConfigPath(java.lang.String path)`
    `void` | `initGui()`
    `protected void` | `keyTyped(char eventChar, int eventKey)`
    `protected void` | `mouseClicked(int x, int y, int mouseEvent)`
    `protected void` | `mouseMovedOrUp(int x, int y, int mouseEvent)`
    `void` | `onGuiClosed()`
    `void` | `updateScreen()`

    - ### Methods inherited from class net.minecraft.client.gui.GuiScreen

      `confirmClicked, doesGuiPauseGame, drawBackground, drawCreativeTabHoveringText, drawDefaultBackground, drawHoveringText, drawWorldBackground, func_146283_a, getClipboardString, handleInput, handleKeyboardInput, handleMouseInput, isCtrlKeyDown, isShiftKeyDown, mouseClickMove, renderToolTip, setClipboardString, setWorldAndResolution`

    - ### Methods inherited from class net.minecraft.client.gui.Gui

      `drawCenteredString, drawGradientRect, drawHorizontalLine, drawRect, drawString, drawTexturedModalRect, drawTexturedModelRectFromIcon, drawVerticalLine, func_146110_a`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### parentScreen

          public final GuiScreen parentScreen

      A reference to the screen object that created this. Used for navigating between screens.

    - #### title

          public java.lang.String title

    - #### titleLine2

          public java.lang.String titleLine2

    - #### configElements

          public final java.util.List<IConfigElement> configElements

    - #### initEntries

          public final java.util.List<GuiConfigEntries.IConfigEntry> initEntries

    - #### entryList

          public GuiConfigEntries entryList

    - #### modID

          public final java.lang.String modID

    - #### configID

          public final 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). If not defined, the events will be posted if the parent gui is null or if the parent gui is not an instance of GuiConfig.

    - #### isWorldRunning

          public final boolean isWorldRunning

    - #### allRequireWorldRestart

          public final boolean allRequireWorldRestart

    - #### allRequireMcRestart

          public final boolean allRequireMcRestart

    - #### needsRefresh

          public boolean needsRefresh

  - ### Constructor Detail

    - #### GuiConfig

          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)

      GuiConfig constructor that will use ConfigChangedEvent when editing is concluded. If a non-null value is passed for configID, the OnConfigChanged and PostConfigChanged events will be posted when the Done button is pressed if any configElements were changed (includes child screens). If configID is not defined, the events will be posted if the parent gui is null or if the parent gui is not an instance of GuiConfig.
      Parameters:
        `parentScreen` - the parent GuiScreen object
        `configElements` - a List of IConfigProperty objects
        `areAllPropsHotLoadable` - send true if every property on this screen is able to be modified on the fly while a world is running
        `modID` - the mod ID for the mod whose config settings will be edited
        `configID` - 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 restart
        `title` - the desired title for this screen. For consistency it is recommended that you pass the path of the config file being edited.

    - #### GuiConfig

          public 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. This constructor passes null for configID. If configID is not defined, the events will be posted if the parent gui is null or if the parent gui is not an instance of GuiConfig.
      Parameters:
        `parentScreen` - the parent GuiScreen object
        `configElements` - a List of IConfigProperty objects
        `areAllPropsHotLoadable` - send true if every property on this screen is able to be modified on the fly while a world is running
        `modID` - the mod ID for the mod whose config settings will be edited
        `allRequireWorldRestart` - send true if all configElements on this screen require a world restart
        `title` - the desired title for this screen. For consistency it is recommended that you pass the path of the config file being edited.

    - #### GuiConfig

          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)

      GuiConfig constructor that will use ConfigChangedEvent when editing is concluded. This constructor passes null for configID. If configID is not defined, the events will be posted if the parent gui is null or if the parent gui is not an instance of GuiConfig.
      Parameters:
        `parentScreen` - the parent GuiScreen object
        `configElements` - a List of IConfigProperty objects
        `modID` - the mod ID for the mod whose config settings will be edited
        `allRequireWorldRestart` - send true if all configElements on this screen require a world restart
        `title` - 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.

    - #### GuiConfig

          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)

      GuiConfig constructor that will use ConfigChangedEvent when editing is concluded. titleLine2 is specified in this constructor. If a non-null value is passed for configID, the OnConfigChanged and PostConfigChanged events will be posted when the Done button is pressed if any configElements were changed (includes child screens). If configID is not defined, the events will be posted if the parent gui is null or if the parent gui is not an instance of GuiConfig.
      Parameters:
        `parentScreen` - the parent GuiScreen object
        `configElements` - a List of IConfigProperty objects
        `modID` - the mod ID for the mod whose config settings will be edited
        `configID` - an identifier that will be passed to the OnConfigChanged and PostConfigChanged events
        `allRequireWorldRestart` - send true if all configElements on this screen require a world restart
        `title` - 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.

  - ### Method Detail

    - #### getAbridgedConfigPath

          public static java.lang.String getAbridgedConfigPath(java.lang.String path)

    - #### initGui

          public void initGui()

      Overrides:
        `initGui` in class `GuiScreen`

    - #### onGuiClosed

          public void onGuiClosed()

      Overrides:
        `onGuiClosed` in class `GuiScreen`

    - #### actionPerformed

          protected void actionPerformed(GuiButton button)

      Overrides:
        `actionPerformed` in class `GuiScreen`

    - #### mouseClicked

          protected void mouseClicked(int x,
                          int y,
                          int mouseEvent)

      Overrides:
        `mouseClicked` in class `GuiScreen`

    - #### mouseMovedOrUp

          protected void mouseMovedOrUp(int x,
                            int y,
                            int mouseEvent)

      Overrides:
        `mouseMovedOrUp` in class `GuiScreen`

    - #### keyTyped

          protected void keyTyped(char eventChar,
                      int eventKey)

      Overrides:
        `keyTyped` in class `GuiScreen`

    - #### updateScreen

          public void updateScreen()

      Overrides:
        `updateScreen` in class `GuiScreen`

    - #### drawScreen

          public void drawScreen(int mouseX,
                        int mouseY,
                        float partialTicks)

      Overrides:
        `drawScreen` in class `GuiScreen`

    - #### drawToolTip

          public void drawToolTip(java.util.List stringList,
                         int x,
                         int y)