From 16a7f84c6cde163fd2863b8f1bc292d3b0ea0509 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 10 Jan 2004 03:36:14 +0000 Subject: [PATCH] "more" --- .../default/Graphics/ScreenOptions more.redir | 1 + stepmania/Themes/default/metrics.ini | 9 ++++++ stepmania/src/ScreenOptions.cpp | 28 +++++++++++++++++++ stepmania/src/ScreenOptions.h | 3 ++ 4 files changed, 41 insertions(+) create mode 100644 stepmania/Themes/default/Graphics/ScreenOptions more.redir diff --git a/stepmania/Themes/default/Graphics/ScreenOptions more.redir b/stepmania/Themes/default/Graphics/ScreenOptions more.redir new file mode 100644 index 0000000000..c700c90d39 --- /dev/null +++ b/stepmania/Themes/default/Graphics/ScreenOptions more.redir @@ -0,0 +1 @@ +_blank diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 320e583d53..78c8094014 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -2830,6 +2830,15 @@ ShowBpmInSpeedTitle=0 FrameOnCommand=addx,-640;decelerate,0.3;addx,+640 FrameOffCommand=accelerate,0.3;addx,+640 SeparateExitRow=0 +MoreX=0 +MoreY=0 +MoreOnCommand= +MoreShowMoreCommand= +MoreHideMoreCommand= +MoreExitSelectedP1Command= +MoreExitSelectedP2Command= +MoreExitUnselectedP1Command= +MoreExitUnselectedP2Command= [ScreenMapControllers] EvenLineIn=addx,-640;decelerate,0.5;addx,640; diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index 89d63a610e..fd8b4e6085 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -100,9 +100,11 @@ ScreenOptions::ScreenOptions( CString sClassName ) : Screen(sClassName) // add everything to m_framePage so we can animate everything at once this->AddChild( &m_framePage ); + m_bMoreShown = false; for( int p=0; pGetPathToG( "ScreenOptions more") ); + m_sprMore->SetName( "ScreenOptions", "More" ); + UtilSetXYAndOnCommand( m_sprMore, "ScreenOptions" ); + m_framePage.AddChild( m_sprMore ); + switch( m_InputMode ) { case INPUTMODE_INDIVIDUAL: @@ -360,6 +367,7 @@ void ScreenOptions::Init( InputMode im, OptionRow OptionRows[], int iNumOptionLi row.m_OptionIcons[p].FinishTweening(); } } + m_sprMore->FinishTweening(); } ScreenOptions::~ScreenOptions() @@ -911,8 +919,28 @@ void ScreenOptions::OnChange( PlayerNumber pn ) /* Update all players, since changing one player can move both cursors. */ for( int p=0; pType == Row::ROW_EXIT && m_Rows.back()->m_bHidden; + if( m_bMoreShown != ShowMore ) + { + m_bMoreShown = ShowMore; + UtilCommand( m_sprMore, "ScreenOptions", ShowMore? "ShowMore":"HideMore" ); + } + + const bool ExitSelected = m_Rows[m_iCurrentRow[pn]]->Type == Row::ROW_EXIT; + if( p == pn || GAMESTATE->GetNumSidesJoined() == 1 ) + { + if( m_bWasOnExit[p] != ExitSelected ) + { + m_bWasOnExit[p] = ExitSelected; + UtilCommand( m_sprMore, "ScreenOptions", ssprintf("Exit%sP%i", ExitSelected? "Selected":"Unselected", p+1) ); + } + } + } + const int iCurRow = m_iCurrentRow[pn]; const CString text = GetExplanationText( iCurRow ); diff --git a/stepmania/src/ScreenOptions.h b/stepmania/src/ScreenOptions.h index 5e31becf39..058c4fcd10 100644 --- a/stepmania/src/ScreenOptions.h +++ b/stepmania/src/ScreenOptions.h @@ -144,6 +144,9 @@ private: BitmapText m_textExplanation[NUM_PLAYERS]; DualScrollBar m_ScrollBar; + AutoActor m_sprMore; + bool m_bMoreShown, m_bWasOnExit[NUM_PLAYERS]; + RageSound m_SoundChangeCol; RageSound m_SoundNextRow; RageSound m_SoundPrevRow;