Differences From Artifact [d675a51f7b]:
- File
src/OFGameController.h
— part of check-in
[a0f4283e81]
at
2024-05-05 18:59:50
on branch gamecontroller
— Add OFGameController
Only supports Nintendo 3DS so far. (user: js, size: 2155) [annotate] [blame] [check-ins using]
To Artifact [542208ba0a]:
- File
src/OFGameController.h
— part of check-in
[498a91a2a4]
at
2024-05-05 19:56:47
on branch gamecontroller
— OFGameController: Rename axis to analog stick
This was just wrong, an analog stick has two axes. (user: js, size: 2203) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
42 43 44 45 46 47 48 | /** * @brief The currently pressed buttons on the controller. */ @property (readonly, nonatomic) OFSet OF_GENERIC(OFString *) *pressedButtons; /** | | | | | | | | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | /** * @brief The currently pressed buttons on the controller. */ @property (readonly, nonatomic) OFSet OF_GENERIC(OFString *) *pressedButtons; /** * @brief The number of analog sticks the controller has. */ @property (readonly, nonatomic) size_t numAnalogSticks; /** * @brief Returns the number of available controllers. * * @return The number of available controllers */ + (size_t)numControllers; /** * @brief Returns the specified controller. * * @param index The index of the controller to return * @return The specified controller */ + (OFGameController *)controllerWithIndex: (size_t)index; - (instancetype)init OF_UNAVAILABLE; /** * @brief Returns the current position of the specified analog stick. * * The range is from (-1, -1) to (1, 1). * * @param index The index of the analog stick whose position to return * @return The current position of the specified analog stick */ - (OFPoint)positionOfAnalogStickWithIndex: (size_t)index; @end OF_ASSUME_NONNULL_END |