summaryrefslogtreecommitdiff
path: root/src/game/GameController.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2013-03-16 17:45:18 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2013-03-16 17:45:18 (GMT)
commitf05044ab68e51ce9c374f6af09284051efcda449 (patch)
tree6ae35ed5f6f3395593fc0d2c90780d8162f302e7 /src/game/GameController.cpp
parentd383d6d7e5e1d3ca0856c02ebbcea5e9b8b2ff4e (diff)
downloadpowder-f05044ab68e51ce9c374f6af09284051efcda449.zip
powder-f05044ab68e51ce9c374f6af09284051efcda449.tar.gz
APIRequest, Aync methods for client, Profile edit/viewer (WIP)
Diffstat (limited to 'src/game/GameController.cpp')
-rw-r--r--src/game/GameController.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp
index 017aa58..1493b39 100644
--- a/src/game/GameController.cpp
+++ b/src/game/GameController.cpp
@@ -17,6 +17,7 @@
#include "GameModelException.h"
#include "simulation/Air.h"
#include "elementsearch/ElementSearchActivity.h"
+#include "profile/ProfileActivity.h"
#include "colourpicker/ColourPickerActivity.h"
#include "update/UpdateActivity.h"
#include "Notification.h"
@@ -1067,8 +1068,15 @@ void GameController::OpenLocalBrowse()
void GameController::OpenLogin()
{
- loginWindow = new LoginController();
- ui::Engine::Ref().ShowWindow(loginWindow->GetView());
+ if(Client::Ref().GetAuthUser().ID)
+ {
+ new ProfileActivity(Client::Ref().GetAuthUser().Username);
+ }
+ else
+ {
+ loginWindow = new LoginController();
+ ui::Engine::Ref().ShowWindow(loginWindow->GetView());
+ }
}
void GameController::OpenElementSearch()