GameInputToMenuButton -> GameButtonToMenuButton

This commit is contained in:
Glenn Maynard
2007-01-13 01:13:20 +00:00
parent f8e9574f1e
commit f5d285e51b
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -827,7 +827,7 @@ PlayerNumber InputMapper::ControllerToPlayerNumber( GameController controller )
MenuButton InputMapper::GameToMenu( const GameInput &GameI ) MenuButton InputMapper::GameToMenu( const GameInput &GameI )
{ {
return m_pInputScheme->GameInputToMenuButton( GameI ); return m_pInputScheme->GameButtonToMenuButton( GameI.button );
} }
/* If set (not PLAYER_INVALID), inputs from both GameControllers will be mapped /* If set (not PLAYER_INVALID), inputs from both GameControllers will be mapped
@@ -970,16 +970,16 @@ GameButton InputScheme::ButtonNameToIndex( const RString &sButtonName ) const
return GameButton_Invalid; return GameButton_Invalid;
} }
MenuButton InputScheme::GameInputToMenuButton( GameInput GameI ) const MenuButton InputScheme::GameButtonToMenuButton( GameButton gb ) const
{ {
FOREACH_MenuButton(i) FOREACH_MenuButton(i)
if( g_DedicatedMenuButtons[i] == GameI.button ) if( g_DedicatedMenuButtons[i] == gb )
return i; return i;
if( !PREFSMAN->m_bOnlyDedicatedMenuButtons ) if( !PREFSMAN->m_bOnlyDedicatedMenuButtons )
return GetMenuButtonSecondaryFunction( GameI.button ); return GetMenuButtonSecondaryFunction( gb );
return MenuButton_Invalid; // invalid GameInput return MenuButton_Invalid; // no MenuButton for this GameButton
} }
void InputScheme::MenuButtonToGameInputs( MenuButton MenuI, PlayerNumber pn, GameInput GameIout[4] ) const void InputScheme::MenuButtonToGameInputs( MenuButton MenuI, PlayerNumber pn, GameInput GameIout[4] ) const
+1 -1
View File
@@ -48,7 +48,7 @@ public:
const InputMapping *m_Maps; const InputMapping *m_Maps;
GameButton ButtonNameToIndex( const RString &sButtonName ) const; GameButton ButtonNameToIndex( const RString &sButtonName ) const;
MenuButton GameInputToMenuButton( GameInput GameI ) const; MenuButton GameButtonToMenuButton( GameButton gb ) const;
void MenuButtonToGameInputs( MenuButton MenuI, PlayerNumber pn, GameInput GameIout[4] ) const; void MenuButtonToGameInputs( MenuButton MenuI, PlayerNumber pn, GameInput GameIout[4] ) const;
MenuButton GetMenuButtonSecondaryFunction( GameButton gb ) const; MenuButton GetMenuButtonSecondaryFunction( GameButton gb ) const;
const GameButtonInfo *GetGameButtonInfo( GameButton gb ) const; const GameButtonInfo *GetGameButtonInfo( GameButton gb ) const;