added main loop logic for videotab
This commit is contained in:
@@ -122,6 +122,7 @@ OverlayController::OverlayController( bool desktopMode,
|
||||
m_reviveTabController.initStage1(
|
||||
m_settingsTabController.forceRevivePage() );
|
||||
m_utilitiesTabController.initStage1();
|
||||
m_videoTabController.initStage1();
|
||||
|
||||
// init action handles
|
||||
|
||||
@@ -251,6 +252,16 @@ OverlayController::OverlayController( bool desktopMode,
|
||||
QQmlEngine::setObjectOwnership( obj, QQmlEngine::CppOwnership );
|
||||
return obj;
|
||||
} );
|
||||
qmlRegisterSingletonType<SteamVRTabController>(
|
||||
qmlSingletonImportName,
|
||||
1,
|
||||
0,
|
||||
"VideoTabController",
|
||||
[](QQmlEngine*, QJSEngine*) {
|
||||
QObject* obj = &(objectAddress->m_videoTabController);
|
||||
QQmlEngine::setObjectOwnership(obj, QQmlEngine::CppOwnership);
|
||||
return obj;
|
||||
});
|
||||
}
|
||||
|
||||
OverlayController::~OverlayController()
|
||||
@@ -405,6 +416,7 @@ void OverlayController::SetWidget( QQuickItem* quickItem,
|
||||
m_settingsTabController.initStage2( this, m_pWindow.get() );
|
||||
m_reviveTabController.initStage2( this, m_pWindow.get() );
|
||||
m_utilitiesTabController.initStage2( this, m_pWindow.get() );
|
||||
m_videoTabController.initStage2(this, m_pWindow.get());
|
||||
}
|
||||
|
||||
void OverlayController::OnRenderRequest()
|
||||
@@ -815,6 +827,7 @@ void OverlayController::mainEventLoop()
|
||||
m_settingsTabController.eventLoopTick();
|
||||
m_reviveTabController.eventLoopTick();
|
||||
m_audioTabController.eventLoopTick();
|
||||
//TODO do I need loop for vide?
|
||||
|
||||
if ( m_ulOverlayThumbnailHandle != vr::k_ulOverlayHandleInvalid )
|
||||
{
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "tabcontrollers/SettingsTabController.h"
|
||||
#include "tabcontrollers/ReviveTabController.h"
|
||||
#include "tabcontrollers/UtilitiesTabController.h"
|
||||
#include "tabcontrollers/VideoTabController.h"
|
||||
|
||||
#include "openvr/ivrinput.h"
|
||||
|
||||
@@ -121,6 +122,7 @@ public: // I know it's an ugly hack to make them public to enable external
|
||||
SettingsTabController m_settingsTabController;
|
||||
ReviveTabController m_reviveTabController;
|
||||
UtilitiesTabController m_utilitiesTabController;
|
||||
VideoTabController m_videoTabController;
|
||||
|
||||
private:
|
||||
QPoint getMousePositionForEvent( vr::VREvent_Mouse_t mouse );
|
||||
|
||||
@@ -103,6 +103,12 @@ namespace advsettings
|
||||
if (value != m_brightnessEnabled)
|
||||
{
|
||||
m_brightnessEnabled = value;
|
||||
if (value) {
|
||||
//TODO enable
|
||||
}
|
||||
else {
|
||||
//TODO disable
|
||||
}
|
||||
if (notify)
|
||||
{
|
||||
emit brightnessEnabledChanged(value);
|
||||
@@ -117,6 +123,16 @@ namespace advsettings
|
||||
if (value != m_brightnessValue)
|
||||
{
|
||||
m_brightnessValue = value;
|
||||
if (value <= 1.0f && value >= 0.0f) {
|
||||
vr::VROverlayError overlayError = VROverlay()->SetOverlayAlpha(m_ulNotificationOverlayHandle, value)
|
||||
//TODO handle error
|
||||
}
|
||||
else {
|
||||
//TODO log warning invalid input?
|
||||
m_brightnessValue = 1.0f;
|
||||
}
|
||||
|
||||
|
||||
if (notify)
|
||||
{
|
||||
emit brightnessValueChanged(value);
|
||||
|
||||
Reference in New Issue
Block a user