Package engine.guis

Class UiComponent

java.lang.Object
engine.guis.UiComponent
Direct Known Subclasses:
TextField, UiButton, UiTab

public abstract class UiComponent extends Object
Parent class for UI components on screen such as tabs, buttons and text fields.
  • 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 texture
      position - Vector2f of the position
      scale - 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.