Skip to main content

SUIButton

class SUIButton

Renders virtual buttons on the screen with color, size etc, can be modified as you like.

See the SUIButton component topic to learn more about SUIButton.


public class SUIButton extends Component

— Constructors (1) —

ConstructorDescription
SUIButton()Creates a new SUIButton.

— Methods (35) —

NameDescription
boolean isPressed()Returns true if the button is being pressed, false if not.
boolean isDown()Returns true if the button was pressed, false if not.
boolean isUp()Returns true if the button was pressed and released, false if not.
Color getNormalColor()Returns the current SUIButton "OnNormal" state color(the color when the SUIButton is not being pressed).
void setNormalColor(Color color)Sets the current SUIButton "OnNormal" state color(the color when the SUIButton is not being pressed) to be "color" argument.
[Texture] getNormalImage()Returns the current SUIButton "OnNormal" state texture(the texture when the SUIButton is not being pressed) of the SUIButton.
void setNormalImage([Texture] texture)Sets the current SUIButton "OnNormal" state texture (the texture when SUIButton is not being pressed) of the SUIButton to be "texture" argument.
boolean isNormalIgnoreMask()Returns true if the "Ignore Mask" option of the "OnNormal" state (when the SUIButton is not being pressed) of the SUIButton is checked, false if not.
void setNormalIgnoreMask(boolean value)Defines whether the "Ignore Mask" option of the "OnNormal" state (when the SUIButton is not being pressed) of the SUIButton will be checked or unchecked to be "value" argument.
int getNormalBorder()Returns the current size of the SUIButton's "OnNormal" state border(the border when the SUIButton is not being pressed).
void setNormalBorder(int value)Sets the current border size of the SUIButton's "OnNormal" state(when the SUIButton is not being pressed) to be "value" argument.
SUnitType getNormalBorderUnitType()Returns the current edge type("Pixel" or "DIP") of the SUIButton's "OnNormal" state (when the SUIButton is not being pressed).
void setNormalBorderUnitType(SUnitType value)Sets the current edge type("Pixel" or "DIP") of the SUIButton's "OnNormal" state(when the SUIButton is not being pressed) to be "value" argument.
void setNormalBorder(int value, SUnitType unitType)Sets the current size of the SUIButton's border from its "OnNormal" state(when the SUIButton is not being pressed) to be "value" argument, and its type("Pixel" or DIP) to be "unitType" argument.
SImageType getNormalImageType()Returns the current image type("Simple" or "Sliced") of the SUIButton from its "OnNormal" state(when the SUIButton is not being pressed).
void setNormalImageType(SImageType value)Sets the current image type("Simple" or "Sliced") of the SUIButton from its "OnNormal" state(when the SUIButton is not being pressed) to be "sImageType" argument.
Color getPressedColor()Returns the current color of the "OnPressed" state(the color when the SUIButton is being pressed).
void setPressedColor(Color color)Sets the current color of the "OnPressed" state(the color when the SUIButton is being pressed) to be "color" argument.
[Texture] getPressedImage()Returns the current SUIButton "OnPressed" state texture(the texture when the SUIButton is being pressed) of the SUIButton.
void setPressedImage([Texture] texture)Sets the current SUIButton "OnPressed" state texture(the texture when the SUIButton is being pressed) of the SUIButton to be "texture" argument.
boolean isPressedIgnoreMask()Returns true if the "Ignore Mask" option of the "OnPressed" state (when the SUIButton is being pressed) of the SUIButton is checked, false if not.
void setPressedIgnoreMask(boolean value)Defines whether the "Ignore Mask" option of the "OnPressed" state (when the SUIButton not being pressed) of the SUIButton will be checked or unchecked to be "value" argument.
int getPressedBorder()Returns the current size of the SUIButton's "OnPressed" state border(the border when the SUIButton is being pressed).
void setPressedBorder(int value)Sets the current border size of the SUIButton's "OnPressed" state(when the SUIButton is being pressed) to be "value" argument.
SUnitType getPressedBorderUnitType()Returns the current edge type("Pixel" or "DIP") of the SUIButton's "OnPressed" state(when the SUIButton is being pressed).
void setPressedBorderUnitType(SUnitType value)Sets the current edge type("Pixel" or "DIP") of the SUIButton's "OnPressed" state(when the SUIButton is being pressed) to be "value" argument.
void setPressedBorder(int value, SUnitType unitType)Sets the current size of the SUIButton's border from its "OnPressed" state(when the SUIButton is being pressed) to be "value" argument, and its type("Pixel" or DIP) to be "unitType" argument.
SImageType getPressedImageType()Returns the current image type("Simple" or "Sliced") of the SUIButton from its "OnPressed" state(when the SUIButton is being pressed).
void setPressedImageType(SImageType value)Sets the current image type("Simple" or "Sliced") of the SUIButton from its pressed state(when the SUIButton is being pressed) to be "sImageType" argument.
boolean isClickable()Returns true if the SUIButton has the "Clickable" option to be "Event" options checked, false if not.
void setClickable(boolean value)Defines if the SUIButton will have the "Clickable" option to be "Event" options checked or unchecked to be "value" argument.
STargetRect getTargetRectType()Returns the current Target("MySelf", "Parent" or "Other") type option to be "Event" options of the SUIButton.
void setTargetRectType(STargetRect value)Sets the current Target("MySelf", "Parent" or "Other") type option to be "Event" options of the SUIButton to be "value" argument.
SpatialObject getTargetRectObject()Returns the current type of Target("MySelf", "Parent" or "Other") along with SUIButton SpatialObject.
void setTargetRectObject(SpatialObject object)Sets the current Target("MySelf", "Parent" or "Other") type of the SpatialObject passed to be "object" argument.