From eca5d32eb35ec5e95f4e0c2ae21945264f489e2f Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 22 Jul 2005 05:02:04 +0000 Subject: [PATCH] fix underlay/overlay; we play the state commands so we can do things with them in these modes, so don't hide them --- stepmania/src/ScreenEdit.cpp | 19 +++++++++++-------- stepmania/src/ScreenEdit.h | 17 +++++++++-------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 40ce07cffe..124c60b51c 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -68,6 +68,14 @@ AutoScreenMessage( SM_BackFromStopChange ) AutoScreenMessage( SM_DoSaveAndExit ) AutoScreenMessage( SM_DoExit ) +static const CString EditStateNames[] = { + "Edit", + "Record", + "RecordPaused", + "Playing" +}; +XToString( EditState, NUM_EDIT_STATES ); + const CString INPUT_TIPS_TEXT = #if defined(XBOX) "Up/Down:\n change beat\n" @@ -1872,8 +1880,6 @@ void ScreenEdit::TransitionEditState( EditState em ) switch( em ) { case STATE_EDITING: - m_sprOverlay->PlayCommand( "Edit" ); - /* Important: people will stop playing, change the BG and start again; make sure we reload */ m_Background.Unload(); m_Foreground.Unload(); @@ -1923,8 +1929,6 @@ void ScreenEdit::TransitionEditState( EditState em ) { case STATE_PLAYING: { - m_sprOverlay->PlayCommand( "Play" ); - /* If we're in course display mode, set that up. */ SetupCourseAttacks(); @@ -1953,8 +1957,6 @@ void ScreenEdit::TransitionEditState( EditState em ) case STATE_RECORDING: case STATE_RECORDING_PAUSED: { - m_sprOverlay->PlayCommand( em == STATE_RECORDING? "Record":"RecordPaused" ); - // initialize m_NoteFieldRecord m_NoteDataRecord.CopyAll( m_NoteDataEdit ); @@ -1969,9 +1971,10 @@ void ScreenEdit::TransitionEditState( EditState em ) // // Show/hide depending on em // + m_sprOverlay->PlayCommand( EditStateToString(em) ); + m_sprUnderlay->PlayCommand( EditStateToString(em) ); + m_Background.SetHidden( !PREFSMAN->m_bEditorShowBGChangesPlay || em == STATE_EDITING ); - m_sprUnderlay->SetHidden( em != STATE_EDITING ); - m_sprOverlay->SetHidden( em != STATE_EDITING ); m_autoHeader->SetHidden( em != STATE_EDITING ); m_textInputTips.SetHidden( em != STATE_EDITING ); m_textInfo.SetHidden( em != STATE_EDITING ); diff --git a/stepmania/src/ScreenEdit.h b/stepmania/src/ScreenEdit.h index caf6b173ad..c372112717 100644 --- a/stepmania/src/ScreenEdit.h +++ b/stepmania/src/ScreenEdit.h @@ -22,6 +22,15 @@ const int NUM_EDIT_BUTTON_COLUMNS = 10; struct MenuDef; +enum EditState { + STATE_EDITING, + STATE_RECORDING, + STATE_RECORDING_PAUSED, + STATE_PLAYING, + NUM_EDIT_STATES, + STATE_INVALID +}; + enum EditButton { EDIT_BUTTON_COLUMN_0, @@ -152,14 +161,6 @@ public: protected: virtual ScreenType GetScreenType() const { return m_EditState==STATE_PLAYING ? gameplay : system_menu; } - enum EditState { - STATE_EDITING, - STATE_RECORDING, - STATE_RECORDING_PAUSED, - STATE_PLAYING, - NUM_EDIT_STATES, - STATE_INVALID - }; void TransitionEditState( EditState em ); void ScrollTo( float fDestinationBeat ); void PlayTicks();