cpw.mods.fml.client.config

## Class GuiConfigEntries.BooleanEntry

- java.lang.Object
- - cpw.mods.fml.client.config.GuiConfigEntries.ListEntryBase
  - - cpw.mods.fml.client.config.GuiConfigEntries.ButtonEntry
    - - cpw.mods.fml.client.config.GuiConfigEntries.BooleanEntry

- All Implemented Interfaces:
    GuiConfigEntries.IConfigEntry, GuiListExtended.IGuiListEntry
  Enclosing class:
    GuiConfigEntries

      public static class GuiConfigEntries.BooleanEntry
      extends GuiConfigEntries.ButtonEntry

  BooleanPropEntry Provides a GuiButton that toggles between true and false.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `beforeValue`
    `protected boolean` | `currentValue`

    - ### Fields inherited from class cpw.mods.fml.client.config.GuiConfigEntries.ButtonEntry

      `btnValue`

    - ### Fields inherited from class cpw.mods.fml.client.config.GuiConfigEntries.ListEntryBase

      `btnDefault, btnUndoChanges, configElement, defaultHoverChecker, defaultToolTip, drawLabel, isValidValue, mc, name, owningEntryList, owningScreen, toolTip, tooltipHoverChecker, undoHoverChecker, undoToolTip`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Boolean` | `getCurrentValue()` Gets the current value of this entry as a String.
    `java.lang.Boolean[]` | `getCurrentValues()` Gets the current values of this list entry as a String[].
    `boolean` | `isChanged()` Has the value of this entry changed?
    `boolean` | `isDefault()` Is this entry's value equal to the default value? Generally true should be returned if this entry is not a property or category entry.
    `boolean` | `saveConfigElement()` Handles saving any changes that have been made to this entry back to the underlying object.
    `void` | `setToDefault()` Sets this entry's value to the default value.
    `void` | `undoChanges()` Handles reverting any changes that have occurred to this entry.
    `void` | `updateValueButtonText()` Updates the displayString of the value button.
    `void` | `valueButtonPressed(int slotIndex)` Called when the value button has been clicked.

    - ### Methods inherited from class cpw.mods.fml.client.config.GuiConfigEntries.ButtonEntry

      `drawEntry, keyTyped, mouseClicked, mousePressed, mouseReleased, updateCursorCounter`

    - ### Methods inherited from class cpw.mods.fml.client.config.GuiConfigEntries.ListEntryBase

      `drawToolTip, enabled, getConfigElement, getEntryRightBound, getLabelWidth, getName, onGuiClosed`

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

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

- - ### Field Detail

    - #### beforeValue

          protected final boolean beforeValue

    - #### currentValue

          protected boolean currentValue

  - ### Method Detail

    - #### updateValueButtonText

          public void updateValueButtonText()

      Description copied from class: `GuiConfigEntries.ButtonEntry`
      Updates the displayString of the value button.
      Specified by:
        `updateValueButtonText` in class `GuiConfigEntries.ButtonEntry`

    - #### valueButtonPressed

          public void valueButtonPressed(int slotIndex)

      Description copied from class: `GuiConfigEntries.ButtonEntry`
      Called when the value button has been clicked.
      Specified by:
        `valueButtonPressed` in class `GuiConfigEntries.ButtonEntry`

    - #### isDefault

          public boolean isDefault()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Is this entry's value equal to the default value? Generally true should be returned if this entry is not a property or category entry.
      Specified by:
        `isDefault` in interface `GuiConfigEntries.IConfigEntry`
      Specified by:
        `isDefault` in class `GuiConfigEntries.ListEntryBase`
      Returns:
        true if this entry's value is equal to this entry's default value.

    - #### setToDefault

          public void setToDefault()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Sets this entry's value to the default value.
      Specified by:
        `setToDefault` in interface `GuiConfigEntries.IConfigEntry`
      Specified by:
        `setToDefault` in class `GuiConfigEntries.ListEntryBase`

    - #### isChanged

          public boolean isChanged()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Has the value of this entry changed?
      Specified by:
        `isChanged` in interface `GuiConfigEntries.IConfigEntry`
      Specified by:
        `isChanged` in class `GuiConfigEntries.ListEntryBase`
      Returns:
        true if changes have been made to this entry's value, false otherwise.

    - #### undoChanges

          public void undoChanges()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Handles reverting any changes that have occurred to this entry.
      Specified by:
        `undoChanges` in interface `GuiConfigEntries.IConfigEntry`
      Specified by:
        `undoChanges` in class `GuiConfigEntries.ListEntryBase`

    - #### saveConfigElement

          public boolean saveConfigElement()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Handles saving any changes that have been made to this entry back to the underlying object. It is a good practice to check isChanged() before performing the save action. This method should return true if the element has changed AND REQUIRES A RESTART.
      Specified by:
        `saveConfigElement` in interface `GuiConfigEntries.IConfigEntry`
      Specified by:
        `saveConfigElement` in class `GuiConfigEntries.ListEntryBase`

    - #### getCurrentValue

          public java.lang.Boolean getCurrentValue()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Gets the current value of this entry as a String.
      Specified by:
        `getCurrentValue` in interface `GuiConfigEntries.IConfigEntry`
      Specified by:
        `getCurrentValue` in class `GuiConfigEntries.ListEntryBase`

    - #### getCurrentValues

          public java.lang.Boolean[] getCurrentValues()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Gets the current values of this list entry as a String[].
      Specified by:
        `getCurrentValues` in interface `GuiConfigEntries.IConfigEntry`
      Specified by:
        `getCurrentValues` in class `GuiConfigEntries.ListEntryBase`