Class UIComponent

All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, Renderable, Comparable<Renderable>
Direct Known Subclasses:
AchievementsDisplay, countdownDisplay, DamageFlashDisplayComponent, EndingMenuDisplay, GameAreaDisplay, GameOverDisplay, InventoryDisplayComponent, Lab_1_Display, Lab_2_Display, Lab_3_Display, Lab_4_Display, Lab_5_Display, LabHouseDisplay, LoadGameDisplay, MainGameExitDisplay, MainMenuDisplay, MapDisplay, NpcEvictionMenuDisplay, NpcEvictionMenuDisplayNew, NpcInteractionDisplay, PausedWindow, PerformanceDisplay, PlayerProfileDisplay, PlayerStatsDisplay, SaveGameDisplay, SettingsMenuDisplay, StorylineDisplay, TaskWindow, TerminalDisplay, timeOverDisplay, TutorialDisplay

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