public abstract static class GuiConfigEntries.ListEntryBase extends java.lang.Object implements GuiConfigEntries.IConfigEntry
Modifier and Type | Field and Description |
---|---|
protected GuiButtonExt |
btnDefault |
protected GuiButtonExt |
btnUndoChanges |
protected IConfigElement |
configElement |
protected HoverChecker |
defaultHoverChecker |
protected java.util.List<java.lang.String> |
defaultToolTip |
protected boolean |
drawLabel |
protected boolean |
isValidValue |
protected Minecraft |
mc |
protected java.lang.String |
name |
protected GuiConfigEntries |
owningEntryList |
protected GuiConfig |
owningScreen |
protected java.util.List<java.lang.String> |
toolTip |
protected HoverChecker |
tooltipHoverChecker |
protected HoverChecker |
undoHoverChecker |
protected java.util.List<java.lang.String> |
undoToolTip |
Constructor and Description |
---|
ListEntryBase(GuiConfig owningScreen,
GuiConfigEntries owningEntryList,
IConfigElement configElement) |
Modifier and Type | Method and Description |
---|---|
void |
drawEntry(int slotIndex,
int x,
int y,
int listWidth,
int slotHeight,
int mouseX,
int mouseY,
boolean isSelected,
float partial) |
void |
drawToolTip(int mouseX,
int mouseY)
Handles drawing any tooltips that apply to this entry.
|
boolean |
enabled()
Is this list entry enabled?
|
IConfigElement |
getConfigElement()
Gets the IConfigElement object owned by this entry.
|
abstract java.lang.Object |
getCurrentValue()
Gets the current value of this entry.
|
abstract java.lang.Object[] |
getCurrentValues()
Gets the current values of this list entry.
|
int |
getEntryRightBound()
Gets this entry's right-hand x boundary.
|
int |
getLabelWidth()
Gets this entry's label width.
|
java.lang.String |
getName()
Gets the name of the ConfigElement owned by this entry.
|
abstract boolean |
isChanged()
Has the value of this entry changed?
|
abstract 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.
|
abstract void |
keyTyped(char eventChar,
int eventKey)
Handles user keystrokes for any GuiTextField objects in this entry.
|
abstract void |
mouseClicked(int x,
int y,
int mouseEvent)
Call
GuiTextField.mouseClicked(int, int, int) for and GuiTextField objects in this entry. |
boolean |
mousePressed(int index,
int x,
int y,
int mouseEvent,
int relativeX,
int relativeY) |
void |
mouseReleased(int index,
int x,
int y,
int mouseEvent,
int relativeX,
int relativeY) |
void |
onGuiClosed()
This method is called when the parent GUI is closed.
|
abstract boolean |
saveConfigElement()
Handles saving any changes that have been made to this entry back to the underlying object.
|
abstract void |
setToDefault()
Sets this entry's value to the default value.
|
abstract void |
undoChanges()
Handles reverting any changes that have occurred to this entry.
|
abstract void |
updateCursorCounter()
Call
GuiTextField.updateCursorCounter() for any GuiTextField objects in this entry. |
void |
updatePosition(int p_178011_1_,
int p_178011_2_,
int p_178011_3_,
float partial) |
protected final GuiConfig owningScreen
protected final GuiConfigEntries owningEntryList
protected final IConfigElement configElement
protected final Minecraft mc
protected final java.lang.String name
protected final GuiButtonExt btnUndoChanges
protected final GuiButtonExt btnDefault
protected java.util.List<java.lang.String> toolTip
protected java.util.List<java.lang.String> undoToolTip
protected java.util.List<java.lang.String> defaultToolTip
protected boolean isValidValue
protected HoverChecker tooltipHoverChecker
protected HoverChecker undoHoverChecker
protected HoverChecker defaultHoverChecker
protected boolean drawLabel
public ListEntryBase(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
drawEntry
in interface GuiListExtended.IGuiListEntry
public void drawToolTip(int mouseX, int mouseY)
GuiConfigEntries.IConfigEntry
drawToolTip
in interface GuiConfigEntries.IConfigEntry
public boolean mousePressed(int index, int x, int y, int mouseEvent, int relativeX, int relativeY)
mousePressed
in interface GuiListExtended.IGuiListEntry
public void mouseReleased(int index, int x, int y, int mouseEvent, int relativeX, int relativeY)
mouseReleased
in interface GuiListExtended.IGuiListEntry
public abstract boolean isDefault()
GuiConfigEntries.IConfigEntry
isDefault
in interface GuiConfigEntries.IConfigEntry
public abstract void setToDefault()
GuiConfigEntries.IConfigEntry
setToDefault
in interface GuiConfigEntries.IConfigEntry
public abstract void keyTyped(char eventChar, int eventKey)
GuiConfigEntries.IConfigEntry
GuiTextField.textboxKeyTyped(char, int)
for any GuiTextField
objects that should receive the input provided.keyTyped
in interface GuiConfigEntries.IConfigEntry
public abstract void updateCursorCounter()
GuiConfigEntries.IConfigEntry
GuiTextField.updateCursorCounter()
for any GuiTextField objects in this entry.updateCursorCounter
in interface GuiConfigEntries.IConfigEntry
public abstract void mouseClicked(int x, int y, int mouseEvent)
GuiConfigEntries.IConfigEntry
GuiTextField.mouseClicked(int, int, int)
for and GuiTextField objects in this entry.mouseClicked
in interface GuiConfigEntries.IConfigEntry
public abstract boolean isChanged()
GuiConfigEntries.IConfigEntry
isChanged
in interface GuiConfigEntries.IConfigEntry
public abstract void undoChanges()
GuiConfigEntries.IConfigEntry
undoChanges
in interface GuiConfigEntries.IConfigEntry
public abstract boolean saveConfigElement()
GuiConfigEntries.IConfigEntry
saveConfigElement
in interface GuiConfigEntries.IConfigEntry
public void updatePosition(int p_178011_1_, int p_178011_2_, int p_178011_3_, float partial)
updatePosition
in interface GuiListExtended.IGuiListEntry
public boolean enabled()
GuiConfigEntries.IConfigEntry
enabled
in interface GuiConfigEntries.IConfigEntry
public int getLabelWidth()
GuiConfigEntries.IConfigEntry
getLabelWidth
in interface GuiConfigEntries.IConfigEntry
public int getEntryRightBound()
GuiConfigEntries.IConfigEntry
getEntryRightBound
in interface GuiConfigEntries.IConfigEntry
public IConfigElement getConfigElement()
GuiConfigEntries.IConfigEntry
getConfigElement
in interface GuiConfigEntries.IConfigEntry
public java.lang.String getName()
GuiConfigEntries.IConfigEntry
getName
in interface GuiConfigEntries.IConfigEntry
public abstract java.lang.Object getCurrentValue()
GuiConfigEntries.IConfigEntry
getCurrentValue
in interface GuiConfigEntries.IConfigEntry
public abstract java.lang.Object[] getCurrentValues()
GuiConfigEntries.IConfigEntry
getCurrentValues
in interface GuiConfigEntries.IConfigEntry
public void onGuiClosed()
GuiConfigEntries.IConfigEntry
onGuiClosed
in interface GuiConfigEntries.IConfigEntry