Class SkilltreeDisplay

All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, Renderable, Comparable<Renderable>

public class SkilltreeDisplay extends UIComponent
SkilltreeDisplay is a UI component responsible for rendering the skill tree interface. It provides a background, displays a dialog when attempting to unlock a skill, and handles unlock/close actions with appropriate sounds and UI updates.
  • Constructor Details

    • SkilltreeDisplay

      public SkilltreeDisplay()
      Creates a new SkilltreeDisplay.
  • Method Details

    • create

      public void create()
      Called when the component is created. Adds initial actors to the stage.
      Overrides:
      create in class UIComponent
    • draw

      protected void draw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch)
      Draw method for custom rendering. Currently unused since this class relies on Scene2D UI elements.
      Specified by:
      draw in class RenderComponent
      Parameters:
      batch - the SpriteBatch used for rendering
    • unlockedPopUp

      public void unlockedPopUp(Skill skill, SkillSet skillSet, com.badlogic.gdx.graphics.Texture unlockedTexture, com.badlogic.gdx.scenes.scene2d.ui.Button skillButton, com.badlogic.gdx.scenes.scene2d.Stage stage)
      Displays a popup dialog for unlocking a skill. The dialog shows skill details, and provides options to unlock the skill (if possible) or close the dialog.
      Parameters:
      skill - the skill being displayed
      skillSet - the player's current skill set
      unlockedTexture - texture to display when a skill is unlocked
      skillButton - the button representing the skill in the tree
      stage - the stage to which the popup will be added