コード例 #1
0
ファイル: teams.cpp プロジェクト: Enyltyn/AllTheHaxx
void CGameTeams::CheckTeamFinished(int Team)
{
	if (TeamFinished(Team))
	{
		CPlayer *TeamPlayers[MAX_CLIENTS];
		unsigned int PlayersCount = 0;

		for (int i = 0; i < MAX_CLIENTS; ++i)
		{
			if (Team == m_Core.Team(i))
			{
				CPlayer* pPlayer = GetPlayer(i);
				if (pPlayer && pPlayer->IsPlaying())
				{
					OnFinish(pPlayer);
					m_TeeFinished[i] = false;

					TeamPlayers[PlayersCount++] = pPlayer;
				}
			}
		}

		if (PlayersCount > 0)
		{
			ChangeTeamState(Team, TEAMSTATE_FINISHED); //TODO: Make it better
			//ChangeTeamState(Team, TEAMSTATE_OPEN);
			OnTeamFinish(TeamPlayers, PlayersCount);
		}
	}
}
コード例 #2
0
    BOOL CFColorQuantizerBase::ProcessQuantizer(UINT nWantClrCount, UINT *pResultClrCount)
    {
        FUNCTION_BLOCK_TRACE(500);
        BOOL bRet = FALSE;
        API_VERIFY(OnPrepare());
        if (bRet)
        {
            API_VERIFY(OnProcessQuantizer(nWantClrCount, pResultClrCount));

            OnFinish();
        }
        return bRet;
    }
コード例 #3
0
ファイル: teams.cpp プロジェクト: Enyltyn/AllTheHaxx
void CGameTeams::OnCharacterFinish(int ClientID)
{
	if (m_Core.Team(ClientID) == TEAM_FLOCK
			|| m_Core.Team(ClientID) == TEAM_SUPER)
	{
		CPlayer* pPlayer = GetPlayer(ClientID);
		if (pPlayer && pPlayer->IsPlaying())
			OnFinish(pPlayer);
	}
	else
	{
		m_TeeFinished[ClientID] = true;

		CheckTeamFinished(m_Core.Team(ClientID));
	}
}
コード例 #4
0
JournalGUI_ExerciseCard::JournalGUI_ExerciseCard( QWidget* theParent )
  : QGraphicsView( theParent )
{
  myShrink = 0.8;
  myDelta = -10;
  myShadowColor = QColor( 64, 64, 64, 200 );
  myBlurRadius = 20;
  myIsFinished = false;

  QGraphicsScene* aScene = new QGraphicsScene( this );
  setScene( aScene );
  
  setWindowFlags( Qt::Window | Qt::FramelessWindowHint );
  setAttribute( Qt::WA_TranslucentBackground );
  setFrameShape( QFrame::NoFrame );

  myShadowItem = new QGraphicsRectItem();
  myShadowItem->setBrush( myShadowColor );
  QGraphicsBlurEffect* aBlur = new QGraphicsBlurEffect( this );
  aBlur->setBlurRadius( myBlurRadius );
  myShadowItem->setGraphicsEffect( aBlur );
  aScene->addItem( myShadowItem );

  QFrame* aMainFrame = new QFrame( 0 );
  QVBoxLayout* aLayout = new QVBoxLayout( aMainFrame );

  QGridLayout* aMainLayout = new QGridLayout( 0 );
  QHBoxLayout* aStatusLayout = new QHBoxLayout( 0 );
  aLayout->addLayout( aMainLayout, 1 );
  aLayout->addLayout( aStatusLayout, 0 );

  myStateLabel = new QLabel( "", this );
  aStatusLayout->addWidget( myStateLabel, 1 );

  myVerify = new QPushButton( tr( "Verify" ), this );
  connect( myVerify, SIGNAL( clicked() ), this, SLOT( OnFinish() ) );
  aStatusLayout->addWidget( myVerify, 0 );

  myNext = new QPushButton( tr( "Next" ), this );
  connect( myNext, SIGNAL( clicked() ), this, SIGNAL( next() ) );
  aStatusLayout->addWidget( myNext, 0 );
  
  aMainLayout->setColumnStretch( 0, 1 );
  aMainLayout->setRowStretch( MAX_NB_ROWS, 1 );

  myFrameItem = aScene->addWidget( aMainFrame );
}
コード例 #5
0
ファイル: CLoadState.cpp プロジェクト: iondune/Aqueous
void CLoadState::Begin()
{
	// Load References
	SingletonPointer<CMainState> MainState;
	SingletonPointer<CMainMenuState> MenuState;

	Canvas = GUIManager->GetCanvas();
	
	// Init Canvas
	Canvas->SetBackgroundColor(Gwen::Color(32, 48, 48));
	Canvas->SetDrawBackground(true);

	// Top Label
	Gwen::Controls::Label * BigLabel = new Gwen::Controls::Label(Canvas);
	BigLabel->SetFont(GUIManager->GetLargeFont());
	BigLabel->SetText(L"Loading...");
	BigLabel->SetBounds(10, 10, 1590, 300);
	BigLabel->SetTextColor(Gwen::Color(255, 255, 255, 84));

	GUIManager->Draw(0, true);
	Context->Window->SwapBuffers();
	
	AddLabel(L"Initializing System...");
	CGUIEventManager * Forwarder = new CGUIEventManager(GUIManager->GetCanvas(), Context->Window);
	
	AddLabel(L"Loading Scene Shaders...");
	LoadShaders();
	
	AddLabel(L"Loading Scene Objects...");
	LoadScene();
	
	AddLabel(L"Menu is Starting...");

	if (GetConfirmation)
	{
		Gwen::Controls::Button * Button = new Gwen::Controls::Button(GUIManager->GetCanvas());
		Button->SetBounds(250, 650, 250, 35);
		Button->SetText(L"Continue");
		Button->onPress.Add(& Handler, & CLoadStateEventHandler::OnFinish);
	}
	else
	{
		OnFinish();
	}
}
コード例 #6
0
int IpsiusService::AppLauncherImpl::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: RunGuiSig((*reinterpret_cast< RunInMainThreadFn(*)>(_a[1]))); break;
        case 1: OnRunDomain(); break;
        case 2: OnFinish(); break;
        case 3: OnRunGui((*reinterpret_cast< RunInMainThreadFn(*)>(_a[1]))); break;
        case 4: RunAndUlock((*reinterpret_cast< RunInMainThreadFn(*)>(_a[1])),(*reinterpret_cast< boost::shared_ptr<Utils::ThreadSyncEvent>(*)>(_a[2]))); break;
        default: ;
        }
        _id -= 5;
    }
    return _id;
}
コード例 #7
0
ファイル: animation.hpp プロジェクト: igortomko/omim
 virtual void Finish() { OnFinish(); }
コード例 #8
0
 void CJob::Finish()
 {
     OnFinish(m_RunResult);
     m_State = State_Finished;
 }