move ColToButtonName from Game to Style, to reduce GAMESTATE use

in Game
This commit is contained in:
Glenn Maynard
2006-09-30 00:46:21 +00:00
parent 77d506de27
commit 5541709a1f
7 changed files with 18 additions and 18 deletions
+12
View File
@@ -95,6 +95,18 @@ void Style::GetMinAndMaxColX( PlayerNumber pn, float& fMixXOut, float& fMaxXOut
}
}
RString Style::ColToButtonName( int iCol ) const
{
const char *pzColumnName = m_ColumnInfo[PLAYER_1][iCol].pzName;
if( pzColumnName != NULL )
return pzColumnName;
GameInput GI = StyleInputToGameInput( iCol, PLAYER_1 );
const Game *pGame = GAMESTATE->GetCurrentGame();
return pGame->m_szButtonNames[GI.button];
}
// Lua bindings
#include "LuaBinding.h"