change how ScreenOptionsToggleSongs works.
Now the main page (ScreenOptionsToggleSongs) has the groups, and a sub-page (ScreenOptionsToggleSongsSubPage) holds all the songs in a specific group.
This commit is contained in:
@@ -13,6 +13,13 @@ _____________________________________________________________________________
|
|||||||
sm-ssc v1.2.3 | 2011022?
|
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
|
20110225
|
||||||
--------
|
--------
|
||||||
* Add lifts and fakes to all Pump noteskins. [Daisuke Master, Wolfman2000]
|
* Add lifts and fakes to all Pump noteskins. [Daisuke Master, Wolfman2000]
|
||||||
|
|||||||
@@ -412,6 +412,7 @@ ScoreDisplay=ScoreDisplay
|
|||||||
Scoreboard=Enables scoreboard
|
Scoreboard=Enables scoreboard
|
||||||
ScoringType=Defines which scoring method to use.
|
ScoringType=Defines which scoring method to use.
|
||||||
Scroll=Scroll
|
Scroll=Scroll
|
||||||
|
Select Group=Toggle Songs in this Group.
|
||||||
Select Profile=Choose a profile
|
Select Profile=Choose a profile
|
||||||
Server=Start Local Server
|
Server=Start Local Server
|
||||||
Servers=Servers
|
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.
|
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.
|
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).
|
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
|
Turn=Turn
|
||||||
Transfer Edits to USB=Transfer Edits to USB
|
Transfer Edits to USB=Transfer Edits to USB
|
||||||
Transfer Edits from USB=Transfer Edits from USB
|
Transfer Edits from USB=Transfer Edits from USB
|
||||||
|
|||||||
@@ -7,16 +7,76 @@
|
|||||||
#include "SongManager.h"
|
#include "SongManager.h"
|
||||||
#include "UnlockManager.h"
|
#include "UnlockManager.h"
|
||||||
#include "PrefsManager.h"
|
#include "PrefsManager.h"
|
||||||
|
#include "MessageManager.h"
|
||||||
|
|
||||||
|
// main page (group list)
|
||||||
REGISTER_SCREEN_CLASS( ScreenOptionsToggleSongs );
|
REGISTER_SCREEN_CLASS( ScreenOptionsToggleSongs );
|
||||||
|
REGISTER_SCREEN_CLASS( ScreenOptionsToggleSongsSubPage );
|
||||||
|
|
||||||
void ScreenOptionsToggleSongs::BeginScreen()
|
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();
|
m_apSongs.clear();
|
||||||
|
|
||||||
vector<OptionRowHandler*> vHands;
|
vector<OptionRowHandler*> vHands;
|
||||||
|
|
||||||
const vector<Song *> &apAllSongs = SONGMAN->GetAllSongs();
|
const vector<Song *> &apAllSongs = SONGMAN->GetSongs(ToggleSongs::m_sGroup);
|
||||||
FOREACH_CONST( Song *, apAllSongs , s )
|
FOREACH_CONST( Song *, apAllSongs , s )
|
||||||
{
|
{
|
||||||
Song *pSong = *s;
|
Song *pSong = *s;
|
||||||
@@ -43,7 +103,7 @@ void ScreenOptionsToggleSongs::BeginScreen()
|
|||||||
ScreenOptions::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
|
if( iRow >= (int)m_apSongs.size() ) // exit row
|
||||||
return;
|
return;
|
||||||
@@ -54,7 +114,7 @@ void ScreenOptionsToggleSongs::ImportOptions( int iRow, const vector<PlayerNumbe
|
|||||||
row.SetOneSharedSelection( iSelection );
|
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
|
if( iRow >= (int)m_apSongs.size() ) // exit row
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -4,11 +4,30 @@
|
|||||||
#include "ScreenOptions.h"
|
#include "ScreenOptions.h"
|
||||||
#include "Song.h"
|
#include "Song.h"
|
||||||
|
|
||||||
|
// Can this be done any better? -aj
|
||||||
|
namespace ToggleSongs
|
||||||
|
{
|
||||||
|
RString m_sGroup;
|
||||||
|
}
|
||||||
|
|
||||||
class ScreenOptionsToggleSongs: public ScreenOptions
|
class ScreenOptionsToggleSongs: public ScreenOptions
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void BeginScreen();
|
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:
|
private:
|
||||||
virtual void ImportOptions( int row, const vector<PlayerNumber> &vpns );
|
virtual void ImportOptions( int row, const vector<PlayerNumber> &vpns );
|
||||||
virtual void ExportOptions( int row, const vector<PlayerNumber> &vpns );
|
virtual void ExportOptions( int row, const vector<PlayerNumber> &vpns );
|
||||||
|
|||||||
Reference in New Issue
Block a user