private void OnEscapeMenuToggled(bool isOpened)
 {
     if (isOpened)
     {
         if (!GameNetwork.IsMultiplayer)
         {
             MBCommon.PauseGameEngine();
         }
     }
     else
     {
         MBCommon.UnPauseGameEngine();
     }
     if (isOpened)
     {
         _dataSource    = new OptionsModOptionsViewModel(new OptionsVM(GameNetwork.IsMultiplayer, OnCloseOptions, OnKeybindRequest), new ModOptionsVM());
         _gauntletLayer = new GauntletLayer(ViewOrderPriorty, "GauntletLayer");
         _gauntletLayer.InputRestrictions.SetInputRestrictions(true, InputUsageMask.All);
         _gauntletLayer.Input.RegisterHotKeyCategory(HotKeyManager.GetCategory("GenericPanelGameKeyCategory"));
         _movie = _gauntletLayer.LoadMovie("OptionsWithModOptionsView_v3", _dataSource);
         MissionScreen.AddLayer(_gauntletLayer);
         _gauntletLayer.IsFocusLayer = true;
         ScreenManager.TrySetFocus(_gauntletLayer);
         return;
     }
     _gauntletLayer.InputRestrictions.ResetInputRestrictions();
     _gauntletLayer.IsFocusLayer = false;
     ScreenManager.TryLoseFocus(_gauntletLayer);
     MissionScreen.RemoveLayer(_gauntletLayer);
     _keybindingPopup?.OnToggle(false);
     _gauntletLayer = null !;
     _dataSource?.OnFinalize();
     _dataSource    = null !;
     _gauntletLayer = null !;
 }
コード例 #2
0
 public void CreateWarningWidget()
 {
     if (!GameNetwork.IsClient)
     {
         MBCommon.PauseGameEngine();
     }
     InformationManager.ShowInquiry(this._retreatPopUpData, true);
     this.IsWarningWidgetOpened = true;
 }
コード例 #3
0
        public void PauseGame()
        {
            if (MBCommon.IsPaused)
            {
                return;
            }

            MBCommon.PauseGameEngine();
            Game.Current.GameStateManager.ActiveStateDisabledByUser = true;
        }
コード例 #4
0
 public void BeginSelection(CharacterSelectionData data)
 {
     if (_isActive)
     {
         return;
     }
     _isActive = true;
     CreateLayer();
     _isLastActiveGameStatePaused = data.PauseGameActiveState;
     if (!_isLastActiveGameStatePaused)
     {
         return;
     }
     _isLastActiveGameStateActive = GameStateManager.Current.ActiveStateDisabledByUser;
     GameStateManager.Current.ActiveStateDisabledByUser = true;
     MBCommon.PauseGameEngine();
 }
コード例 #5
0
 private void PauseGame()
 {
     MBCommon.PauseGameEngine();
 }
コード例 #6
0
 private void PauseGame()
 {
     MBCommon.PauseGameEngine();
     _oldGameStatusDisabledStatus = Game.Current.GameStateManager.ActiveStateDisabledByUser;
     Game.Current.GameStateManager.ActiveStateDisabledByUser = true;
 }