summaryrefslogtreecommitdiff
path: root/src/game/GameView.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-07-24 14:21:01 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-07-24 14:21:01 (GMT)
commitbc2e4ab23faa02164ba7e029c90868484184ec3b (patch)
treec1b4cde3fa4a9a73a8ad68058dae76f0bdbf6d0c /src/game/GameView.cpp
parent43ec3af8d7cbd676723bab281384d9659f8f56f7 (diff)
downloadpowder-bc2e4ab23faa02164ba7e029c90868484184ec3b.zip
powder-bc2e4ab23faa02164ba7e029c90868484184ec3b.tar.gz
Adjust icon positions
Diffstat (limited to 'src/game/GameView.cpp')
-rw-r--r--src/game/GameView.cpp33
1 files changed, 22 insertions, 11 deletions
diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp
index 6b50d31..18d0bec 100644
--- a/src/game/GameView.cpp
+++ b/src/game/GameView.cpp
@@ -92,7 +92,7 @@ GameView::GameView():
v->c->OpenSaveWindow();
}
};
- saveSimulationButton = new ui::Button(ui::Point(currentX, Size.Y-16), ui::Point(150, 15));
+ saveSimulationButton = new ui::Button(ui::Point(currentX, Size.Y-16), ui::Point(150, 15), "[untitled simulation]");
saveSimulationButton->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
saveSimulationButton->SetIcon(IconSave);
currentX+=151;
@@ -141,7 +141,7 @@ GameView::GameView():
v->c->OpenTags();
}
};
- tagSimulationButton = new ui::Button(ui::Point(currentX, Size.Y-16), ui::Point(250, 15));
+ tagSimulationButton = new ui::Button(ui::Point(currentX, Size.Y-16), ui::Point(250, 15), "[no tags set]");
tagSimulationButton->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
tagSimulationButton->SetIcon(IconTag);
currentX+=251;
@@ -173,7 +173,7 @@ GameView::GameView():
v->c->OpenLogin();
}
};
- loginButton = new ui::Button(ui::Point(Size.X-141, Size.Y-16), ui::Point(92, 15), "Login");
+ loginButton = new ui::Button(ui::Point(Size.X-141, Size.Y-16), ui::Point(92, 15), "[sign in]");
loginButton->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
loginButton->SetIcon(IconLogin);
loginButton->SetActionCallback(new LoginAction(this));
@@ -520,7 +520,7 @@ void GameView::NotifyUserChanged(GameModel * sender)
{
if(!sender->GetUser().ID)
{
- loginButton->SetText("Login");
+ loginButton->SetText("[sign in]");
}
else
{
@@ -567,25 +567,36 @@ void GameView::NotifySaveChanged(GameModel * sender)
{
std::stringstream tagsStream;
std::vector<string> tags = sender->GetSave()->GetTags();
- for(int i = 0; i < tags.size(); i++)
+ if(tags.size())
{
- tagsStream << sender->GetSave()->GetTags()[i];
- if(i < tags.size()-1)
- tagsStream << " ";
+ for(int i = 0; i < tags.size(); i++)
+ {
+ tagsStream << sender->GetSave()->GetTags()[i];
+ if(i < tags.size()-1)
+ tagsStream << " ";
+ }
+ tagSimulationButton->SetText(tagsStream.str());
+ }
+ else
+ {
+ tagSimulationButton->SetText("[no tags set]");
}
- tagSimulationButton->SetText(tagsStream.str());
+ }
+ else
+ {
+ tagSimulationButton->SetText("[no tags set]");
}
}
else
{
- saveSimulationButton->SetText("");
+ saveSimulationButton->SetText("[untitled simulation]");
reloadButton->Enabled = false;
upVoteButton->Enabled = false;
upVoteButton->Appearance.BackgroundInactive = (ui::Colour(0, 0, 0));
downVoteButton->Enabled = false;
upVoteButton->Appearance.BackgroundInactive = (ui::Colour(0, 0, 0));
tagSimulationButton->Enabled = false;
- tagSimulationButton->SetText("");
+ tagSimulationButton->SetText("[no tags set]");
}
}