broadcast button presses so that overlays can do something tricky

This commit is contained in:
Chris Danford
2005-08-15 15:59:49 +00:00
parent 65beab6826
commit c12b9f504f
+15
View File
@@ -115,6 +115,21 @@ void ScreenTestInput::Update( float fDeltaTime )
void ScreenTestInput::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
{
CString sMessage = DeviceI.toString();
switch( type )
{
case IET_FIRST_PRESS:
case IET_RELEASE:
{
switch( type )
{
case IET_FIRST_PRESS: sMessage += "Pressed"; break;
case IET_RELEASE: sMessage += "Released"; break;
}
MESSAGEMAN->Broadcast( sMessage );
}
}
if( type != IET_FIRST_PRESS && type != IET_SLOW_REPEAT )
return; // ignore