pass InputMessage down to lua so lua can be used to enter name
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
#include "InputEventPlus.h"
|
#include "InputEventPlus.h"
|
||||||
#include "RageInput.h"
|
#include "RageInput.h"
|
||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
|
#include "InputMapper.h"
|
||||||
|
|
||||||
REGISTER_SCREEN_CLASS( ScreenNameEntryTraditional );
|
REGISTER_SCREEN_CLASS( ScreenNameEntryTraditional );
|
||||||
|
|
||||||
@@ -143,7 +144,24 @@ void ScreenNameEntryTraditional::Input( const InputEventPlus &input )
|
|||||||
{
|
{
|
||||||
if( IsTransitioning() )
|
if( IsTransitioning() )
|
||||||
return;
|
return;
|
||||||
|
if(
|
||||||
|
( input.MenuI != GameButton_Invalid ) &&
|
||||||
|
( input.pn != PlayerNumber_Invalid )
|
||||||
|
)
|
||||||
|
{
|
||||||
|
switch( input.type )
|
||||||
|
{
|
||||||
|
case IET_FIRST_PRESS:
|
||||||
|
case IET_REPEAT:
|
||||||
|
{
|
||||||
|
Message msg( "Input" );
|
||||||
|
msg.SetParam( "PlayerNumber", input.pn );
|
||||||
|
msg.SetParam( "MenuItem", GameButtonToString( INPUTMAPPER->GetInputScheme(), input.MenuI ) );
|
||||||
|
this->HandleMessage( msg );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
ScreenWithMenuElements::Input( input );
|
ScreenWithMenuElements::Input( input );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user