Package xyz.gmitch215.socketmc.screen.ui
Class LockButton
java.lang.Object
xyz.gmitch215.socketmc.screen.ui.AbstractWidget
xyz.gmitch215.socketmc.screen.ui.AbstractTextWidget
xyz.gmitch215.socketmc.screen.ui.AbstractButton
xyz.gmitch215.socketmc.screen.ui.LockButton
- All Implemented Interfaces:
Serializable,LayoutElement,Positionable
Represents a Button with a Lock Icon. Used as the button to Lock the Difficulty in Singleplayer.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe width and height of the button.static final StringThe translation key for the button's narration message.Fields inherited from class xyz.gmitch215.socketmc.screen.ui.AbstractButton
BIG_WIDTH, DEFAULT_HEIGHT, DEFAULT_SPACING, DEFAULT_WIDTH, SMALL_WIDTHFields inherited from class xyz.gmitch215.socketmc.screen.ui.AbstractWidget
DEFAULT_PADDING, height, tooltip, width, x, y -
Constructor Summary
ConstructorsConstructorDescriptionLockButton(int x, int y) Constructs a new LockButton.LockButton(@NotNull ElementBounds bounds) Constructs a new LockButton. -
Method Summary
Methods inherited from class xyz.gmitch215.socketmc.screen.ui.AbstractTextWidget
equals, getMessageJSON, setMessage, setMessageJSONMethods inherited from class xyz.gmitch215.socketmc.screen.ui.AbstractWidget
clearListeners, getHeight, getListeners, getTooltip, getWidth, getX, getY, hashCode, onClick, setHeight, setTooltip, setWidth, setX, setY, toString, visitWidgetsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface xyz.gmitch215.socketmc.screen.layout.LayoutElement
setPosition, setSize, setSize, setSizeMethods inherited from interface xyz.gmitch215.socketmc.screen.Positionable
inSamePosition
-
Field Details
-
SIZE
public static final int SIZEThe width and height of the button.- See Also:
-
TRANSLATION_KEY
The translation key for the button's narration message.- See Also:
-
-
Constructor Details
-
LockButton
Constructs a new LockButton.- Parameters:
bounds- the bounds
-
LockButton
Constructs a new LockButton.- Parameters:
x- the x-coordinatey- the y-coordinate- Throws:
IllegalArgumentException- if coordinates are negative
-