Class UIBorderObject

java.lang.Object
org.boxutil.units.standard.misc.UIBorderObject

public class UIBorderObject extends Object
For rendering vanilla ui border "ui_border1_XX" or "panel00_XX" serial.

Vanilla supported.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final byte
     
    protected static final byte
     
    protected static final byte
     
    protected static final byte
     
    protected static final byte
     
    protected static final byte
     
    protected static final byte
     
    protected static final byte
     
    protected static final byte
     
    protected final int
     
    protected final com.fs.starfarer.api.graphics.SpriteAPI[]
     
    protected org.lwjgl.util.vector.Vector4f
     
    protected float
     
    protected final boolean
     
    protected final org.lwjgl.util.vector.Vector2f
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    UIBorderObject(boolean useLargerBorder, boolean translucentBackground)
     
    UIBorderObject(com.fs.starfarer.api.graphics.SpriteAPI[] sprites)
    The size of texture shouldn't be too larger, and all sprites should have the same size.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
     
    float
     
    org.lwjgl.util.vector.Vector4f
     
    float
     
    org.lwjgl.util.vector.Vector2f
     
    int
     
    float
     
    void
     
    boolean
     
    boolean
     
    void
    render(float x, float y)
    General rendering method.
    void
    renderAtCenter(float x, float y)
    General rendering method.
    void
    setAlpha(float alpha)
     
    void
    setCenterExpend(float expend)
     
    void
    setColor(float r, float g, float b)
     
    void
    setColor(float r, float g, float b, float a)
     
    void
    setColor(org.lwjgl.util.vector.Vector3f color)
     
    void
    setColor(org.lwjgl.util.vector.Vector4f color)
     
    void
    setHeight(float height)
     
    void
    setSize(float width, float height)
     
    void
    setSize(org.lwjgl.util.vector.Vector2f size)
     
    void
    setWidth(float width)
     

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • _S_BL

      protected static final byte _S_BL
      See Also:
    • _S_B

      protected static final byte _S_B
      See Also:
    • _S_BR

      protected static final byte _S_BR
      See Also:
    • _S_L

      protected static final byte _S_L
      See Also:
    • _S_R

      protected static final byte _S_R
      See Also:
    • _S_TL

      protected static final byte _S_TL
      See Also:
    • _S_T

      protected static final byte _S_T
      See Also:
    • _S_TR

      protected static final byte _S_TR
      See Also:
    • _S_CENTER

      protected static final byte _S_CENTER
      See Also:
    • _sprites

      protected final com.fs.starfarer.api.graphics.SpriteAPI[] _sprites
    • size

      protected final org.lwjgl.util.vector.Vector2f size
    • _sizeStyle

      protected final int _sizeStyle
    • isValid

      protected final boolean isValid
    • expend

      protected float expend
    • color

      protected org.lwjgl.util.vector.Vector4f color
  • Constructor Details

    • UIBorderObject

      public UIBorderObject(boolean useLargerBorder, boolean translucentBackground)
    • UIBorderObject

      public UIBorderObject(com.fs.starfarer.api.graphics.SpriteAPI[] sprites)
      The size of texture shouldn't be too larger, and all sprites should have the same size.
      Parameters:
      sprites - total 9 sprites: BL, B, BR, L, R, TL, T, TR, Center.
  • Method Details

    • render

      public void render(float x, float y)
      General rendering method.

      Anchor at bottom-left.

    • renderAtCenter

      public void renderAtCenter(float x, float y)
      General rendering method.
    • glDraw

      public void glDraw()
    • isSizeValid

      public boolean isSizeValid()
    • getSize

      public org.lwjgl.util.vector.Vector2f getSize()
    • setSize

      public void setSize(org.lwjgl.util.vector.Vector2f size)
    • setSize

      public void setSize(float width, float height)
    • getWidth

      public float getWidth()
    • setWidth

      public void setWidth(float width)
    • getHeight

      public float getHeight()
    • setHeight

      public void setHeight(float height)
    • getColor

      public org.lwjgl.util.vector.Vector4f getColor()
    • setColor

      public void setColor(float r, float g, float b)
    • setColor

      public void setColor(org.lwjgl.util.vector.Vector3f color)
    • setColor

      public void setColor(float r, float g, float b, float a)
    • setColor

      public void setColor(org.lwjgl.util.vector.Vector4f color)
    • getAlpha

      public float getAlpha()
    • setAlpha

      public void setAlpha(float alpha)
    • getCenterExpend

      public float getCenterExpend()
    • setCenterExpend

      public void setCenterExpend(float expend)
    • isValid

      public boolean isValid()
    • getTileSize

      public int getTileSize()
      Returns:
      the value width of bottom-left texture.