cpw.mods.fml.client.config

## Class GuiConfigEntries.ButtonEntry

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

- All Implemented Interfaces:
    GuiConfigEntries.IConfigEntry, GuiListExtended.IGuiListEntry
  Direct Known Subclasses:
    GuiConfigEntries.ArrayEntry, GuiConfigEntries.BooleanEntry, GuiConfigEntries.CycleValueEntry, GuiConfigEntries.SelectValueEntry
  Enclosing class:
    GuiConfigEntries

      public abstract static class GuiConfigEntries.ButtonEntry
      extends GuiConfigEntries.ListEntryBase

  ButtonEntry Provides a basic GuiButton entry to be used as a base for other entries that require a button for the value.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected GuiButtonExt` | `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`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GuiConfigEntries.ButtonEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement<?> configElement)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, Tessellator tessellator, int mouseX, int mouseY, boolean isSelected)`
    `void` | `keyTyped(char eventChar, int eventKey)` Handles user keystrokes for any GuiTextField objects in this entry.
    `void` | `mouseClicked(int x, int y, int mouseEvent)` Call `GuiTextField.mouseClicked()` for and GuiTextField objects in this entry.
    `boolean` | `mousePressed(int index, int x, int y, int mouseEvent, int relativeX, int relativeY)` Returns true if the mouse has been pressed on this control.
    `void` | `mouseReleased(int index, int x, int y, int mouseEvent, int relativeX, int relativeY)` Fired when the mouse button is released.
    `void` | `updateCursorCounter()` Call `GuiTextField.updateCursorCounter()` for any GuiTextField objects in this entry.
    `abstract void` | `updateValueButtonText()` Updates the displayString of the value button.
    `abstract void` | `valueButtonPressed(int slotIndex)` Called when the value button has been clicked.

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

      `drawToolTip, enabled, getConfigElement, getCurrentValue, getCurrentValues, getEntryRightBound, getLabelWidth, getName, isChanged, isDefault, onGuiClosed, saveConfigElement, setToDefault, undoChanges`

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

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

- - ### Field Detail

    - #### btnValue

          protected final GuiButtonExt btnValue

  - ### Constructor Detail

    - #### GuiConfigEntries.ButtonEntry

          public GuiConfigEntries.ButtonEntry(GuiConfig owningScreen,
                                      GuiConfigEntries owningEntryList,
                                      IConfigElement<?> configElement)

  - ### Method Detail

    - #### updateValueButtonText

          public abstract void updateValueButtonText()

      Updates the displayString of the value button.

    - #### valueButtonPressed

          public abstract void valueButtonPressed(int slotIndex)

      Called when the value button has been clicked.

    - #### drawEntry

          public void drawEntry(int slotIndex,
                       int x,
                       int y,
                       int listWidth,
                       int slotHeight,
                       Tessellator tessellator,
                       int mouseX,
                       int mouseY,
                       boolean isSelected)

      Specified by:
        `drawEntry` in interface `GuiListExtended.IGuiListEntry`
      Overrides:
        `drawEntry` in class `GuiConfigEntries.ListEntryBase`

    - #### mousePressed

          public boolean mousePressed(int index,
                             int x,
                             int y,
                             int mouseEvent,
                             int relativeX,
                             int relativeY)

      Returns true if the mouse has been pressed on this control.
      Specified by:
        `mousePressed` in interface `GuiListExtended.IGuiListEntry`
      Overrides:
        `mousePressed` in class `GuiConfigEntries.ListEntryBase`

    - #### mouseReleased

          public void mouseReleased(int index,
                           int x,
                           int y,
                           int mouseEvent,
                           int relativeX,
                           int relativeY)

      Fired when the mouse button is released. Arguments: index, x, y, mouseEvent, relativeX, relativeY
      Specified by:
        `mouseReleased` in interface `GuiListExtended.IGuiListEntry`
      Overrides:
        `mouseReleased` in class `GuiConfigEntries.ListEntryBase`

    - #### keyTyped

          public void keyTyped(char eventChar,
                      int eventKey)

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Handles user keystrokes for any GuiTextField objects in this entry. Call `GuiTextField.keyTyped()` for any GuiTextField objects that should receive the input provided.
      Specified by:
        `keyTyped` in interface `GuiConfigEntries.IConfigEntry`
      Specified by:
        `keyTyped` in class `GuiConfigEntries.ListEntryBase`

    - #### updateCursorCounter

          public void updateCursorCounter()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Call `GuiTextField.updateCursorCounter()` for any GuiTextField objects in this entry.
      Specified by:
        `updateCursorCounter` in interface `GuiConfigEntries.IConfigEntry`
      Specified by:
        `updateCursorCounter` in class `GuiConfigEntries.ListEntryBase`

    - #### mouseClicked

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

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Call `GuiTextField.mouseClicked()` for and GuiTextField objects in this entry.
      Specified by:
        `mouseClicked` in interface `GuiConfigEntries.IConfigEntry`
      Specified by:
        `mouseClicked` in class `GuiConfigEntries.ListEntryBase`