This commit is contained in:
Glenn Maynard
2004-09-09 17:48:26 +00:00
parent 09d9197e29
commit ce4656bc51
3 changed files with 22 additions and 22 deletions
+18 -18
View File
@@ -1703,15 +1703,15 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
{ {
switch( DeviceI.button ) switch( DeviceI.button )
{ {
case SDLK_F5: case KEY_F5:
this->HandleScreenMessage( SM_NotesEnded ); this->HandleScreenMessage( SM_NotesEnded );
break; break;
case SDLK_F6: case KEY_F6:
m_bChangedOffsetOrBPM = true; m_bChangedOffsetOrBPM = true;
GAMESTATE->m_SongOptions.m_bAutoSync = !GAMESTATE->m_SongOptions.m_bAutoSync; // toggle GAMESTATE->m_SongOptions.m_bAutoSync = !GAMESTATE->m_SongOptions.m_bAutoSync; // toggle
UpdateAutoPlayText(); UpdateAutoPlayText();
break; break;
case SDLK_F7: case KEY_F7:
GAMESTATE->m_SongOptions.m_bAssistTick ^= 1; GAMESTATE->m_SongOptions.m_bAssistTick ^= 1;
/* Store this change, so it sticks if we change songs: */ /* Store this change, so it sticks if we change songs: */
@@ -1724,13 +1724,13 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
m_textDebug.BeginTweening( 0.5f ); // fade out m_textDebug.BeginTweening( 0.5f ); // fade out
m_textDebug.SetDiffuse( RageColor(1,1,1,0) ); m_textDebug.SetDiffuse( RageColor(1,1,1,0) );
break; break;
case SDLK_F8: case KEY_F8:
{ {
PREFSMAN->m_bAutoPlay = !PREFSMAN->m_bAutoPlay; PREFSMAN->m_bAutoPlay = !PREFSMAN->m_bAutoPlay;
UpdateAutoPlayText(); UpdateAutoPlayText();
bool bIsHoldingShift = bool bIsHoldingShift =
INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, SDLK_RSHIFT)) || INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, KEY_RSHIFT)) ||
INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, SDLK_LSHIFT)); INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, KEY_LSHIFT));
FOREACH_HumanPlayer(p) FOREACH_HumanPlayer(p)
{ {
if( bIsHoldingShift ) if( bIsHoldingShift )
@@ -1740,20 +1740,20 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
} }
} }
break; break;
case SDLK_F9: case KEY_F9:
case SDLK_F10: case KEY_F10:
{ {
m_bChangedOffsetOrBPM = true; m_bChangedOffsetOrBPM = true;
float fOffsetDelta; float fOffsetDelta;
switch( DeviceI.button ) switch( DeviceI.button )
{ {
case SDLK_F9: fOffsetDelta = -0.020f; break; case KEY_F9: fOffsetDelta = -0.020f; break;
case SDLK_F10: fOffsetDelta = +0.020f; break; case KEY_F10: fOffsetDelta = +0.020f; break;
default: ASSERT(0); return; default: ASSERT(0); return;
} }
if( INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, SDLK_RALT)) || if( INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, KEY_RALT)) ||
INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, SDLK_LALT)) ) INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, KEY_LALT)) )
fOffsetDelta /= 2; /* .010 */ fOffsetDelta /= 2; /* .010 */
else if( type == IET_FAST_REPEAT ) else if( type == IET_FAST_REPEAT )
fOffsetDelta *= 10; fOffsetDelta *= 10;
@@ -1769,20 +1769,20 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
m_textDebug.SetDiffuse( RageColor(1,1,1,0) ); m_textDebug.SetDiffuse( RageColor(1,1,1,0) );
} }
break; break;
case SDLK_F11: case KEY_F11:
case SDLK_F12: case KEY_F12:
{ {
m_bChangedOffsetOrBPM = true; m_bChangedOffsetOrBPM = true;
float fOffsetDelta; float fOffsetDelta;
switch( DeviceI.button ) switch( DeviceI.button )
{ {
case SDLK_F11: fOffsetDelta = -0.02f; break; case KEY_F11: fOffsetDelta = -0.02f; break;
case SDLK_F12: fOffsetDelta = +0.02f; break; case KEY_F12: fOffsetDelta = +0.02f; break;
default: ASSERT(0); return; default: ASSERT(0); return;
} }
if( INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, SDLK_RALT)) || if( INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, KEY_RALT)) ||
INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, SDLK_LALT)) ) INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, KEY_LALT)) )
fOffsetDelta /= 20; /* 1ms */ fOffsetDelta /= 20; /* 1ms */
else switch( type ) else switch( type )
{ {
+2 -2
View File
@@ -727,7 +727,7 @@ void ScreenSelectMusic::Input( const DeviceInput& DeviceI, InputEventType type,
// debugging? // debugging?
// I just like being able to see untransliterated titles occasionally. // I just like being able to see untransliterated titles occasionally.
if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_F9 ) if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == KEY_F9 )
{ {
if( type != IET_FIRST_PRESS ) return; if( type != IET_FIRST_PRESS ) return;
PREFSMAN->m_bShowNative ^= 1; PREFSMAN->m_bShowNative ^= 1;
@@ -846,7 +846,7 @@ void ScreenSelectMusic::Input( const DeviceInput& DeviceI, InputEventType type,
case MENU_BUTTON_RIGHT: this->MenuRight( MenuI.player, type ); break; case MENU_BUTTON_RIGHT: this->MenuRight( MenuI.player, type ); break;
case MENU_BUTTON_BACK: case MENU_BUTTON_BACK:
/* Don't make the user hold the back button if they're pressing escape and escape is the back button. */ /* Don't make the user hold the back button if they're pressing escape and escape is the back button. */
if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_ESCAPE ) if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == KEY_ESC )
this->MenuBack( MenuI.player ); this->MenuBack( MenuI.player );
else else
Screen::MenuBack( MenuI.player, type ); Screen::MenuBack( MenuI.player, type );
+2 -2
View File
@@ -112,8 +112,8 @@ void ScreenTextEntry::Input( const DeviceInput& DeviceI, const InputEventType ty
c = DeviceI.ToChar(); c = DeviceI.ToChar();
bool bHoldingShift = bool bHoldingShift =
INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, SDLK_LSHIFT)) || INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, KEY_LSHIFT)) ||
INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, SDLK_RSHIFT)); INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, KEY_RSHIFT));
// International keyboards often have other keys mapped to shifted keys, and always // International keyboards often have other keys mapped to shifted keys, and always
// using a US layout is a bit gimped. This is better than nothing though. // using a US layout is a bit gimped. This is better than nothing though.