From d308ed0187bad06626eaf4fdad11305d04595b60 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 11 Oct 2003 08:52:07 +0000 Subject: [PATCH] finish input test screen --- .../BGAnimations/ScreenTestInput in.redir | 1 + .../BGAnimations/ScreenTestInput out.redir | 1 + stepmania/Themes/default/metrics.ini | 15 ++++++++--- stepmania/src/ScreenTestInput.cpp | 25 ++++++++++++++++--- stepmania/src/ScreenTestInput.h | 5 ++-- 5 files changed, 38 insertions(+), 9 deletions(-) create mode 100644 stepmania/Themes/default/BGAnimations/ScreenTestInput in.redir create mode 100644 stepmania/Themes/default/BGAnimations/ScreenTestInput out.redir diff --git a/stepmania/Themes/default/BGAnimations/ScreenTestInput in.redir b/stepmania/Themes/default/BGAnimations/ScreenTestInput in.redir new file mode 100644 index 0000000000..0f6547301b --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenTestInput in.redir @@ -0,0 +1 @@ +_options to options \ No newline at end of file diff --git a/stepmania/Themes/default/BGAnimations/ScreenTestInput out.redir b/stepmania/Themes/default/BGAnimations/ScreenTestInput out.redir new file mode 100644 index 0000000000..0f6547301b --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenTestInput out.redir @@ -0,0 +1 @@ +_options to options \ No newline at end of file diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 59baf32da8..92f9f70e0a 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -1748,7 +1748,12 @@ StyleIcon=0 TimerSeconds=0 [ScreenCenterImage] -HelpText=Use arrow keys to navigate, ENTER to assign, SPACE to clear, ESCAPE when done. +HelpText=Use arrow keys to translate.::Hold SHIFT and press the arrow keys to scale.::Press SPACE to reset centering. Press ESCAPE when done. +StyleIcon=0 +TimerSeconds=0 + +[ScreenTestInput] +HelpText=Press any button or key. Press ESCAPE when done. StyleIcon=0 TimerSeconds=0 @@ -2559,11 +2564,10 @@ TimerSeconds=0 # when using entries that change the screen; otherwise, the only way to # exit the screen when in arcade mode is "exit". -OptionMenuFlags=together;forceallplayers;rows,11;smnavigation +OptionMenuFlags=together;forceallplayers;rows,14;smnavigation # This NextScreen is only used for the "exit" choice. NextScreen=ScreenTitleMenu PrevScreen=ScreenTitleMenu -NumRows=13 Line1=list,Appearance Options;title,; Line2=list,Autogen Options;title,; Line3=list,Background Options;title,; @@ -2577,6 +2581,7 @@ Line10=list,Machine Options;title,; Line11=list,Sound Options;title,; Line12=list,Profile Options;title,; Line13=list,Reload Songs/Courses;title,; +Line14=list,Test Input;title,; [TextBanner] Width=180 @@ -3105,4 +3110,8 @@ Reload Songs/Courses=1,together Reload Songs/CoursesDefault= Reload Songs/Courses,1=screen,ScreenReloadSongs Reload Songs/CoursesName,1=Reload Songs/Courses +Test Input=1,together +Test InputDefault= +Test Input,1=screen,ScreenTestInput +Test InputName,1=Test Input diff --git a/stepmania/src/ScreenTestInput.cpp b/stepmania/src/ScreenTestInput.cpp index 88003a2a2b..86b0508446 100644 --- a/stepmania/src/ScreenTestInput.cpp +++ b/stepmania/src/ScreenTestInput.cpp @@ -74,10 +74,14 @@ void ScreenTestInput::Update( float fDeltaTime ) GameInput gi; if( INPUTMAPPER->DeviceToGame(di,gi) ) { - CString sName = GAMESTATE->GetCurrentGameDef()->m_szButtonNames[b]; - CString sSecondary = GAMESTATE->GetCurrentGameDef()->m_szSecondaryFunction[b]; + CString sName = GAMESTATE->GetCurrentGameDef()->m_szButtonNames[gi.button]; + CString sSecondary = GAMESTATE->GetCurrentGameDef()->m_szSecondaryFunction[gi.button]; - sTemp += "(" + sName + ", " + sSecondary + ")"; + sTemp += " (" + sName + ") " + sSecondary; + } + else + { + sTemp += " (not mapped)"; } asInputs.push_back( sTemp ); @@ -85,7 +89,7 @@ void ScreenTestInput::Update( float fDeltaTime ) } } - m_sDeviceInputs = join( "\n ", asInputs ); + m_textInputs.SetText( join( "\n ", asInputs ) ); } @@ -114,3 +118,16 @@ void ScreenTestInput::HandleScreenMessage( const ScreenMessage SM ) break; } } + +void ScreenTestInput::MenuStart( PlayerNumber pn ) +{ +} + +void ScreenTestInput::MenuBack( PlayerNumber pn ) +{ + if(!m_Menu.IsTransitioning()) + { + SOUND->PlayOnce( THEME->GetPathToS("Common start") ); + m_Menu.StartTransitioning( SM_GoToPrevScreen ); + } +} diff --git a/stepmania/src/ScreenTestInput.h b/stepmania/src/ScreenTestInput.h index 0b7c5ea0e0..bf2379649a 100644 --- a/stepmania/src/ScreenTestInput.h +++ b/stepmania/src/ScreenTestInput.h @@ -30,9 +30,10 @@ public: virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); virtual void HandleScreenMessage( const ScreenMessage SM ); + virtual void MenuStart( PlayerNumber pn ); + virtual void MenuBack( PlayerNumber pn ); + private: - CString m_sDeviceInputs; - CString m_sGameInputs; BitmapText m_textInputs; MenuElements m_Menu;