Class TerminalUiComponent

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

public class TerminalUiComponent extends UIComponent
Overlay UI for a simple CAPTCHA-like puzzle shown on an in-world computer terminal. Renders a header, prompt, grid of selectable tiles, an error/success line, and a submit button. Uses sprite-sheet based puzzles (one big image split into equal tiles).
  • Constructor Details

    • TerminalUiComponent

      public TerminalUiComponent(MainGameScreen screen)
  • Method Details

    • setCaptchaBank

      public TerminalUiComponent setCaptchaBank(SimpleCaptchaBank bank)
      Injects the captcha bank that supplies puzzles.
      Parameters:
      bank - source of puzzle specs
      Returns:
      this for chaining
    • create

      public void create()
      Loads assets, builds the UI, and wires input/event listeners.
      Overrides:
      create in class UIComponent
    • isOpen

      public static boolean isOpen()
    • draw

      protected void draw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch)
      Description copied from class: RenderComponent
      Draw the renderable. Should be called only by the renderer, not manually.
      Specified by:
      draw in class RenderComponent
      Parameters:
      batch - Batch to render to.
    • dispose

      public void dispose()
      Description copied from class: Component
      Called when the component is disposed. Dispose of any internal resources here.
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
      Overrides:
      dispose in class RenderComponent