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(); } }
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; } }