This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
en:tutorials:testing_input_controls [2018/08/24 04:47 (6 years ago)] – created sausage | en:tutorials:input:testing_input_controls [2020/08/31 05:44 (4 years ago)] – ↷ Page moved from en:tutorials:testing_input_controls to en:tutorials:input:testing_input_controls sausage | ||
---|---|---|---|
Line 5: | Line 5: | ||
Good also for keyboard testing to get the names of keypresses which you can use in your config files. | Good also for keyboard testing to get the names of keypresses which you can use in your config files. | ||
- | Start by creating a new [[en: | + | Start by creating a new [[en: |
Open the project. We don't need an '' | Open the project. We don't need an '' | ||
Line 13: | Line 13: | ||
</ | </ | ||
- | Create a clock in the Init() function | + | Use the core clock in the Init() function |
<code c> | <code c> | ||
- | orxCLOCK *checkInputsClock = orxClock_Create(orx2F(0.05f), orxCLOCK_TYPE_USER); | + | orxClock_Register(orxClock_FindFirst(-1.0f, orxCLOCK_TYPE_CORE), InputCheck, orxNULL, orxMODULE_ID_MAIN, |
- | orxClock_Register(checkInputsClock, InputCheck, orxNULL, orxMODULE_ID_MAIN, | + | |
</ | </ | ||
+ | |||
+ | <WRAP center round tip 90%> | ||
+ | **Note:** '' | ||
+ | </ | ||
+ | |||
And finally, the '' | And finally, the '' | ||
Line 36: | Line 40: | ||
} | } | ||
} | } | ||
+ | |||
</ | </ | ||
Line 49: | Line 54: | ||
[21:16:01] [LOG] Input: KEY_SPACE, Type: 0, ID: 71, Value 1.000000 | [21:16:01] [LOG] Input: KEY_SPACE, Type: 0, ID: 71, Value 1.000000 | ||
[21:16:01] [LOG] Input: KEY_SPACE, Type: 0, ID: 71, Value 1.000000 | [21:16:01] [LOG] Input: KEY_SPACE, Type: 0, ID: 71, Value 1.000000 | ||
- | [21:16:02] [LOG] Input: | + | [21:16:02] [LOG] Input: |
- | [21:16:02] [LOG] Input: | + | [21:16:02] [LOG] Input: |
[21:16:04] [LOG] Input: JOY_1_1, Type: 3, ID: 0, Value 1.000000 | [21:16:04] [LOG] Input: JOY_1_1, Type: 3, ID: 0, Value 1.000000 | ||
[21:16:05] [LOG] Input: JOY_1_1, Type: 3, ID: 0, Value 1.000000 | [21:16:05] [LOG] Input: JOY_1_1, Type: 3, ID: 0, Value 1.000000 | ||
- | [21:17:01] [LOG] Input: | + | [21:17:01] [LOG] Input: |
- | [21:17:01] [LOG] Input: | + | [21:17:01] [LOG] Input: |
[21:17:02] [LOG] Input: JOY_16_1, Type: 3, ID: 15, Value 1.000000 | [21:17:02] [LOG] Input: JOY_16_1, Type: 3, ID: 15, Value 1.000000 | ||
- | </code>< | + | </ |