Don't forget the merging.

This commit is contained in:
Jason Felds
2011-02-26 19:17:44 -05:00
4 changed files with 91 additions and 3 deletions
+7
View File
@@ -13,6 +13,13 @@ _____________________________________________________________________________
sm-ssc v1.2.3 | 2011022?
--------------------------------------------------------------------------------
20110226
--------
* [ScreenOptionsToggleSongs] The structure of this screen has now changed.
Before, it contained the entire list of songs. Now, the main page
(ScreenOptionsToggleSongs) holds the groups, and a sub-page
(ScreenOptionsToggleSongsSubPage) holds the songs in each group. [AJ]
20110225
--------
* Add lifts and fakes to all Pump noteskins. [Daisuke Master, Wolfman2000]
+2
View File
@@ -412,6 +412,7 @@ ScoreDisplay=ScoreDisplay
Scoreboard=Enables scoreboard
ScoringType=Defines which scoring method to use.
Scroll=Scroll
Select Group=Toggle Songs in this Group.
Select Profile=Choose a profile
Server=Start Local Server
Servers=Servers
@@ -442,6 +443,7 @@ Test Lights=Test the responsiveness of connected lights.
TextureColorDepth=Choose the color depth of textures. 32 bit textures use more memory, but look nicer.
Theme=Choose from this list of installed theme packs.
TimingWindowScale=Increase this value to cause your steps to be judged more strictly (i.e. shrink the timing window).
Toggle Song=Toggle Song
Turn=Turn
Transfer Edits to USB=Transfer Edits to USB
Transfer Edits from USB=Transfer Edits from USB
+63 -3
View File
@@ -7,16 +7,76 @@
#include "SongManager.h"
#include "UnlockManager.h"
#include "PrefsManager.h"
#include "MessageManager.h"
// main page (group list)
REGISTER_SCREEN_CLASS( ScreenOptionsToggleSongs );
REGISTER_SCREEN_CLASS( ScreenOptionsToggleSongsSubPage );
void ScreenOptionsToggleSongs::BeginScreen()
{
m_asGroups.clear();
vector<OptionRowHandler*> vHands;
vector<RString> asAllGroups;
SONGMAN->GetSongGroupNames(asAllGroups);
FOREACH_CONST( RString, asAllGroups , s )
{
vHands.push_back( OptionRowHandlerUtil::MakeNull() );
OptionRowDefinition &def = vHands.back()->m_Def;
RString sGroup = *s;
def.m_sName = sGroup;
def.m_sExplanationName = "Select Group";
def.m_bAllowThemeTitle = false; // not themable
def.m_bAllowThemeItems = false; // already themed
def.m_bOneChoiceForAllPlayers = true;
def.m_vsChoices.clear();
def.m_vsChoices.push_back( "" );
m_asGroups.push_back( sGroup );
}
ScreenOptions::InitMenu( vHands );
ScreenOptions::BeginScreen();
}
void ScreenOptionsToggleSongs::ProcessMenuStart( const InputEventPlus &input )
{
if( IsTransitioning() )
return;
// switch to the subpage with the specified group
int iRow = GetCurrentRow();
OptionRow &row = *m_pRows[iRow];
if( row.GetRowType() == OptionRow::RowType_Exit )
{
ScreenOptions::ProcessMenuStart( input );
return;
}
ToggleSongs::m_sGroup = m_asGroups[iRow];
SCREENMAN->SetNewScreen("ScreenOptionsToggleSongsSubPage");
}
void ScreenOptionsToggleSongs::ImportOptions( int row, const vector<PlayerNumber> &vpns )
{
}
void ScreenOptionsToggleSongs::ExportOptions( int row, const vector<PlayerNumber> &vpns )
{
}
// subpage (has the songs in a specific group)
void ScreenOptionsToggleSongsSubPage::BeginScreen()
{
m_apSongs.clear();
vector<OptionRowHandler*> vHands;
const vector<Song *> &apAllSongs = SONGMAN->GetAllSongs();
const vector<Song *> &apAllSongs = SONGMAN->GetSongs(ToggleSongs::m_sGroup);
FOREACH_CONST( Song *, apAllSongs , s )
{
Song *pSong = *s;
@@ -43,7 +103,7 @@ void ScreenOptionsToggleSongs::BeginScreen()
ScreenOptions::BeginScreen();
}
void ScreenOptionsToggleSongs::ImportOptions( int iRow, const vector<PlayerNumber> &vpns )
void ScreenOptionsToggleSongsSubPage::ImportOptions( int iRow, const vector<PlayerNumber> &vpns )
{
if( iRow >= (int)m_apSongs.size() ) // exit row
return;
@@ -54,7 +114,7 @@ void ScreenOptionsToggleSongs::ImportOptions( int iRow, const vector<PlayerNumbe
row.SetOneSharedSelection( iSelection );
}
void ScreenOptionsToggleSongs::ExportOptions( int iRow, const vector<PlayerNumber> &vpns )
void ScreenOptionsToggleSongsSubPage::ExportOptions( int iRow, const vector<PlayerNumber> &vpns )
{
if( iRow >= (int)m_apSongs.size() ) // exit row
return;
+19
View File
@@ -4,11 +4,30 @@
#include "ScreenOptions.h"
#include "Song.h"
// Can this be done any better? -aj
namespace ToggleSongs
{
RString m_sGroup;
}
class ScreenOptionsToggleSongs: public ScreenOptions
{
public:
virtual void BeginScreen();
private:
virtual void ImportOptions( int row, const vector<PlayerNumber> &vpns );
virtual void ExportOptions( int row, const vector<PlayerNumber> &vpns );
virtual void ProcessMenuStart( const InputEventPlus &input );
vector<RString> m_asGroups;
};
class ScreenOptionsToggleSongsSubPage: public ScreenOptions
{
public:
virtual void BeginScreen();
private:
virtual void ImportOptions( int row, const vector<PlayerNumber> &vpns );
virtual void ExportOptions( int row, const vector<PlayerNumber> &vpns );