Class TutorialScreenDisplay

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

public class TutorialScreenDisplay extends BaseScreenDisplay
UI component that displays the multi-step Tutorial screen.

Each step contains a title, description, and an optional animated clip. Users can navigate with previous/next arrows and return to the main menu.

This component extends BaseScreenDisplay to reuse common UI helpers and lifecycle management (stage root, styles, and auto-disposal).

  • Field Details

    • currentStep

      protected int currentStep
      Index of the currently displayed tutorial step.
  • Constructor Details

    • TutorialScreenDisplay

      public TutorialScreenDisplay(GdxGame game, List<TutorialStep> steps)
      Creates a tutorial display bound to a list of steps.
      Parameters:
      game - the game instance, used for navigation helpers
      steps - ordered list of tutorial steps to render (must not be null)
  • Method Details

    • create

      public void create()
      Loads per-screen textures, then delegates to BaseScreenDisplay.create() to initialise the stage root and build the UI.
      Overrides:
      create in class BaseScreenDisplay
    • buildUI

      protected void buildUI(com.badlogic.gdx.scenes.scene2d.ui.Table root)
      Builds the initial UI by showing the current step.
      Specified by:
      buildUI in class BaseScreenDisplay
      Parameters:
      root - the fill-parent root table created by BaseScreenDisplay
    • dispose

      public void dispose()
      Disposes arrow textures and then delegates to BaseScreenDisplay.dispose(). Subclasses should ensure UI actors that use textures are detached before disposal.
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
      Overrides:
      dispose in class BaseScreenDisplay