|
From: Tapio V. <aa...@us...> - 2009-12-11 12:45:38
|
Module: performous
Branch: dance
Commit: a62d81d80e18c1d8526b5087fa722d134735ac72
Author: Tapio Vierros <tap...@gm...>
Date: Wed Dec 9 00:08:01 2009 +0200
Tweaks to Players screen.
---
game/screen_players.cc | 19 ++++++++++---------
game/screen_players.hh | 2 +-
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/game/screen_players.cc b/game/screen_players.cc
index ee0130e..b8e8951 100644
--- a/game/screen_players.cc
+++ b/game/screen_players.cc
@@ -84,11 +84,12 @@ void ScreenPlayers::manageEvent(SDL_Event event) {
// frustrating for second one that he cannot enter, so better go for next one...
}
}
- // The rest are only available when there are songs available
else if (m_players.empty()) return;
else if (key == SDLK_SPACE || (key == SDLK_PAUSE || (key == SDLK_p && mod & KMOD_CTRL))) m_audio.togglePause();
else if (key == SDLK_LEFT) m_players.advance(-1);
else if (key == SDLK_RIGHT) m_players.advance(1);
+ else if (key == SDLK_UP) m_players.advance(-1);
+ else if (key == SDLK_DOWN) m_players.advance(1);
else if (key == SDLK_PAGEUP) m_players.advance(-10);
else if (key == SDLK_PAGEDOWN) m_players.advance(10);
}
@@ -115,14 +116,14 @@ void ScreenPlayers::draw() {
}
} else {
// Format the player information text
- oss_song << m_database.scores.front().track << "\n";
+ oss_song << m_database.scores.front().track << '\n';
// TODO: use boost::format
- oss_song << "You reached " << m_database.scores.front().score << " points!";
- oss_order << "Please enter your Name!\n"
- << "Name: " << m_players.current().name << '\n';
- m_database.queryPerPlayerHiscore(oss_order);
- oss_order << "\nSearch Text: "
- << (m_search.text.empty() ? std::string("please enter") : m_search.text)
+ oss_song << _("You reached") << ' ' << m_database.scores.front().score << ' ' << _("points!");
+ oss_order << _("Change player with arrow keys.") << '\n'
+ << _("Name:") << ' ' << m_players.current().name << '\n';
+ //m_database.queryPerPlayerHiscore(oss_order);
+ oss_order << '\n'
+ << (m_search.text.empty() ? _("Type text to filter or create a new player.") : std::string(_("Search Text:")) + " " + m_search.text)
<< '\n';
double spos = m_players.currentPosition(); // This needs to be polled to run the animation
@@ -159,7 +160,7 @@ void ScreenPlayers::draw() {
theme->song.draw(oss_song.str());
theme->order.draw(oss_order.str());
- // Schedule playback change if the chosen song has changed
+ // Schedule playback change if the chosen song has changed
if (music != m_playReq) { m_playReq = music; m_playTimer.setValue(0.0); }
// Play/stop preview playback (if it is the time)
if (music != m_playing && m_playTimer.get() > 0.4) {
diff --git a/game/screen_players.hh b/game/screen_players.hh
index 5786d5b..c9d9941 100644
--- a/game/screen_players.hh
+++ b/game/screen_players.hh
@@ -16,7 +16,7 @@ class ThemeSongs;
class LayoutSinger;
-/** song chooser screen.
+/** Player hiscore addition screen.
Database is passed as argument, but only the players is stored
and used everywhere.
*/
|