Class SettingsInputComponent

All Implemented Interfaces:
com.badlogic.gdx.input.GestureDetector.GestureListener, com.badlogic.gdx.InputProcessor

public class SettingsInputComponent extends InputComponent
Input handler for settings menu key rebinding functionality.
  • Constructor Details

    • SettingsInputComponent

      public SettingsInputComponent(SettingsScreen settingsScreen)
  • Method Details

    • setKeyBindButtons

      public void setKeyBindButtons(Map<String,com.badlogic.gdx.scenes.scene2d.ui.TextButton> keyBindButtons)
      Set the key binding buttons that this component will manage
      Parameters:
      keyBindButtons - Map of action names to their corresponding buttons
    • startRebinding

      public void startRebinding(String actionName, com.badlogic.gdx.scenes.scene2d.ui.TextButton button)
      Start rebinding process for a specific action
      Parameters:
      actionName - The action to rebind
      button - The button that was clicked
    • cancelRebinding

      public void cancelRebinding()
      Cancel the current rebinding process
    • keyDown

      public boolean keyDown(int keycode)
      Handle key down events for rebinding
      Specified by:
      keyDown in interface com.badlogic.gdx.InputProcessor
      Overrides:
      keyDown in class InputComponent
      Parameters:
      keycode - The key code that was pressed
      Returns:
      true if the input was processed, false otherwise
      See Also:
      • InputProcessor.keyDown(int)
    • isRebinding

      public boolean isRebinding()
      Check if currently in rebinding mode
      Returns:
      true if rebinding is active