Package gaiasky.util
Class Settings.ControlsSettings.GamepadSettings
java.lang.Object
gaiasky.util.SettingsObject
gaiasky.util.Settings.ControlsSettings.GamepadSettings
- Enclosing class:
Settings.ControlsSettings
public static class Settings.ControlsSettings.GamepadSettings
extends SettingsObject
implements IObserver
-
Field Summary
Fields inherited from class gaiasky.util.SettingsObject
parent
-
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.void
apply()
clone()
void
dispose()
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.protected void
protected void
Methods inherited from class gaiasky.util.SettingsObject
isEnabled, setParent
-
Field Details
-
mappingsFile
-
invertX
public boolean invertX -
invertY
public boolean invertY -
blacklist
-
-
Constructor Details
-
GamepadSettings
public GamepadSettings()
-
-
Method Details
-
clone
- Overrides:
clone
in classSettingsObject
-
setParentRecursive
- Specified by:
setParentRecursive
in classSettingsObject
-
setupListeners
protected void setupListeners()- Specified by:
setupListeners
in classSettingsObject
-
dispose
public void dispose()- Specified by:
dispose
in interfacecom.badlogic.gdx.utils.Disposable
-
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. -
apply
public void apply()
-