summaryrefslogtreecommitdiff
path: root/src/gui/game/GameView.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-07-16 20:55:39 (GMT)
committer jacob1 <jfu614@gmail.com>2013-07-16 20:55:39 (GMT)
commit9628a11245acc1b2c8dd213a4dd30a3fb9930e01 (patch)
tree7c2579d816ecc1033597e8c5de80f3f355180a47 /src/gui/game/GameView.cpp
parentd4ff77843426201c6df61f6ae8550bc91a7ac23c (diff)
downloadpowder-9628a11245acc1b2c8dd213a4dd30a3fb9930e01.zip
powder-9628a11245acc1b2c8dd213a4dd30a3fb9930e01.tar.gz
save to server button is disabled when not logged in, but tags are viewable (read only)
Diffstat (limited to 'src/gui/game/GameView.cpp')
-rw-r--r--src/gui/game/GameView.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/game/GameView.cpp b/src/gui/game/GameView.cpp
index 1b811e0..027f06b 100644
--- a/src/gui/game/GameView.cpp
+++ b/src/gui/game/GameView.cpp
@@ -836,6 +836,7 @@ void GameView::NotifyUserChanged(GameModel * sender)
((SplitButton*)loginButton)->SetShowSplit(true);
((SplitButton*)loginButton)->SetRightToolTip("Edit profile");
}
+ saveSimulationButtonEnabled = sender->GetUser().ID;
NotifySaveChanged(sender);
}
@@ -892,7 +893,7 @@ void GameView::NotifySaveChanged(GameModel * sender)
downVoteButton->Appearance.BorderDisabled = ui::Colour(100, 100, 100);
}
- tagSimulationButton->Enabled = (sender->GetSave()->GetID() && sender->GetUser().ID);
+ tagSimulationButton->Enabled = sender->GetSave()->GetID();
if(sender->GetSave()->GetID())
{
std::stringstream tagsStream;
@@ -951,6 +952,7 @@ void GameView::NotifySaveChanged(GameModel * sender)
tagSimulationButton->SetText("[no tags set]");
currentSaveType = 0;
}
+ saveSimulationButton->Enabled = (saveSimulationButtonEnabled || ctrlBehaviour);
c->HistorySnapshot();
}
@@ -1813,6 +1815,7 @@ void GameView::enableCtrlBehaviour()
//Show HDD save & load buttons
saveSimulationButton->Appearance.BackgroundInactive = saveSimulationButton->Appearance.BackgroundHover = ui::Colour(255, 255, 255);
saveSimulationButton->Appearance.TextInactive = saveSimulationButton->Appearance.TextHover = ui::Colour(0, 0, 0);
+ saveSimulationButton->Enabled = true;
searchButton->Appearance.BackgroundInactive = searchButton->Appearance.BackgroundHover = ui::Colour(255, 255, 255);
searchButton->Appearance.TextInactive = searchButton->Appearance.TextHover = ui::Colour(0, 0, 0);
if (currentSaveType == 2)
@@ -1837,6 +1840,7 @@ void GameView::disableCtrlBehaviour()
saveSimulationButton->Appearance.BackgroundInactive = ui::Colour(0, 0, 0);
saveSimulationButton->Appearance.BackgroundHover = ui::Colour(20, 20, 20);
saveSimulationButton->Appearance.TextInactive = saveSimulationButton->Appearance.TextHover = ui::Colour(255, 255, 255);
+ saveSimulationButton->Enabled = saveSimulationButtonEnabled;
searchButton->Appearance.BackgroundInactive = ui::Colour(0, 0, 0);
searchButton->Appearance.BackgroundHover = ui::Colour(20, 20, 20);
searchButton->Appearance.TextInactive = searchButton->Appearance.TextHover = ui::Colour(255, 255, 255);