show input devices in TestInput
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
#include "ScreenDimensions.h"
|
#include "ScreenDimensions.h"
|
||||||
#include "GameManager.h"
|
#include "GameManager.h"
|
||||||
#include "PrefsManager.h"
|
#include "PrefsManager.h"
|
||||||
|
#include "RageInput.h"
|
||||||
|
|
||||||
|
|
||||||
REGISTER_SCREEN_CLASS( ScreenTestInput );
|
REGISTER_SCREEN_CLASS( ScreenTestInput );
|
||||||
@@ -22,6 +23,27 @@ void ScreenTestInput::Init()
|
|||||||
{
|
{
|
||||||
ScreenWithMenuElements::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<InputDevice> vDevices;
|
||||||
|
vector<CString> 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.LoadFromFont( THEME->GetPathF("Common","normal") );
|
||||||
m_textInputs.SetXY( SCREEN_CENTER_X-250, SCREEN_CENTER_Y );
|
m_textInputs.SetXY( SCREEN_CENTER_X-250, SCREEN_CENTER_Y );
|
||||||
m_textInputs.SetDiffuse( RageColor(1,1,1,1) );
|
m_textInputs.SetDiffuse( RageColor(1,1,1,1) );
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ public:
|
|||||||
virtual void MenuBack( PlayerNumber pn );
|
virtual void MenuBack( PlayerNumber pn );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
BitmapText m_textDevices;
|
||||||
BitmapText m_textInputs;
|
BitmapText m_textInputs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user