|
From: Tapio V. <aa...@us...> - 2010-08-22 00:11:11
|
Module: performous
Branch: master
Commit: c06c68e9551ec1e5136e1888e18fb41d1e1df4c1
Author: Tapio Vierros <tap...@gm...>
Date: Sun Aug 22 03:09:53 2010 +0300
Fix some bugs in joining menu introduced by recent i18n.
---
game/dancegraph.cc | 4 ++--
game/guitargraph.cc | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index f2f8eaf..867c088 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -115,7 +115,7 @@ void DanceGraph::setupJoinMenu() {
// Add tracks to option list
for (DanceTracks::const_iterator it = m_song.danceTracks.begin(); it != m_song.danceTracks.end(); ++it, ++i) {
ol.push_back(it->first);
- if (m_trackOpt == it->first) cur = i; // Find the index of current track
+ if (m_gamingMode == it->first) cur = i; // Find the index of current track
}
m_selectedTrack = ConfigItem(ol); // Create a ConfigItem from the option list
m_selectedTrack.select(cur); // Set the selection to current level
@@ -284,7 +284,7 @@ void DanceGraph::engine() {
else if (ev.nav == input::DOWN) m_menu.move(1);
difficulty_changed = true;
// See if anything changed
- if (m_selectedTrack.so() != getTrack()) setTrack(m_selectedTrack.so());
+ if (m_selectedTrack.so() != m_gamingMode) setTrack(m_selectedTrack.so());
else if (boost::lexical_cast<int>(m_selectedDifficulty.so()) != m_level)
difficulty(DanceDifficulty(boost::lexical_cast<int>(m_selectedDifficulty.so())));
else if (m_rejoin.b()) { unjoin(); setupJoinMenu(); m_input.addEvent(input::Event()); }
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index ece2397..e44638c 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -143,7 +143,7 @@ void GuitarGraph::setupJoinMenu() {
// Add tracks to option list
for (InstrumentTracksConstPtr::const_iterator it = m_instrumentTracks.begin(); it != m_instrumentTracks.end(); ++it, ++i) {
ol.push_back(it->first);
- if (m_trackOpt == it->first) cur = i; // Find the index of current track
+ if (m_track_index->first == it->first) cur = i; // Find the index of current track
}
m_selectedTrack = ConfigItem(ol); // Create a ConfigItem from the option list
m_selectedTrack.select(cur); // Set the selection to current track
@@ -307,7 +307,7 @@ void GuitarGraph::engine() {
else if (ev.type == input::Event::PICK && ev.button == 1) m_menu.action(-1);
else if (ev.nav == input::START) m_menu.action();
// See if anything changed
- if (!m_drums && m_selectedTrack.so() != getTrack()) setTrack(m_selectedTrack.so());
+ if (!m_drums && m_selectedTrack.so() != m_track_index->first) setTrack(m_selectedTrack.so());
else if (boost::lexical_cast<int>(m_selectedDifficulty.so()) != m_level)
difficulty(Difficulty(boost::lexical_cast<int>(m_selectedDifficulty.so())));
else if (m_rejoin.b()) { unjoin(); setupJoinMenu(); m_input.addEvent(input::Event()); }
|