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
Modifier and TypeFieldDescriptionstatic final int
The width and height of the button.static final String
The 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_WIDTH
Fields inherited from class xyz.gmitch215.socketmc.screen.ui.AbstractWidget
DEFAULT_PADDING, height, tooltip, width, x, y
-
Constructor Summary
ConstructorDescriptionLockButton
(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, setMessageJSON
Methods inherited from class xyz.gmitch215.socketmc.screen.ui.AbstractWidget
clearListeners, getHeight, getListeners, getTooltip, getWidth, getX, getY, hashCode, onClick, setHeight, setTooltip, setWidth, setX, setY, toString, visitWidgets
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface xyz.gmitch215.socketmc.screen.layout.LayoutElement
setPosition, setSize, setSize, setSize
Methods 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
-