예제 #1
0
파일: BitmapUi.cpp 프로젝트: AiYong/CryGame
void CBitmapUi::OnLoadingProgress( ILevelInfo* pLevel, int progressAmount )
{
	EScreenState currentScreenState = GetScreenState();
	if ( currentScreenState == eSS_LoadingScreen )
	{
		// 3d Engine notifies of loading progress too when already in game ( eg. texture startup streaming finish ),
		// so we'll only draw a full frame when we're sure we're in loading state.
		DrawFullFrame();
	}
}
예제 #2
0
void CBitmapUi::OnSystemEvent(ESystemEvent event, UINT_PTR wparam, UINT_PTR lparam)
{
	switch(event)
	{
	case ESYSTEM_EVENT_LEVEL_UNLOAD:
		SetScreenState(eSS_LoadingScreen);
		DrawFullFrame();
		break;

	case ESYSTEM_EVENT_LEVEL_LOAD_PREPARE:
		SetScreenState(eSS_LoadingScreen);
		gEnv->pGame->GetIGameFramework()->SetLevelPrecachingDone(false);
		break;

	case ESYSTEM_EVENT_LEVEL_LOAD_END:
		SetScreenState(eSS_InGameScreen);
		gEnv->pGame->GetIGameFramework()->SetLevelPrecachingDone(true);
		break;
	}
}