Class Sprite
java.lang.Object
xyz.gmitch215.socketmc.screen.util.Sprite
- All Implemented Interfaces:
Serializable
Represents a Sprite to be displayed on a Screen.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Sprite
Represents anAbstractButton
without a specified sprite.static final Sprite
Represents aCheckboxButton
.static final Sprite
Represents the Cross Button used in the realms screen.static final Sprite
Represents the Crafting Table Recipe Book Button.static final Sprite
Represents the Tab Button for switch to a new screen. -
Constructor Summary
ConstructorDescriptionConstructs a new Sprite usingIdentifier.minecraft(String)
.Sprite
(@NotNull String enabled, @NotNull String enabledHovered, @NotNull String disabled, @NotNull String disabledHovered) Constructs a new Sprite usingIdentifier.minecraft(String)
.Sprite
(@NotNull Identifier enabled, @NotNull Identifier disabled) Constructs a new Sprite.Sprite
(@NotNull Identifier enabled, @NotNull Identifier enabledHovered, @NotNull Identifier disabled, @NotNull Identifier disabledHovered) Constructs a new Sprite. -
Method Summary
Modifier and TypeMethodDescriptionGets the Identifier for the Sprite when Disabled.Gets the Identifier for the Sprite when Disabled, and mouse is hovering.Gets the Identifier for the Sprite when Enabled.Gets the Identifier for the Sprite when Enabled, and mouse is hovering.void
setDisabled
(@NotNull Identifier disabled) Sets the Identifier for the Sprite when Disabled.void
setDisabledHovered
(@NotNull Identifier disabledHovered) Sets the Identifier for the Sprite when Disabled, and mouse is hovering.void
setEnabled
(@NotNull Identifier enabled) Sets the Identifier for the Sprite when Enabled.void
setEnabledHovered
(@NotNull Identifier enabledHovered) Sets the Identifier for the Sprite when Enabled, and mouse is hovering.
-
Field Details
-
BUTTON
Represents anAbstractButton
without a specified sprite. -
CHECKBOX
Represents aCheckboxButton
. -
RECIPE_BUTTON
Represents the Crafting Table Recipe Book Button. -
CROSS_BUTTON_REALMS
Represents the Cross Button used in the realms screen. -
SCREEN_TAB_BUTTON
Represents the Tab Button for switch to a new screen.
-
-
Constructor Details
-
Sprite
Constructs a new Sprite usingIdentifier.minecraft(String)
.- Parameters:
enabled
- Sprite to display when Enableddisabled
- Sprite to display when Disabled
-
Sprite
public Sprite(@NotNull @NotNull String enabled, @NotNull @NotNull String enabledHovered, @NotNull @NotNull String disabled, @NotNull @NotNull String disabledHovered) Constructs a new Sprite usingIdentifier.minecraft(String)
.- Parameters:
enabled
- Sprite to display when EnabledenabledHovered
- Sprite to display when Enabled, and mouse is hoveringdisabled
- Sprite to display when DisableddisabledHovered
- Sprite to display when Disabled, and mouse is hovering
-
Sprite
Constructs a new Sprite.- Parameters:
enabled
- Sprite to display when Enableddisabled
- Sprite to display when Disabled
-
Sprite
public Sprite(@NotNull @NotNull Identifier enabled, @NotNull @NotNull Identifier enabledHovered, @NotNull @NotNull Identifier disabled, @NotNull @NotNull Identifier disabledHovered) throws IllegalArgumentException Constructs a new Sprite.- Parameters:
enabled
- Sprite to display when EnabledenabledHovered
- Sprite to display when Enabled, and mouse is hoveringdisabled
- Sprite to display when DisableddisabledHovered
- Sprite to display when Disabled, and mouse is hovering- Throws:
IllegalArgumentException
- if any Identifier is null
-
-
Method Details
-
getEnabled
Gets the Identifier for the Sprite when Enabled.- Returns:
- Sprite Enabled Identifier
-
setEnabled
Sets the Identifier for the Sprite when Enabled.- Parameters:
enabled
- Sprite Enabled Identifier- Throws:
IllegalArgumentException
- if enabled is null
-
getEnabledHovered
Gets the Identifier for the Sprite when Enabled, and mouse is hovering.- Returns:
- Sprite Enabled Focused Identifier
-
setEnabledHovered
public void setEnabledHovered(@NotNull @NotNull Identifier enabledHovered) throws IllegalArgumentException Sets the Identifier for the Sprite when Enabled, and mouse is hovering.- Parameters:
enabledHovered
- Sprite Enabled Focused Identifier- Throws:
IllegalArgumentException
- if enabledFocused is null
-
getDisabled
Gets the Identifier for the Sprite when Disabled.- Returns:
- Sprite Disabled Identifier
-
setDisabled
Sets the Identifier for the Sprite when Disabled.- Parameters:
disabled
- Sprite Disabled Identifier- Throws:
IllegalArgumentException
- if disabled is null
-
getDisabledHovered
Gets the Identifier for the Sprite when Disabled, and mouse is hovering.- Returns:
- Sprite Disabled Focused Identifier
-
setDisabledHovered
@NotNull public void setDisabledHovered(@NotNull @NotNull Identifier disabledHovered) throws IllegalArgumentException Sets the Identifier for the Sprite when Disabled, and mouse is hovering.- Parameters:
disabledHovered
- Sprite Disabled Focused Identifier- Throws:
IllegalArgumentException
- if disabledFocused is null
-