Class KeybindsButtonDisplay

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

public class KeybindsButtonDisplay extends UIComponent
Displays Keybindings button
  • Constructor Details

    • KeybindsButtonDisplay

      public KeybindsButtonDisplay(com.badlogic.gdx.scenes.scene2d.ui.Skin skin)
    • KeybindsButtonDisplay

      public KeybindsButtonDisplay()
  • Method Details

    • create

      public void create()
      Initializes button display
      Overrides:
      create in class UIComponent
    • createKeybindsMenu

      public com.badlogic.gdx.scenes.scene2d.ui.Table createKeybindsMenu()
      Creates keybinds table menu
      Returns:
      the keybinds menu table
    • showKeybinds

      public void showKeybinds(boolean isPressed)
      Toggles the visibility of the keybinds menu
      Parameters:
      isPressed - keybinds button is pressed
    • createButtonTable

      public com.badlogic.gdx.scenes.scene2d.ui.Table createButtonTable()
      Creates the button
      Returns:
      the keybinds button
    • createKeybindsText

      public com.badlogic.gdx.scenes.scene2d.ui.Table createKeybindsText()
      Creates the keybinds menu text
      Returns:
      the keybinds menu text
    • dispose

      public void dispose()
      Removes the button
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
      Overrides:
      dispose in class RenderComponent
    • draw

      public void draw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch)
      Draws the button on the screen. The actual rendering is handled by the stage, so this method is empty.
      Specified by:
      draw in class RenderComponent
      Parameters:
      batch - Batch to render to.
    • getStage

      public com.badlogic.gdx.scenes.scene2d.Stage getStage()
      Gets the state of the button
      Returns:
      the stage
    • setStage

      public void setStage(com.badlogic.gdx.scenes.scene2d.Stage stage)
      Set the stage
      Parameters:
      stage - the stage
    • setKeybindsMenuTexture

      public void setKeybindsMenuTexture(com.badlogic.gdx.graphics.Texture keybindsMenuTexture)
    • setButtonTable

      public void setButtonTable(com.badlogic.gdx.scenes.scene2d.ui.Table table)
    • setMenuTable

      public void setMenuTable(com.badlogic.gdx.scenes.scene2d.ui.Table table)
    • setTextTable

      public void setTextTable(com.badlogic.gdx.scenes.scene2d.ui.Table table)