コード例 #1
0
ファイル: MapGame.cpp プロジェクト: nbclark/paint-by-runners
void CIwMapGame::SetActiveUI(CIwUIElement* pDialogTemplate, IIwUIEventHandler* pEventHandler)
{
	if (g_pDialogCurrent)
	{
		g_pDialogCurrent->SetVisible(false);
	}

	if (pEventHandler)
	{
		IwGetUIController()->AddEventHandler(pEventHandler);
	}
	g_pDialogCurrent = pDialogTemplate;
	IwGetUIAnimManager()->StopAnim(pDialogTemplate);
	pDialogTemplate->SetVisible(false);

	switch (g_direction)
	{
		case AnimDir_Left :
		{
			IwGetUIAnimManager()->PlayAnim("slideInAnim", pDialogTemplate, false);
		}
		break;
		case AnimDir_Right :
		{
			IwGetUIAnimManager()->PlayAnim("slideOutAnim", pDialogTemplate, false);
		}
		break;
		default :
		{
			IwGetUIAnimManager()->PlayAnim("zoominAnim", pDialogTemplate, false);
			pDialogTemplate->SetVisible(true);
		}
		break;
	}
}
コード例 #2
0
//-----------------------------------------------------------------------------
void ExampleShutDown()
{
    delete IwGetUIController();
    delete IwGetUIView();

    //Terminate the IwUI module
    IwUITerminate();
}
コード例 #3
0
//-----------------------------------------------------------------------------
bool ExampleUpdate()
{
    //Update the controller (this will generate control events etc.)
    IwGetUIController()->Update();

    //Update the view (this will do animations etc.) The example framework has
    //a fixed framerate of 20fps, so we pass that duration to the update function.
    IwGetUIView()->Update(1000/20);

    return true;
}