コード例 #1
0
 private static void onClickedConnectButton(SleekButton button)
 {
     if (MenuPlayConnectUI.ipField.text != string.Empty && MenuPlayConnectUI.portField.state != 0)
     {
         string text;
         if (MenuPlayConnectUI.ipField.text.ToLower() == "localhost")
         {
             text = "127.0.0.1";
         }
         else
         {
             IPAddress[] hostAddresses = Dns.GetHostAddresses(MenuPlayConnectUI.ipField.text);
             if (hostAddresses.Length != 1 || hostAddresses[0] == null)
             {
                 return;
             }
             text = hostAddresses[0].ToString();
         }
         if (Parser.checkIP(text))
         {
             SteamConnectionInfo info = new SteamConnectionInfo(text, MenuPlayConnectUI.portField.state, MenuPlayConnectUI.passwordField.text);
             MenuSettings.save();
             MenuPlayConnectUI.connect(info);
         }
     }
 }
コード例 #2
0
 private void Start()
 {
     if (!Dedicator.isDedicated)
     {
         MenuSettings.load();
         GraphicsSettings.resize();
         LoadingUI.updateScene();
     }
 }
コード例 #3
0
 public static void close()
 {
     if (!MenuConfigurationUI.active)
     {
         return;
     }
     MenuConfigurationUI.active = false;
     MenuSettings.save();
     MenuConfigurationUI.container.lerpPositionScale(0f, -1f, ESleekLerp.EXPONENTIAL, 20f);
 }
コード例 #4
0
 // Token: 0x060036FA RID: 14074 RVA: 0x0017CD57 File Offset: 0x0017B157
 private static void onClickedPlayButton(SleekButton button)
 {
     if (PlaySettings.singleplayerMap == null || PlaySettings.singleplayerMap.Length == 0)
     {
         return;
     }
     Provider.map = PlaySettings.singleplayerMap;
     MenuSettings.save();
     Provider.singleplayer(PlaySettings.singleplayerMode, PlaySettings.singleplayerCheats);
 }
コード例 #5
0
ファイル: PlayerPauseUI.cs プロジェクト: sky-xk-nge/Unturned
 public static void close()
 {
     if (!PlayerPauseUI.active)
     {
         return;
     }
     PlayerPauseUI.active = false;
     PlayerPauseUI.suicideButton.reset();
     MenuSettings.save();
     PlayerPauseUI.container.lerpPositionScale(0f, 1f, ESleekLerp.EXPONENTIAL, 20f);
 }
コード例 #6
0
 // Token: 0x060036B4 RID: 14004 RVA: 0x00177358 File Offset: 0x00175758
 private static void onClickedSearchButton(SleekButton button)
 {
     if (PlaySettings.matchmakingMap == null || PlaySettings.matchmakingMap.Length == 0)
     {
         return;
     }
     MenuSettings.save();
     Provider.provider.matchmakingService.initializeMatchmaking();
     Provider.provider.matchmakingService.refreshMasterServer(ESteamServerList.INTERNET, PlaySettings.matchmakingMap, EPassword.NO, EWorkshop.NO, EPlugins.ANY, EAttendance.SPACE, EVACProtectionFilter.Secure, EBattlEyeProtectionFilter.Secure, false, ECombat.PVP, ECheats.NO, PlaySettings.matchmakingMode, ECameraMode.BOTH);
     Provider.provider.matchmakingService.sortMasterServer(new SteamServerInfoMatchmakingComparator());
     MenuPlayMatchmakingUI.updateProgressDisplay();
     MenuPlayMatchmakingUI.updateMatchDisplay();
 }
コード例 #7
0
 private static void onClickedEdit2Button(SleekButton button)
 {
     if (PlaySettings.editorMap == null || PlaySettings.editorMap.Length == 0)
     {
         return;
     }
     for (int i = 0; i < MenuWorkshopEditorUI.levels.Length; i++)
     {
         if (MenuWorkshopEditorUI.levels[i] != null && MenuWorkshopEditorUI.levels[i].name == PlaySettings.editorMap && MenuWorkshopEditorUI.levels[i].isEditable)
         {
             MenuSettings.save();
             Level.edit(MenuWorkshopEditorUI.levels[i], true);
         }
     }
 }