public static class GuiConfigEntries.SelectValueEntry extends GuiConfigEntries.ButtonEntry
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
beforeValue |
protected java.lang.Object |
currentValue |
protected java.util.Map<java.lang.Object,java.lang.String> |
selectableValues |
btnValue
btnDefault, btnUndoChanges, configElement, defaultHoverChecker, defaultToolTip, drawLabel, isValidValue, mc, name, owningEntryList, owningScreen, toolTip, tooltipHoverChecker, undoHoverChecker, undoToolTip
Constructor and Description |
---|
SelectValueEntry(GuiConfig owningScreen,
GuiConfigEntries owningEntryList,
IConfigElement configElement,
java.util.Map<java.lang.Object,java.lang.String> selectableValues) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCurrentValue()
Gets the current value of this entry.
|
java.lang.String[] |
getCurrentValues()
Gets the current values of this list entry.
|
boolean |
isChanged()
Has the value of this entry changed?
|
boolean |
isDefault()
Is this entry's value equal to the default value?
|
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 |
setValueFromChildScreen(java.lang.Object newValue) |
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.
|
drawEntry, keyTyped, mouseClicked, mousePressed, mouseReleased, updateCursorCounter
drawToolTip, enabled, getConfigElement, getEntryRightBound, getLabelWidth, getName, onGuiClosed, setSelected
protected final java.lang.String beforeValue
protected java.lang.Object currentValue
protected java.util.Map<java.lang.Object,java.lang.String> selectableValues
public SelectValueEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement, java.util.Map<java.lang.Object,java.lang.String> selectableValues)
public void updateValueButtonText()
GuiConfigEntries.ButtonEntry
updateValueButtonText
in class GuiConfigEntries.ButtonEntry
public void valueButtonPressed(int slotIndex)
GuiConfigEntries.ButtonEntry
valueButtonPressed
in class GuiConfigEntries.ButtonEntry
public void setValueFromChildScreen(java.lang.Object newValue)
public boolean isDefault()
GuiConfigEntries.IConfigEntry
isDefault
in interface GuiConfigEntries.IConfigEntry
isDefault
in class GuiConfigEntries.ListEntryBase
public void setToDefault()
GuiConfigEntries.IConfigEntry
setToDefault
in interface GuiConfigEntries.IConfigEntry
setToDefault
in class GuiConfigEntries.ListEntryBase
public boolean isChanged()
GuiConfigEntries.IConfigEntry
isChanged
in interface GuiConfigEntries.IConfigEntry
isChanged
in class GuiConfigEntries.ListEntryBase
public void undoChanges()
GuiConfigEntries.IConfigEntry
undoChanges
in interface GuiConfigEntries.IConfigEntry
undoChanges
in class GuiConfigEntries.ListEntryBase
public boolean saveConfigElement()
GuiConfigEntries.IConfigEntry
saveConfigElement
in interface GuiConfigEntries.IConfigEntry
saveConfigElement
in class GuiConfigEntries.ListEntryBase
public java.lang.String getCurrentValue()
GuiConfigEntries.IConfigEntry
getCurrentValue
in interface GuiConfigEntries.IConfigEntry
getCurrentValue
in class GuiConfigEntries.ListEntryBase
public java.lang.String[] getCurrentValues()
GuiConfigEntries.IConfigEntry
getCurrentValues
in interface GuiConfigEntries.IConfigEntry
getCurrentValues
in class GuiConfigEntries.ListEntryBase