ScreenMiniMenu::MiniMenu

This commit is contained in:
Glenn Maynard
2005-07-03 04:50:21 +00:00
parent e7ef5539d0
commit 0259484d16
3 changed files with 20 additions and 10 deletions
+9 -9
View File
@@ -992,7 +992,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
else if( EditIsBeingPressed(EDIT_BUTTON_LAY_ATTACK) )
{
g_iLastInsertAttackTrack = iCol;
SCREENMAN->MiniMenu( &g_InsertAttack, SM_BackFromInsertAttack );
ScreenMiniMenu::MiniMenu( &g_InsertAttack, SM_BackFromInsertAttack );
}
else
{
@@ -1181,14 +1181,14 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
g_AreaMenu.rows[record].bEnabled = bAreaSelected;
g_AreaMenu.rows[convert_beat_to_pause].bEnabled = bAreaSelected;
g_AreaMenu.rows[undo].bEnabled = m_bHasUndo;
SCREENMAN->MiniMenu( &g_AreaMenu, SM_BackFromAreaMenu );
ScreenMiniMenu::MiniMenu( &g_AreaMenu, SM_BackFromAreaMenu );
}
break;
case EDIT_BUTTON_OPEN_EDIT_MENU:
SCREENMAN->MiniMenu( &g_MainMenu, SM_BackFromMainMenu );
ScreenMiniMenu::MiniMenu( &g_MainMenu, SM_BackFromMainMenu );
break;
case EDIT_BUTTON_OPEN_INPUT_HELP:
SCREENMAN->MiniMenu( &g_EditHelp, SM_None );
ScreenMiniMenu::MiniMenu( &g_EditHelp, SM_None );
break;
case EDIT_BUTTON_TOGGLE_ASSIST_TICK:
GAMESTATE->m_SongOptions.m_bAssistTick ^= 1;
@@ -1401,7 +1401,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
}
}
SCREENMAN->MiniMenu( &g_CourseMode, SM_BackFromCourseModeMenu );
ScreenMiniMenu::MiniMenu( &g_CourseMode, SM_BackFromCourseModeMenu );
break;
}
case EDIT_BUTTON_BAKE_RANDOM_FROM_SONG_GROUP:
@@ -1983,7 +1983,7 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector<int> &iAns
g_StepsInformation.rows[air].choices.resize(1); g_StepsInformation.rows[air].choices[0] = ssprintf("%.2f", NoteDataUtil::GetAirRadarValue(m_NoteDataEdit,fMusicSeconds));
g_StepsInformation.rows[freeze].choices.resize(1); g_StepsInformation.rows[freeze].choices[0] = ssprintf("%.2f", NoteDataUtil::GetFreezeRadarValue(m_NoteDataEdit,fMusicSeconds));
g_StepsInformation.rows[chaos].choices.resize(1); g_StepsInformation.rows[chaos].choices[0] = ssprintf("%.2f", NoteDataUtil::GetChaosRadarValue(m_NoteDataEdit,fMusicSeconds));
SCREENMAN->MiniMenu( &g_StepsInformation, SM_BackFromStepsInformation );
ScreenMiniMenu::MiniMenu( &g_StepsInformation, SM_BackFromStepsInformation );
}
break;
case play_whole_song:
@@ -2082,7 +2082,7 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector<int> &iAns
g_SongInformation.rows[sub_title_transliteration].choices.resize(1); g_SongInformation.rows[sub_title_transliteration].choices[0] = pSong->m_sSubTitleTranslit;
g_SongInformation.rows[artist_transliteration].choices.resize(1); g_SongInformation.rows[artist_transliteration].choices[0] = pSong->m_sArtistTranslit;
SCREENMAN->MiniMenu( &g_SongInformation, SM_BackFromSongInformation );
ScreenMiniMenu::MiniMenu( &g_SongInformation, SM_BackFromSongInformation );
}
break;
case edit_bpm:
@@ -2213,13 +2213,13 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector<int> &iAns
g_BackgroundChange.rows[color1]. SetDefaultChoiceIfPresent( bgChange.m_def.m_sColor1 );
g_BackgroundChange.rows[color2]. SetDefaultChoiceIfPresent( bgChange.m_def.m_sColor2 );
SCREENMAN->MiniMenu( &g_BackgroundChange, SM_BackFromBGChange );
ScreenMiniMenu::MiniMenu( &g_BackgroundChange, SM_BackFromBGChange );
}
break;
case preferences:
g_Prefs.rows[pref_show_bgs_play].iDefaultChoice = PREFSMAN->m_bEditorShowBGChangesPlay;
SCREENMAN->MiniMenu( &g_Prefs, SM_BackFromPrefs );
ScreenMiniMenu::MiniMenu( &g_Prefs, SM_BackFromPrefs );
break;
case play_preview_music:
+8
View File
@@ -18,6 +18,14 @@ AutoScreenMessage( SM_GoToCancel )
int ScreenMiniMenu::s_iLastRowCode = -1;
vector<int> ScreenMiniMenu::s_viLastAnswers;
void ScreenMiniMenu::MiniMenu( Menu* pDef, ScreenMessage SM_SendOnOK, ScreenMessage SM_SendOnCancel )
{
ScreenMiniMenu *pNewScreen = new ScreenMiniMenu( pDef->sClassName );
pNewScreen->Init( pDef, SM_SendOnOK, SM_SendOnCancel );
SCREENMAN->ZeroNextUpdate();
SCREENMAN->SetFromNewScreen( pNewScreen );
}
//REGISTER_SCREEN_CLASS( ScreenMiniMenu );
ScreenMiniMenu::ScreenMiniMenu( CString sClassName ) :ScreenOptions( sClassName )
{
+3 -1
View File
@@ -80,8 +80,11 @@ struct Menu
class ScreenMiniMenu : public ScreenOptions
{
public:
static void MiniMenu( Menu* pDef, ScreenMessage smSendOnOK, ScreenMessage smSendOnCancel = SM_None );
ScreenMiniMenu( CString sScreenClass );
void Init( const Menu* pDef, ScreenMessage SM_SendOnOK, ScreenMessage SM_SendOnCancel );
protected:
virtual void OnChange( PlayerNumber pn );
virtual void ImportOptions( int row, const vector<PlayerNumber> &vpns );
@@ -102,7 +105,6 @@ protected:
public:
static int s_iLastRowCode;
static vector<int> s_viLastAnswers;
};
#endif