![]() |
libvirtualhid 19
Cross-platform C++ library for virtual HID devices.
|
Compact set of pressed gamepad buttons. More...
#include <src/include/libvirtualhid/types.hpp>
Public Member Functions | |
| void | clear () |
| Clear all buttons. | |
| std::uint32_t | raw_bits () const |
| Get the raw bitset value. | |
| void | reset (GamepadButton button) |
| Clear a button. | |
| void | set (GamepadButton button, bool pressed=true) |
| Set or clear a button. | |
| bool | test (GamepadButton button) const |
| Check whether a button is pressed. | |
Compact set of pressed gamepad buttons.
| std::uint32_t lvh::ButtonSet::raw_bits | ( | ) | const |
Get the raw bitset value.
| void lvh::ButtonSet::reset | ( | GamepadButton | button | ) |
Clear a button.
| button | Button to clear. |
| void lvh::ButtonSet::set | ( | GamepadButton | button, |
| bool | pressed = true ) |
Set or clear a button.
| button | Button to update. |
| pressed | Whether the button is pressed. |
| bool lvh::ButtonSet::test | ( | GamepadButton | button | ) | const |
Check whether a button is pressed.
| button | Button to test. |
true when the button is pressed.