Skip to content

Commit b932999

Browse files
committed
ReviveOverlay: Show reminder when not logged in.
1 parent 9dcc61d commit b932999

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

ReviveOverlay/oculusplatform.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "oculusplatform.h"
22
#include "windowsservices.h"
3+
#include "trayiconcontroller.h"
34

45
const ovrID COculusPlatform::AppId = 572698886195608; // Oculus Runtime
56

@@ -46,6 +47,8 @@ bool COculusPlatform::Init(QString basePath)
4647
QString email, password;
4748
if (WindowsServices::ReadCredentials(email, password))
4849
Login(email, password);
50+
else
51+
CTrayIconController::SharedInstance()->ShowInformation(TrayInfo_OculusNotLinked);
4952
return true;
5053
}
5154
return false;

ReviveOverlay/trayiconcontroller.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,14 @@ void CTrayIconController::ShowInformation(ETrayInfo info)
8686
break;
8787
case TrayInfo_OculusLibraryNotFound:
8888
m_trayIcon->showMessage("Revive did not start correctly",
89-
"No Oculus Library was found, please install the Oculus Software from oculus.com/setup.",
89+
"No Oculus Library was found, click here to install the Oculus Software from oculus.com/setup.",
9090
QSystemTrayIcon::Warning);
9191
break;
92+
case TrayInfo_OculusNotLinked:
93+
m_trayIcon->showMessage("Oculus account not linked",
94+
"Click here to log into your Oculus Account to enable online multiplayer with Revive.",
95+
QSystemTrayIcon::Information);
96+
break;
9297
}
9398
}
9499

@@ -135,6 +140,9 @@ void CTrayIconController::messageClicked()
135140
case TrayInfo_OculusLibraryNotFound:
136141
QDesktopServices::openUrl(QUrl("https://oculus.com/setup"));
137142
break;
143+
case TrayInfo_OculusNotLinked:
144+
login();
145+
break;
138146
}
139147
}
140148

@@ -174,6 +182,7 @@ void CTrayIconController::acceptLogin(QString& username, QString& password, int&
174182
{
175183
COculusPlatform::SharedInstance()->Logout();
176184
WindowsServices::DeleteCredentials();
185+
return;
177186
}
178187

179188
if (COculusPlatform::SharedInstance()->Login(username, password))

ReviveOverlay/trayiconcontroller.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ enum ETrayInfo
1313
{
1414
TrayInfo_OculusLibraryNotFound,
1515
TrayInfo_AutoLaunchEnabled,
16-
TrayInfo_AutoLaunchFailed
16+
TrayInfo_AutoLaunchFailed,
17+
TrayInfo_OculusNotLinked
1718
};
1819

1920
class CTrayIconController : public QObject

0 commit comments

Comments
 (0)