Reimplemented sound effects.

Added chaperone proximity warnings.
Other bugfixes and improvements.
This commit is contained in:
2017-08-15 21:44:29 +02:00
parent 0bc693c76b
commit f48b583aca
17 changed files with 1523 additions and 54 deletions
+19 -1
View File
@@ -19,8 +19,10 @@
#include <QQuickWindow>
#include <QQuickItem>
#include <QQuickRenderControl>
#include <QSoundEffect>
#include <memory>
#include "logging.h"
#include "utils/ChaperoneUtils.h"
#include "tabcontrollers/SteamVRTabController.h"
#include "tabcontrollers/ChaperoneTabController.h"
@@ -45,7 +47,7 @@ class OverlayController : public QObject {
public:
static constexpr const char* applicationKey = "matzman666.AdvancedSettings";
static constexpr const char* applicationName = "Advanced Settings";
static constexpr const char* applicationVersionString = "v2.4.1";
static constexpr const char* applicationVersionString = "v2.5";
private:
vr::VROverlayHandle_t m_ulOverlayHandle = vr::k_ulOverlayHandleInvalid;
@@ -69,6 +71,12 @@ private:
QUrl m_runtimePathUrl;
utils::ChaperoneUtils m_chaperoneUtils;
QSoundEffect activationSoundEffect;
QSoundEffect focusChangedSoundEffect;
QSoundEffect alarm01SoundEffect;
public: // I know it's an ugly hack to make them public to enable external access, but I am too lazy to implement getters.
SteamVRTabController steamVRTabController;
ChaperoneTabController chaperoneTabController;
@@ -103,6 +111,8 @@ public:
bool isDesktopMode() { return desktopMode; };
utils::ChaperoneUtils& chaperoneUtils() noexcept { return m_chaperoneUtils; }
Q_INVOKABLE QString getVersionString();
Q_INVOKABLE QUrl getVRRuntimePathUrl();
@@ -111,6 +121,8 @@ public:
const vr::VROverlayHandle_t& overlayHandle();
const vr::VROverlayHandle_t& overlayThumbnailHandle();
bool pollNextEvent(vr::VROverlayHandle_t ulOverlayHandle, vr::VREvent_t* pEvent);
public slots:
void renderOverlay();
void OnRenderRequest();
@@ -118,6 +130,12 @@ public slots:
void showKeyboard(QString existingText, unsigned long userValue = 0);
void playActivationSound();
void playFocusChangedSound();
void playAlarm01Sound(bool loop = false);
void setAlarm01SoundVolume(float vol);
void cancelAlarm01Sound();
signals:
void keyBoardInputSignal(QString input, unsigned long userValue = 0);