Package gaiasky.util
Class Settings.ControlsSettings.GamepadSettings
java.lang.Object
gaiasky.util.Settings.ControlsSettings.GamepadSettings
- All Implemented Interfaces:
IObserver
- Enclosing class:
- Settings.ControlsSettings
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addControllerListener
(com.badlogic.gdx.controllers.ControllerListener listener) Adds the given controller listeners to all detected controllers.void
addControllerListener
(com.badlogic.gdx.controllers.ControllerListener listener, String controllerName) Adds the given controller listener to the controller with the given name, if it is not blacklisted.Set<com.badlogic.gdx.controllers.ControllerListener>
Returns a copy of the current controller listeners for the first detected controller.boolean
isControllerBlacklisted
(String controllerName) void
Event notification call.void
Removes all controller listeners from all controllers.void
removeControllerListener
(com.badlogic.gdx.controllers.ControllerListener listener) Removes the given listener from all controllers.void
setControllerListeners
(Set<com.badlogic.gdx.controllers.ControllerListener> controllerListeners) Adds all controller listeners in the set to all detected controllers.
-
Field Details
-
mappingsFile
-
invertX
public boolean invertX -
invertY
public boolean invertY -
blacklist
-
-
Constructor Details
-
GamepadSettings
public GamepadSettings()
-
-
Method Details
-
isControllerBlacklisted
-
addControllerListener
public void addControllerListener(com.badlogic.gdx.controllers.ControllerListener listener) Adds the given controller listeners to all detected controllers.- Parameters:
listener
- The controller listener.
-
addControllerListener
public void addControllerListener(com.badlogic.gdx.controllers.ControllerListener listener, String controllerName) Adds the given controller listener to the controller with the given name, if it is not blacklisted.- Parameters:
listener
- The controller listener.controllerName
- The controller name.
-
removeControllerListener
public void removeControllerListener(com.badlogic.gdx.controllers.ControllerListener listener) Removes the given listener from all controllers.- Parameters:
listener
- The listener to remove.
-
removeAllControllerListeners
public void removeAllControllerListeners()Removes all controller listeners from all controllers. -
getControllerListeners
Returns a copy of the current controller listeners for the first detected controller.- Returns:
- A set with all current controller listeners.
-
setControllerListeners
public void setControllerListeners(Set<com.badlogic.gdx.controllers.ControllerListener> controllerListeners) Adds all controller listeners in the set to all detected controllers.- Parameters:
controllerListeners
- The listeners.
-
notify
Description copied from interface:IObserver
Event notification call.
-