예제 #1
0
파일: main.c 프로젝트: kuailexs/jwm
/** Clean up memory.
 * This is called after the X connection is closed.
 * Note that it is possible for this to be called more than once.
 */
void Destroy(void)
{
   DestroyBackgrounds();
   DestroyBorders();
   DestroyClients();
   DestroyClock();
   DestroyColors();
   DestroyCommands();
   DestroyCursors();
   DestroyDesktops();
#ifndef DISABLE_CONFIRM
   DestroyDialogs();
#endif
   DestroyDock();
   DestroyFonts();
   DestroyGroups();
   DestroyHints();
   DestroyIcons();
   DestroyKeys();
   DestroyPager();
   DestroyPlacement();
   DestroyPopup();
   DestroyRootMenu();
   DestroyScreens();
   DestroySettings();
   DestroySwallow();
   DestroyTaskBar();
   DestroyTray();
   DestroyTrayButtons();
}
void FPlatformerIngameMenu::ReturnToMainMenu()
{	
	APlatformerPlayerController * PlatformPC = (PCOwner.IsValid())? Cast<APlatformerPlayerController>(PCOwner.Get()) : NULL;
	FString RemoteReturnReason = NSLOCTEXT("NetworkErrors", "HostHasLeft", "Host has left the game.").ToString();
	FString LocalReturnReason(TEXT(""));

	if ( PlatformPC )
	{
		if (PlatformPC->GetNetMode() < NM_Client)
		{
			for(auto Iterator = PlatformPC->GetWorld()->GetPlayerControllerIterator(); Iterator; ++Iterator)
			{
				APlayerController* Controller = *Iterator;
				if (Controller && Controller->IsPrimaryPlayer() && Controller != PlatformPC) 
				{
					Controller->ClientReturnToMainMenu(RemoteReturnReason);
				}
			}
			PlatformPC->ClientReturnToMainMenu(LocalReturnReason);
		}
		else
		{
			PlatformPC->ClientReturnToMainMenu(LocalReturnReason);
		}
	}
	DestroyRootMenu();

}
void FPlatformerLevelSelect::OnMenuHidden()
{
	DestroyRootMenu();
	GEngine->SetClientTravel(PCOwner->GetWorld(), TEXT("/Game/Maps/Platformer_StreetSection"), TRAVEL_Absolute);
	FSlateApplication::Get().SetAllUserFocusToGameViewport();
	ShowLoadingScreen();
}
예제 #4
0
파일: root.c 프로젝트: Nehamkin/jwm
/** Reload the menu. */
void ReloadMenu(void)
{
   shouldReload = 1;
   if(!menuShown) {
      ShutdownRootMenu();
      DestroyRootMenu();
      InitializeRootMenu();
      ParseConfig(configPath);
      StartupRootMenu();
      shouldReload = 0;
   }
}
void FPlatformerIngameMenu::DetachGameMenu()
{
	DestroyRootMenu();
}