8#include "evan/openxr/actions/XrManageButtonsActions.hpp"
9#include "evan/openxr/XrDeviceBackend.hpp"
12 utility::event::HandButtonEvent::Button
buttonType)
15 this->
getLogger().info() <<
"Creating button action for button: "
16 <<
static_cast<int>(_buttonType);
21 this->
getLogger().info() <<
"Destroying button actions...";
28std::vector<std::shared_ptr<utility::event::Event>>
33 std::vector<std::shared_ptr<utility::event::Event>>
events = {};
42 if (
state.currentState != _lastState) {
43 _lastState =
state.currentState;
48 auto buttonEvent = std::make_shared<utility::event::HandButtonEvent>();
57 <<
"Button " <<
static_cast<int>(_buttonType) <<
" is "
58 << (
state.currentState ?
"pressed" :
"not pressed")
70 this->
getLogger().info() <<
"Creating button actions...";
72 _buttonAAction = std::make_unique<XrButtonAction>(
73 utility::event::HandButtonEvent::Button::A);
74 _buttonBAction = std::make_unique<XrButtonAction>(
75 utility::event::HandButtonEvent::Button::B);
76 _buttonXAction = std::make_unique<XrButtonAction>(
77 utility::event::HandButtonEvent::Button::X);
78 _buttonYAction = std::make_unique<XrButtonAction>(
79 utility::event::HandButtonEvent::Button::Y);
80 _buttonMenuAction = std::make_unique<XrButtonAction>(
81 utility::event::HandButtonEvent::Button::Menu);
82 _buttonSystemAction = std::make_unique<XrButtonAction>(
83 utility::event::HandButtonEvent::Button::System);
93 <<
"Button A action created with name: "
105 <<
"Button B action created with name: "
117 <<
"Button X action created with name: "
129 <<
"Button Y action created with name: "
136 "/user/hand/right/input/menu/click";
142 <<
"Button Menu action created with name: "
149 "/user/hand/right/input/system/click";
155 <<
"Button System action created with name: "
160std::vector<std::shared_ptr<utility::event::Event>>
166 std::vector<std::shared_ptr<utility::event::Event>>
events;
The XrDeviceBackend class is responsible for managing the OpenXR device backend, including instance c...
Encapsulates properties required for creating an OpenXR action.
Small result wrapper used by helpers that must return both a status and a value (e....