Fixes Actions for Future. (#399)

* removed un-necessary object from default bindings, added system action set

* fixed c++ section for system action
This commit is contained in:
ykeara
2020-04-09 13:06:46 -05:00
committed by GitHub
parent 1ae740463c
commit 456b123a55
6 changed files with 22 additions and 21 deletions
+6 -4
View File
@@ -100,9 +100,10 @@ Wrong action names may not result in direct error messages, but just features
mystically not working. mystically not working.
*/ */
SteamIVRInput::SteamIVRInput() SteamIVRInput::SteamIVRInput()
: m_manifest(), m_mainSet( action_sets::haptic ), : m_manifest(), m_haptics( action_sets::haptic ),
m_music( action_sets::music ), m_motion( action_sets::motion ), m_music( action_sets::music ), m_motion( action_sets::motion ),
m_misc( action_sets::misc ), m_nextTrack( action_keys::nextTrack ), m_misc( action_sets::misc ), m_system( action_sets::system ),
m_nextTrack( action_keys::nextTrack ),
m_previousTrack( action_keys::previousTrack ), m_previousTrack( action_keys::previousTrack ),
m_pausePlayTrack( action_keys::pausePlayTrack ), m_pausePlayTrack( action_keys::pausePlayTrack ),
m_stopTrack( action_keys::stopTrack ), m_stopTrack( action_keys::stopTrack ),
@@ -145,10 +146,11 @@ SteamIVRInput::SteamIVRInput()
m_addRightHapticClick( action_keys::addRightHapticClick ), m_addRightHapticClick( action_keys::addRightHapticClick ),
m_proxSensor( action_keys::proxSensor ), m_proxSensor( action_keys::proxSensor ),
m_leftHand( input_keys::leftHand ), m_rightHand( input_keys::rightHand ), m_leftHand( input_keys::leftHand ), m_rightHand( input_keys::rightHand ),
m_sets( { m_mainSet.activeActionSet(), m_sets( { m_haptics.activeActionSet(),
m_music.activeActionSet(), m_music.activeActionSet(),
m_motion.activeActionSet(), m_motion.activeActionSet(),
m_misc.activeActionSet() } ) m_misc.activeActionSet(),
m_system.activeActionSet() } )
{ {
} }
/*! /*!
+6 -4
View File
@@ -59,9 +59,9 @@ namespace action_keys
constexpr auto hapticsLeft = "/actions/haptic/out/HapticsLeft"; constexpr auto hapticsLeft = "/actions/haptic/out/HapticsLeft";
constexpr auto hapticsRight = "/actions/haptic/out/HapticsRight"; constexpr auto hapticsRight = "/actions/haptic/out/HapticsRight";
constexpr auto proxSensor = "/actions/haptic/in/ProxSensor"; constexpr auto proxSensor = "/actions/haptic/in/ProxSensor";
constexpr auto addLeftHapticClick = "/actions/haptic/in/AddLeftHapticClick"; constexpr auto addLeftHapticClick = "/actions/system/in/AddLeftHapticClick";
constexpr auto addRightHapticClick constexpr auto addRightHapticClick
= "/actions/haptic/in/AddRightHapticClick"; = "/actions/system/in/AddRightHapticClick";
constexpr auto chaperoneToggle = "/actions/misc/in/ChaperoneToggle"; constexpr auto chaperoneToggle = "/actions/misc/in/ChaperoneToggle";
@@ -81,11 +81,12 @@ Keys for different action sets
*/ */
namespace action_sets namespace action_sets
{ {
constexpr auto numberOfSets = 4; constexpr auto numberOfSets = 5;
constexpr auto haptic = "/actions/haptic"; constexpr auto haptic = "/actions/haptic";
constexpr auto music = "/actions/music"; constexpr auto music = "/actions/music";
constexpr auto misc = "/actions/misc"; constexpr auto misc = "/actions/misc";
constexpr auto motion = "/actions/motion"; constexpr auto motion = "/actions/motion";
constexpr auto system = "/actions/system";
} // namespace action_sets } // namespace action_sets
using ActiveActionSets using ActiveActionSets
@@ -184,10 +185,11 @@ public:
private: private:
Manifest m_manifest; Manifest m_manifest;
ActionSet m_mainSet; ActionSet m_haptics;
ActionSet m_music; ActionSet m_music;
ActionSet m_motion; ActionSet m_motion;
ActionSet m_misc; ActionSet m_misc;
ActionSet m_system;
// Music player bindings // Music player bindings
DigitalAction m_nextTrack; DigitalAction m_nextTrack;
+10 -4
View File
@@ -52,12 +52,12 @@
"type": "vibration" "type": "vibration"
}, },
{ {
"name": "/actions/haptic/in/AddLeftHapticClick", "name": "/actions/system/in/AddLeftHapticClick",
"requirement": "optional", "requirement": "optional",
"type": "boolean" "type": "boolean"
}, },
{ {
"name": "/actions/haptic/in/AddRightHapticClick", "name": "/actions/system/in/AddRightHapticClick",
"requirement": "optional", "requirement": "optional",
"type": "boolean" "type": "boolean"
}, },
@@ -222,8 +222,13 @@
}, },
{ {
"name": "/actions/haptic", "name": "/actions/haptic",
"usage": "hidden"
},
{
"name": "/actions/system",
"usage": "leftright" "usage": "leftright"
} }
], ],
"localization" : [ "localization" : [
{ {
@@ -233,6 +238,7 @@
"/actions/music" : "Music", "/actions/music" : "Music",
"/actions/misc" : "Misc", "/actions/misc" : "Misc",
"/actions/motion" : "Motion", "/actions/motion" : "Motion",
"/actions/system" : "System",
"/actions/music/in/NextTrack" : "Play Next Track", "/actions/music/in/NextTrack" : "Play Next Track",
"/actions/music/in/PreviousTrack" : "Play Previous Track", "/actions/music/in/PreviousTrack" : "Play Previous Track",
@@ -241,8 +247,8 @@
"/actions/haptic/out/HapticsLeft" : "Haptics Left", "/actions/haptic/out/HapticsLeft" : "Haptics Left",
"/actions/haptic/out/HapticsRight" : " Haptics Right", "/actions/haptic/out/HapticsRight" : " Haptics Right",
"/actions/haptic/in/AddLeftHapticClick" : " Add Left Haptic Click", "/actions/system/in/AddLeftHapticClick" : " Add Left Haptic Click",
"/actions/haptic/in/AddRightHapticClick" : " Add Right Haptic Click", "/actions/system/in/AddRightHapticClick" : " Add Right Haptic Click",
"/actions/motion/in/LeftHandSpaceTurn" : "Left Hand Space Turn", "/actions/motion/in/LeftHandSpaceTurn" : "Left Hand Space Turn",
"/actions/motion/in/RightHandSpaceTurn" : "Right Hand Space Turn", "/actions/motion/in/RightHandSpaceTurn" : "Right Hand Space Turn",
@@ -26,9 +26,6 @@
} }
] ]
}, },
"/actions/main" : {
"sources" : []
},
"/actions/misc" : { "/actions/misc" : {
"sources" : [ "sources" : [
{ {
@@ -26,9 +26,6 @@
} }
] ]
}, },
"/actions/main" : {
"sources" : []
},
"/actions/misc" : { "/actions/misc" : {
"sources" : [ "sources" : [
{ {
@@ -26,9 +26,6 @@
} }
] ]
}, },
"/actions/main" : {
"sources" : []
},
"/actions/misc" : { "/actions/misc" : {
"sources" : [ "sources" : [
{ {