Package engine.guis
Class UiComponent
java.lang.Object
engine.guis.UiComponent
Parent class for UI components on screen such as tabs, buttons and text fields.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected org.joml.Vector2f
protected org.joml.Vector2f
protected int
-
Constructor Summary
ConstructorsConstructorDescriptionUiComponent
(int texture, org.joml.Vector2f position, org.joml.Vector2f scale) Constructor of UI Component. -
Method Summary
-
Field Details
-
position
protected org.joml.Vector2f position -
scale
protected org.joml.Vector2f scale -
texture
protected int texture -
isClickable
protected boolean isClickable
-
-
Constructor Details
-
UiComponent
public UiComponent(int texture, org.joml.Vector2f position, org.joml.Vector2f scale) Constructor of UI Component.- Parameters:
texture
- Texture ID of the textureposition
- Vector2f of the positionscale
- Vector2f Scale of the component
-
-
Method Details
-
getPosition
public org.joml.Vector2f getPosition()- Returns:
- Vector2f of components centre position
-
getScale
public org.joml.Vector2f getScale()- Returns:
- Vector2f of components scale in X and Y direction
-
getTexture
public int getTexture()- Returns:
- int value of components Texture value.
-