From c12b9f504f655c9df97c0b1c69cba9a86a1116d4 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Mon, 15 Aug 2005 15:59:49 +0000 Subject: [PATCH] broadcast button presses so that overlays can do something tricky --- stepmania/src/ScreenTestInput.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/stepmania/src/ScreenTestInput.cpp b/stepmania/src/ScreenTestInput.cpp index 8cddae3867..80c644c757 100644 --- a/stepmania/src/ScreenTestInput.cpp +++ b/stepmania/src/ScreenTestInput.cpp @@ -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