Package org.boxutil.units.standard.misc
Class UIBorderObject
java.lang.Object
org.boxutil.units.standard.misc.UIBorderObject
For rendering vanilla ui border "ui_border1_XX" or "panel00_XX" serial.
Vanilla supported.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final byteprotected static final byteprotected static final byteprotected static final byteprotected static final byteprotected static final byteprotected static final byteprotected static final byteprotected static final byteprotected final intprotected final com.fs.starfarer.api.graphics.SpriteAPI[]protected org.lwjgl.util.vector.Vector4fprotected floatprotected final booleanprotected final org.lwjgl.util.vector.Vector2f -
Constructor Summary
ConstructorsConstructorDescriptionUIBorderObject(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 TypeMethodDescriptionfloatgetAlpha()floatorg.lwjgl.util.vector.Vector4fgetColor()floatorg.lwjgl.util.vector.Vector2fgetSize()intfloatgetWidth()voidglDraw()booleanbooleanisValid()voidrender(float x, float y) General rendering method.voidrenderAtCenter(float x, float y) General rendering method.voidsetAlpha(float alpha) voidsetCenterExpend(float expend) voidsetColor(float r, float g, float b) voidsetColor(float r, float g, float b, float a) voidsetColor(org.lwjgl.util.vector.Vector3f color) voidsetColor(org.lwjgl.util.vector.Vector4f color) voidsetHeight(float height) voidsetSize(float width, float height) voidsetSize(org.lwjgl.util.vector.Vector2f size) voidsetWidth(float width)
-
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.
-