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 !;
 }
Ejemplo n.º 2
0
        public void UnPauseGame()
        {
            if (!MBCommon.IsPaused)
            {
                return;
            }

            MBCommon.UnPauseGameEngine();
            Game.Current.GameStateManager.ActiveStateDisabledByUser = false;
        }
 private void CloseSelectionWidget()
 {
     if (!this.IsWarningWidgetOpened)
     {
         return;
     }
     this.IsWarningWidgetOpened = false;
     if (GameNetwork.IsClient)
     {
         return;
     }
     MBCommon.UnPauseGameEngine();
 }
Ejemplo n.º 4
0
 private void EndSelection()
 {
     if (!_isActive)
     {
         return;
     }
     _isActive = false;
     RemoveLayer();
     if (!_isLastActiveGameStatePaused)
     {
         return;
     }
     GameStateManager.Current.ActiveStateDisabledByUser = _isLastActiveGameStateActive;
     MBCommon.UnPauseGameEngine();
 }
Ejemplo n.º 5
0
 private void UnpauseGame()
 {
     MBCommon.UnPauseGameEngine();
 }
Ejemplo n.º 6
0
 private void UnpauseGame()
 {
     MBCommon.UnPauseGameEngine();
     Game.Current.GameStateManager.ActiveStateDisabledByUser = _oldGameStatusDisabledStatus;
 }