Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
1.2.0:inputpolling [2024/01/24 08:39] – admin | 1.2.0:inputpolling [2024/01/24 08:49] (current) – [Feedback Event Methods] admin | ||
---|---|---|---|
Line 124: | Line 124: | ||
===== Input-Codes for HotKeys ===== | ===== Input-Codes for HotKeys ===== | ||
- | All available InputCodes for HotKeys are defined in the Gorilla.Controller.Input.Consts unit. | + | All available InputCodes |
==== Keyboard ==== | ==== Keyboard ==== | ||
Line 327: | Line 327: | ||
|OnGamePadButtonDown |TGorillaInputGamePadButtonEvent|Raw gamepad button down callback thrown by gamepad handler. This event will be synchronized with main thread context.| | |OnGamePadButtonDown |TGorillaInputGamePadButtonEvent|Raw gamepad button down callback thrown by gamepad handler. This event will be synchronized with main thread context.| | ||
|OnGamePadButtonUp |TGorillaInputGamePadButtonEvent|Raw gamepad button up callback thrown by gamepad handler. This event will be synchronized with main thread context.| | |OnGamePadButtonUp |TGorillaInputGamePadButtonEvent|Raw gamepad button up callback thrown by gamepad handler. This event will be synchronized with main thread context.| | ||
- | |OnGamePadTrigger |TGorillaInputGamePadTriggerEvent|Raw gamepad trigger callback thrown by gamepad handler. This event will be synchronized with main thread context.| | + | |OnGamePadTrigger |TGorillaInputGamePadTriggerEvent|Raw gamepad trigger callback thrown by gamepad handler. This event will be synchronized with main thread context. |
- | |OnGamePadFeedback |TGorillaInputGamePadFeedbackEvent|Raw gamepad feeback callback for receiving thumbstick position, thrown by gamepad handler. This event will be synchronized with main thread context.| | + | |OnGamePadFeedback |TGorillaInputGamePadFeedbackEvent|Raw gamepad feeback callback for receiving thumbstick position, thrown by gamepad handler. This event will be synchronized with main thread context. |
==== Feedback Event Methods ==== | ==== Feedback Event Methods ==== | ||
- | Declaring a feedback event method needs further unit integration in most cases for the used types an constants: | + | Declaring a feedback event method needs further unit integration in most cases for the used types and constants: |
* Gorilla.Controller | * Gorilla.Controller | ||
* Gorilla.Controller.Input.Consts | * Gorilla.Controller.Input.Consts | ||
* Gorilla.Controller.Input.Types | * Gorilla.Controller.Input.Types | ||
- | ^Type^Declaration^ | + | ^Type^Declaration^Notice^ |
- | |TGorillaInputMouseEvent |procedure(ASender : TObject; AStates : TGorillaMouseStates; | + | |TGorillaInputMouseEvent |procedure(ASender : TObject; AStates : TGorillaMouseStates; |
- | |GorillaInputMouseMoveEvent|procedure(ASender : TObject; AStates : TGorillaMouseStates; | + | |GorillaInputMouseMoveEvent|procedure(ASender : TObject; AStates : TGorillaMouseStates; |
- | |TGorillaInputMouseWheelEvent|procedure(ASender : TObject; APos : TPointF; const AWheelDelta : Integer) of object;| | + | |TGorillaInputMouseWheelEvent|procedure(ASender : TObject; APos : TPointF; const AWheelDelta : Integer) of object;| | |
- | |TGorillaInputKeyEvent |procedure(ASender : TObject; AKeyCode : Integer) of object;| | + | |TGorillaInputKeyEvent |procedure(ASender : TObject; AKeyCode : Integer) of object;| | |
- | |TGorillaInputGamePadEvent|procedure(ASender : TObject; AState : TGorillaInputCode; | + | |TGorillaInputGamePadEvent|procedure(ASender : TObject; AState : TGorillaInputCode; |
- | |TGorillaInputGamePadButtonEvent|procedure(ASender : TObject; AState : TGorillaInputCode; | + | |TGorillaInputGamePadButtonEvent|procedure(ASender : TObject; AState : TGorillaInputCode; |
- | |TGorillaInputGamePadTriggerEvent|procedure(ASender : TObject; AState : TGorillaInputCode; | + | |TGorillaInputGamePadTriggerEvent|procedure(ASender : TObject; AState : TGorillaInputCode; |
- | |TGorillaInputGamePadFeedbackEvent|procedure(ASender : TObject; AState : TGorillaInputCode; | + | |TGorillaInputGamePadFeedbackEvent|procedure(ASender : TObject; AState : TGorillaInputCode; |
+ | |||
+ | ==== Types ==== | ||
+ | |||
+ | <file Pascal> | ||
+ | TGorillaInputMode = (Activated, Deactivated); | ||
+ | |||
+ | TGorillaMouseState = (LButtonDown, | ||
+ | MButtonDown, | ||
+ | LButtonDblClick, | ||
+ | X2ButtonDblClick, | ||
+ | |||
+ | TGorillaMouseStates = set of TGorillaMouseState; | ||
+ | | ||
+ | TGorillaGamePadButton = ( | ||
+ | None, | ||
+ | // directional pad up | ||
+ | DPadUp, | ||
+ | // directional pad down | ||
+ | DPadDown, | ||
+ | // directional pad left | ||
+ | DPadLeft, | ||
+ | // directional pad right | ||
+ | DPadRight, | ||
+ | // start button | ||
+ | StartButton, | ||
+ | // mode button | ||
+ | ModeButton, | ||
+ | // back button | ||
+ | BackButton, | ||
+ | // left thumbstick pressed | ||
+ | LeftThumbStick, | ||
+ | // right thumbstick pressed | ||
+ | RightThumbStick, | ||
+ | // left shoulder button | ||
+ | LeftShoulder, | ||
+ | // right shoulder button | ||
+ | RightShoulder, | ||
+ | // button A | ||
+ | ButtonA, | ||
+ | // button B | ||
+ | ButtonB, | ||
+ | // button X | ||
+ | ButtonX, | ||
+ | // button Y | ||
+ | ButtonY | ||
+ | ); | ||
+ | | ||
+ | TGorillaGamePadButtons = set of TGorillaGamePadButton; | ||
+ | </ | ||
===== Debugging-Issue ===== | ===== Debugging-Issue ===== | ||