mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-13 14:06:09 +00:00
Input: Add onControllerAdded/Removed callbacks and also display the controller name in the input viewer
This commit is contained in:
@@ -36,8 +36,10 @@ struct AppDelegate {
|
||||
virtual void onSpecialKeyUp(SpecialKey key) noexcept = 0;
|
||||
|
||||
// Controller
|
||||
virtual void onControllerButton(uint32_t idx, ControllerButton button, bool pressed) noexcept = 0;
|
||||
virtual void onControllerAxis(uint32_t idx, ControllerAxis axis, int16_t value) noexcept = 0;
|
||||
virtual void onControllerAdded(uint32_t which) noexcept = 0;
|
||||
virtual void onControllerRemoved(uint32_t which) noexcept = 0;
|
||||
virtual void onControllerButton(uint32_t which, ControllerButton button, bool pressed) noexcept = 0;
|
||||
virtual void onControllerAxis(uint32_t which, ControllerAxis axis, int16_t value) noexcept = 0;
|
||||
|
||||
// virtual void resized([[maybe_unused]] const WindowSize& rect, [[maybe_unused]] bool sync) noexcept {}
|
||||
// virtual void mouseDown([[maybe_unused]] const SWindowCoord& coord, [[maybe_unused]] EMouseButton button,
|
||||
|
||||
@@ -15,6 +15,8 @@ void App_onCharKeyUp(AppDelegate& cb, uint8_t code) noexcept;
|
||||
void App_onSpecialKeyDown(AppDelegate& cb, SpecialKey key, bool isRepeat) noexcept;
|
||||
void App_onSpecialKeyUp(AppDelegate& cb, SpecialKey key) noexcept;
|
||||
// Controller
|
||||
void App_onControllerButton(AppDelegate& cb, uint32_t idx, ControllerButton button, bool pressed) noexcept;
|
||||
void App_onControllerAxis(AppDelegate& cb, uint32_t idx, ControllerAxis axis, int16_t value) noexcept;
|
||||
void App_onControllerAdded(AppDelegate& cb, uint32_t which) noexcept;
|
||||
void App_onControllerRemoved(AppDelegate& cb, uint32_t which) noexcept;
|
||||
void App_onControllerButton(AppDelegate& cb, uint32_t which, ControllerButton button, bool pressed) noexcept;
|
||||
void App_onControllerAxis(AppDelegate& cb, uint32_t which, ControllerAxis axis, int16_t value) noexcept;
|
||||
} // namespace aurora
|
||||
|
||||
Reference in New Issue
Block a user