Permalink
Browse files

when you're not logged in, displys a not-highlighted HDD save button

  • Loading branch information...
boxmein committed May 1, 2015
1 parent bf001df commit 424d1d4b473ee7167670db84d4febfc7bda10472
Showing with 9 additions and 2 deletions.
  1. +8 −2 src/gui/game/GameView.cpp
  2. +1 −0 src/gui/game/GameView.h
@@ -157,6 +157,7 @@ GameView::GameView():
drawSnap(false),
shiftBehaviour(false),
ctrlBehaviour(false),
loggedIn(false),
altBehaviour(false),
showHud(true),
showDebug(false),
@@ -865,13 +866,16 @@ void GameView::NotifyUserChanged(GameModel * sender)
loginButton->SetText("[sign in]");
((SplitButton*)loginButton)->SetShowSplit(false);
((SplitButton*)loginButton)->SetRightToolTip("Sign in to simulation server");
enableCtrlBehaviour();
loggedIn = false;
}
else
{
loginButton->SetText(sender->GetUser().Username);
((SplitButton*)loginButton)->SetShowSplit(true);
((SplitButton*)loginButton)->SetRightToolTip("Edit profile");
loggedIn = true;
}
saveSimulationButtonEnabled = sender->GetUser().ID;
NotifySaveChanged(sender);
@@ -921,11 +925,13 @@ void GameView::NotifySaveChanged(GameModel * sender)
if (sender->GetUser().ID)
{
loggedIn = true;
upVoteButton->Appearance.BorderDisabled = upVoteButton->Appearance.BorderInactive;
downVoteButton->Appearance.BorderDisabled = downVoteButton->Appearance.BorderInactive;
}
else
{
loggedIn = false;
upVoteButton->Appearance.BorderDisabled = ui::Colour(100, 100, 100);
downVoteButton->Appearance.BorderDisabled = ui::Colour(100, 100, 100);
}
@@ -1990,7 +1996,7 @@ void GameView::SetSaveButtonTooltips()
else if (((SplitButton*)saveSimulationButton)->GetShowSplit())
((SplitButton*)saveSimulationButton)->SetToolTips("Reupload the current simulation", "Modify simulation properties");
else
((SplitButton*)saveSimulationButton)->SetToolTips("Reupload the current simulation", "Upload a new simulation");
((SplitButton*)saveSimulationButton)->SetToolTips("Reupload the current simulation", "Upload a new simulation. Hold Ctrl to save offline.");
}
void GameView::OnDraw()
@@ -40,6 +40,7 @@ class GameView: public ui::Window
bool drawSnap;
bool shiftBehaviour;
bool ctrlBehaviour;
bool loggedIn;
bool altBehaviour;
bool showHud;
bool showDebug;

0 comments on commit 424d1d4

Please sign in to comment.