Class UIComponent

All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, Renderable, Comparable<Renderable>
Direct Known Subclasses:
BossStatsDisplay, CurrencyDisplay, EngineerCountDisplay, EngineerMenuComponent, GameAreaDisplay, MainGameExitDisplay, MainGameLoseDisplay, MainGamePauseDisplay, MainMenuDisplay, PauseMenuContinueButton, PauseMenuMainMenuButton, PauseMenuPlanetSelectButton, PauseMenuSettingsButton, PerformanceDisplay, PlayerStatsDisplay, SettingsMenuDisplay, TerminalDisplay, UIElementsDisplay

public abstract class UIComponent extends RenderComponent implements Renderable
A generic component for rendering onto the ui.
  • Field Details

    • skin

      protected static final com.badlogic.gdx.scenes.scene2d.ui.Skin skin
    • stage

      protected com.badlogic.gdx.scenes.scene2d.Stage stage
  • Constructor Details

    • UIComponent

      public UIComponent()
  • Method Details

    • create

      public void create()
      Description copied from class: Component
      Called when the entity is created and registered. Initial logic such as calls to GetComponent should be made here, not in the constructor which is called before an entity is finished.
      Overrides:
      create in class RenderComponent
    • getLayer

      public int getLayer()
      Description copied from interface: Renderable
      Layer to be rendered in. Higher layers will be rendered on top of lower layers.
      Specified by:
      getLayer in interface Renderable
      Overrides:
      getLayer in class RenderComponent
      Returns:
      layer
    • getZIndex

      public float getZIndex()
      Description copied from interface: Renderable
      Z index controls rendering order within a layer. Higher Z index is drawn on top.
      Specified by:
      getZIndex in interface Renderable
      Overrides:
      getZIndex in class RenderComponent
      Returns:
      Z index