Class MainMenuDisplay

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

public class MainMenuDisplay extends UIComponent
A UI component for displaying the Main menu.
  • Field Details

    • MUSIC

      public static final String[] MUSIC
  • Constructor Details

    • MainMenuDisplay

      public MainMenuDisplay()
  • Method Details

    • create

      public void create()
      Called when the component is created. Initializes the main menu UI.
      Overrides:
      create in class UIComponent
    • updateMenuButtonLayout

      public void updateMenuButtonLayout()
      Dynamically update the layout of menu buttons based on screen size and mode (fullscreen/windowed).
    • setMenuUntouchable

      public void setMenuUntouchable()
    • setMenuTouchable

      public void setMenuTouchable()
    • updateTopLeftToggle

      public void updateTopLeftToggle()
    • updateLoginRegisterTable

      public void updateLoginRegisterTable()
      Update the position of login register table.
    • updateLeaderboardTable

      public void updateLeaderboardTable()
      Update the size and position of the leaderboard table based on screen size and fullscreen mode.
    • updateToggleWindowButtonTexture

      public void updateToggleWindowButtonTexture()
    • update

      public void update()
      Description copied from class: Component
      Called once per frame of the game, and should be used for most component logic. Not called if component is disabled.
      Overrides:
      update in class Component
    • updateBirdFly

      public void updateBirdFly()
    • updateDogRun

      public void updateDogRun()
    • getChatbotUI

      public ChatbotUI getChatbotUI()
    • draw

      public 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.
    • 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 UIComponent
      Returns:
      Z index
    • 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