Enum GUIObject.ScaleType

java.lang.Object
java.lang.Enum<GUIObject.ScaleType>
com.blackrook.gui.GUIObject.ScaleType
All Implemented Interfaces:
Serializable, Comparable<GUIObject.ScaleType>
Enclosing class:
GUIObject

public static enum GUIObject.ScaleType extends Enum<GUIObject.ScaleType>
Skin scaling type.
Author:
Matthew Tropiano
  • Enum Constant Details

    • NORMAL

      public static final GUIObject.ScaleType NORMAL
      No scaling.
    • ASPECT

      public static final GUIObject.ScaleType ASPECT
      Scaling is according to object's dimensional aspect. Most effective for square textures. Example: if XY dimensions are [200, 100], ST scaling is [2, 1]. Example: if XY dimensions are [100, 200], ST scaling is [1, 2].
    • ADJUST_X

      public static final GUIObject.ScaleType ADJUST_X
      Scaling is according to object's height. Most effective for square textures. Example: if XY dimensions are [200, 100], ST scaling is [2, 1]. Example: if XY dimensions are [100, 200], ST scaling is [.5, 1].
    • ADJUST_Y

      public static final GUIObject.ScaleType ADJUST_Y
      Scaling is according to object's width. Most effective for square textures. Example: if XY dimensions are [200, 100], ST scaling is [1, .5]. Example: if XY dimensions are [100, 200], ST scaling is [1, 2].
  • Method Details

    • values

      public static GUIObject.ScaleType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static GUIObject.ScaleType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getTextureScaleS

      public abstract float getTextureScaleS(GUIObject object)
      Get the texture S-scaling according to the object.
      Parameters:
      object - the object to use.
      Returns:
      the texture scaling.
    • getTextureScaleT

      public abstract float getTextureScaleT(GUIObject object)
      Get the texture T-scaling according to the object.
      Parameters:
      object - the object to use.
      Returns:
      the texture scaling.