This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
input_functions [2017/03/18 14:58] – 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**, if it was up during the previous tick but is now down. | + | * **Pressed**, if it was **up** during the previous tick but is now **down**. |
- | * **released**, if it was down during the previous tick but is now up. | + | * **Released**, if it was **down** during the previous tick but is now **up**. |
+ | * **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 21: | Line 35: | ||
</ | </ | ||
- | will move the menu cursor 7 times per second if the button is held, and won't move the cursor at all if the key press falls in between the checks, whereas: | + | will move the menu cursor 7 times per second if the button is held, and **won't move the cursor at all if the key press falls in between the checks**, whereas: |
< | < | ||
Line 32: | Line 46: | ||
</ | </ | ||
+ | will move the menu cursor down as many times as the key was hit. | ||
- | ===== Functions | + | ===== Conventions |
- | ACSUtils provides | + | ACSUtils provides |
* '' | * '' | ||
Line 46: | 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' | ||
+ | |||
+ |