Move the push-to-toggle y axis adjustment from the playspace page to a new Accessibility Tools tab, packaged as a new height adjustment tool. Height offset is saved and can be set via slider.

This commit is contained in:
Mel Klimushyn
2017-02-07 00:13:41 -08:00
parent 927be598d7
commit 1aa1580a90
12 changed files with 363 additions and 128 deletions
+9 -1
View File
@@ -114,6 +114,7 @@ void OverlayController::Init(QQmlEngine* qmlEngine) {
settingsTabController.initStage1();
reviveTabController.initStage1(settingsTabController.forceRevivePage());
utilitiesTabController.initStage1();
accessibilityTabController.initStage1();
// Set qml context
qmlEngine->rootContext()->setContextProperty("applicationVersion", getVersionString());
@@ -170,6 +171,11 @@ void OverlayController::Init(QQmlEngine* qmlEngine) {
QQmlEngine::setObjectOwnership(obj, QQmlEngine::CppOwnership);
return obj;
});
qmlRegisterSingletonType<SteamVRTabController>("matzman666.advsettings", 1, 0, "AccessibilityTabController", [](QQmlEngine*, QJSEngine*) {
QObject* obj = &getInstance()->accessibilityTabController;
QQmlEngine::setObjectOwnership(obj, QQmlEngine::CppOwnership);
return obj;
});
}
void OverlayController::Shutdown() {
@@ -255,6 +261,7 @@ void OverlayController::SetWidget(QQuickItem* quickItem, const std::string& name
settingsTabController.initStage2(this, m_pWindow.get());
reviveTabController.initStage2(this, m_pWindow.get());
utilitiesTabController.initStage2(this, m_pWindow.get());
accessibilityTabController.initStage2(this, m_pWindow.get());
}
@@ -298,7 +305,7 @@ void OverlayController::OnTimeoutPumpEvents() {
break;
}
}*/
vr::TrackedDevicePose_t devicePoses[vr::k_unMaxTrackedDeviceCount];
vr::VRSystem()->GetDeviceToAbsoluteTrackingPose(vr::TrackingUniverseStanding, 0.0f, devicePoses, vr::k_unMaxTrackedDeviceCount);
fixFloorTabController.eventLoopTick(devicePoses);
@@ -310,6 +317,7 @@ void OverlayController::OnTimeoutPumpEvents() {
reviveTabController.eventLoopTick();
audioTabController.eventLoopTick();
utilitiesTabController.eventLoopTick();
accessibilityTabController.eventLoopTick(vr::VRCompositor()->GetTrackingSpace());
vr::VREvent_t vrEvent;
while (vr::VROverlay()->PollNextOverlayEvent(m_ulOverlayHandle, &vrEvent, sizeof(vrEvent))) {