Пример #1
0
static void GetUsedGameInputs( vector<GameInput> &vGameInputsOut )
{
	vGameInputsOut.clear();

	set<GameInput> vGIs;
	vector<const Style*> vStyles;
	GAMEMAN->GetStylesForGame( GAMESTATE->m_pCurGame, vStyles );
	FOREACH( const Style*, vStyles, style )
	{
		bool bFound = find( STEPS_TYPES_TO_SHOW.GetValue().begin(), STEPS_TYPES_TO_SHOW.GetValue().end(), (*style)->m_StepsType ) != STEPS_TYPES_TO_SHOW.GetValue().end();
		if( !bFound )
			continue;
		FOREACH_PlayerNumber( pn )
		{
			for( int i=0; i<(*style)->m_iColsPerPlayer; i++ )
			{
				StyleInput si( pn, i );
				GameInput gi = (*style)->StyleInputToGameInput( si );
				if( gi.IsValid() )
				{
					vGIs.insert( gi );
				}
			}
		}
	}
Пример #2
0
void InputMapper::ClearFromInputMap( GameInput GameI, int iSlotIndex )
{
	if( !GameI.IsValid() )
		return;

	m_GItoDI[GameI.controller][GameI.button][iSlotIndex].MakeInvalid();

	UpdateTempDItoGI();
}
Пример #3
0
void ScreenTestLights::Update( float fDeltaTime )
{
    Screen::Update( fDeltaTime );


    if( m_timerBackToAutoCycle.Ago() > 20 )
    {
        m_timerBackToAutoCycle.Touch();
        LIGHTSMAN->SetLightsMode( LIGHTSMODE_TEST_AUTO_CYCLE );
    }


    CabinetLight cl = LIGHTSMAN->GetFirstLitCabinetLight();
    GameInput gi = LIGHTSMAN->GetFirstLitGameButtonLight();

    RString s;

    switch( LIGHTSMAN->GetLightsMode() )
    {
    case LIGHTSMODE_TEST_AUTO_CYCLE:
        s += AUTO_CYCLE.GetValue()+"\n";
        break;
    case LIGHTSMODE_TEST_MANUAL_CYCLE:
        s += MANUAL_CYCLE.GetValue()+"\n";
        break;
    default:
        break;
    }

    if( cl == CabinetLight_Invalid )
        s += CABINET_LIGHT.GetValue()+": -----\n";
    else
        s += ssprintf( "%s: %d %s\n", CABINET_LIGHT.GetValue().c_str(), cl, CabinetLightToString(cl).c_str() );

    if( !gi.IsValid() )
    {
        s += CONTROLLER_LIGHT.GetValue()+": -----\n";
    }
    else
    {
        RString sGameButton = GameButtonToLocalizedString( INPUTMAPPER->GetInputScheme(), gi.button );
        PlayerNumber pn = (PlayerNumber)(gi.controller);
        s += ssprintf( "%s: %s %d %s\n", CONTROLLER_LIGHT.GetValue().c_str(), PlayerNumberToString(pn).c_str(), gi.button, sGameButton.c_str() );
    }

    m_textInputs.SetText( s );
}