This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
input_functions [2017/04/15 18:12] – korshun | input_functions [2017/07/09 15:47] (current) – korshun | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Input functions ====== | ====== Input functions ====== | ||
- | ===== Introduction ===== | + | |
ACSUtils provides a simplified interface to [[zdoom> | ACSUtils provides a simplified interface to [[zdoom> | ||
- | Every key can be | + | ===== Function list ===== |
+ | |||
+ | A full list of new input functions: | ||
+ | |||
+ | ^ ^ Key ^ KeyAny ^ PlayerKey ^ PlayerKeyAny ^ | ||
+ | ^ up|[[functions: | ||
+ | ^ down|[[functions: | ||
+ | ^ pressed|[[functions: | ||
+ | ^ released|[[functions: | ||
+ | ^ toggled|[[functions: | ||
+ | |||
+ | ===== Introduction ===== | ||
+ | |||
+ | Each key can be | ||
* **Up** or **down** at any moment. | * **Up** or **down** at any moment. | ||
- | * **Pressed**, | + | * **Pressed**, |
- | * **Released**, | + | * **Released**, |
+ | * **Toggled**, | ||
Pressed and released states are especially useful for menus as they allow the user to perform the action as many times as the key was pressed. | Pressed and released states are especially useful for menus as they allow the user to perform the action as many times as the key was pressed. | ||
Line 34: | Line 48: | ||
will move the menu cursor down as many times as the key was hit. | will move the menu cursor down as many times as the key was hit. | ||
- | ===== Functions | + | ===== Conventions |
- | ACSUtils provides | + | ACSUtils provides |
* '' | * '' | ||
Line 47: | Line 61: | ||
- If multiple keys are passed in (e.g. '' | - If multiple keys are passed in (e.g. '' | ||
- If the **Player** prefix is present, the function checks the keys of the specified player. Functions without the prefix check the activator' | - If the **Player** prefix is present, the function checks the keys of the specified player. Functions without the prefix check the activator' | ||
- | |||
- | ===== Function list ===== | ||
- | |||
- | ^ state ^ KeyState ^ KeyStateAny ^ PlayerKeyState^ PlayerKeyStateAny ^ | ||
- | ^ up|[[KeyUp]]|[[KeyUpAny]]|[[PlayerKeyUp]]|[[PlayerKeyUpAny]]| | ||
- | ^ down|[[KeyDown]]|[[KeyDownAny]]|[[PlayerKeyDown]]|[[PlayerKeyDownAny]]| | ||
- | ^ pressed|[[KeyPressed]]|[[KeyPressedAny]]|[[PlayerKeyPressed]]|[[PlayerKeyPressedAny]]| | ||
- | ^ released|[[KeyReleased]]|[[KeyReleasedAny]]|[[PlayerKeyReleased]]|[[PlayerKeyReleasedAny]]| | ||