Add convenience getters
This commit is contained in:
@@ -35,16 +35,22 @@ namespace OpenVulkano::Input
|
||||
|
||||
[[nodiscard]] InputAction* GetAction(const std::string& actionName);
|
||||
|
||||
[[nodiscard]] float GetAxis(const InputAction& action) const { return GetAxis(&action); }
|
||||
[[nodiscard]] float GetAxis(const InputAction* action) const;
|
||||
|
||||
[[nodiscard]] float GetAxis(InputKey key) const;
|
||||
|
||||
[[nodiscard]] bool GetButton(InputAction* action) const;
|
||||
|
||||
[[nodiscard]] bool GetButtonDown(InputAction* action) const;
|
||||
|
||||
[[nodiscard]] bool GetButton(const InputAction& action) const { return GetButton(&action); }
|
||||
[[nodiscard]] bool GetButton(const InputAction* action) const;
|
||||
[[nodiscard]] bool GetButton(InputKey key) const;
|
||||
|
||||
[[nodiscard]] bool GetButtonUp(const InputAction& action) const { return GetButtonUp(&action); }
|
||||
[[nodiscard]] bool GetButtonUp(const InputAction* action) const;
|
||||
[[nodiscard]] bool GetButtonUp(InputKey key) const;
|
||||
|
||||
[[nodiscard]] bool GetButtonDown(const InputAction& action) const { return GetButtonDown(&action); }
|
||||
[[nodiscard]] bool GetButtonDown(const InputAction* action) const;
|
||||
[[nodiscard]] bool GetButtonDown(InputKey key) const;
|
||||
|
||||
[[nodiscard]] InputDevice* GetDevice(InputDeviceType type) const;
|
||||
|
||||
[[nodiscard]] std::vector<InputDevice*> GetDevices(InputDeviceType type) const;
|
||||
|
||||
Reference in New Issue
Block a user