From b03a55d199378ecbeb06430402fc1376c032f546 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Fri, 3 Jun 2005 19:03:13 +0000 Subject: [PATCH] show input devices in TestInput --- stepmania/src/ScreenTestInput.cpp | 22 ++++++++++++++++++++++ stepmania/src/ScreenTestInput.h | 1 + 2 files changed, 23 insertions(+) diff --git a/stepmania/src/ScreenTestInput.cpp b/stepmania/src/ScreenTestInput.cpp index 835933bc2b..f2a208b874 100644 --- a/stepmania/src/ScreenTestInput.cpp +++ b/stepmania/src/ScreenTestInput.cpp @@ -10,6 +10,7 @@ #include "ScreenDimensions.h" #include "GameManager.h" #include "PrefsManager.h" +#include "RageInput.h" REGISTER_SCREEN_CLASS( ScreenTestInput ); @@ -22,6 +23,27 @@ void ScreenTestInput::Init() { ScreenWithMenuElements::Init(); + m_textDevices.LoadFromFont( THEME->GetPathF("Common","normal") ); + m_textDevices.SetXY( SCREEN_LEFT+20, SCREEN_TOP+80 ); + m_textDevices.SetDiffuse( RageColor(1,1,1,1) ); + m_textDevices.SetZoom( 0.7f ); + m_textDevices.SetHorizAlign( Actor::align_left ); + { + vector vDevices; + vector vDescriptions; + INPUTMAN->GetDevicesAndDescriptions( vDevices, vDescriptions ); + FOREACH( CString, vDescriptions, s ) + { + if( *s == "MonkeyKeyboard" ) + { + vDescriptions.erase( s ); + break; + } + } + m_textDevices.SetText( join("\n",vDescriptions) ); + } + this->AddChild( &m_textDevices ); + m_textInputs.LoadFromFont( THEME->GetPathF("Common","normal") ); m_textInputs.SetXY( SCREEN_CENTER_X-250, SCREEN_CENTER_Y ); m_textInputs.SetDiffuse( RageColor(1,1,1,1) ); diff --git a/stepmania/src/ScreenTestInput.h b/stepmania/src/ScreenTestInput.h index 876ccb17d0..a9754f2305 100644 --- a/stepmania/src/ScreenTestInput.h +++ b/stepmania/src/ScreenTestInput.h @@ -23,6 +23,7 @@ public: virtual void MenuBack( PlayerNumber pn ); private: + BitmapText m_textDevices; BitmapText m_textInputs; };