示例#1
0
        public void ApplyChanges()
        {
            switch (m_lastCategory)
            {
            case ECategory.GAME:
                if (ConfigManager.Instance.HasLanguageChanged())
                {
                    LegacyLogic.Instance.TrackingManager.TrackLanguangeChange();
                }
                ConfigManager.Instance.WriteConfigurations();
                ApplyGameOptions();
                break;

            case ECategory.INPUT:
                KeyConfigManager.WriteConfigurations();
                LegacyLogic.Instance.EventManager.InvokeEvent(null, EEventType.INPUT_CHANGED, EventArgs.Empty);
                break;

            case ECategory.GRAPHICS:
                GraphicsConfigManager.WriteConfigurations();
                GraphicsConfigManager.Apply();
                break;

            case ECategory.SOUND:
                SoundConfigManager.WriteConfigurations();
                break;
            }
        }
示例#2
0
        private void ResetToDefaultRequestCallback(PopupRequest.EResultType p_result, String p_inputString)
        {
            if (p_result == PopupRequest.EResultType.CONFIRMED)
            {
                switch (m_lastCategory)
                {
                case ECategory.GAME:
                    ConfigManager.Instance.LoadDefaultOptions();
                    ApplyGameOptions();
                    m_optionsGame.UpdateGUI();
                    break;

                case ECategory.INPUT:
                    KeyConfigManager.LoadDefaultSettings();
                    m_optionsInput.UpdateGUI();
                    break;

                case ECategory.GRAPHICS:
                    GraphicsConfigManager.LoadDefaultSettings();
                    GraphicsConfigManager.InitDefaultResolution();
                    GraphicsConfigManager.WriteConfigurations();
                    GraphicsConfigManager.Apply();
                    GraphicsConfigManager.ApplyBrightnessOrGamma();
                    m_optionsGraphics.UpdateGUI();
                    break;

                case ECategory.SOUND:
                    SoundConfigManager.LoadDefaultSettings();
                    m_optionsSound.UpdateGUI();
                    break;
                }
                ApplyChanges();
            }
        }
示例#3
0
 private void Start()
 {
     SetupLogic();
     SetupLanguage();
     if (!LegacyLogic.Instance.ServiceWrapper.ForceAppExit())
     {
         SoundConfigManager.Settings.Apply();
         GraphicsConfigManager.Apply();
         foreach (Hotkey hotkeyData in KeyConfigManager.KeyBindings)
         {
             InputManager.SetHotkeyData(hotkeyData);
         }
     }
     StartCoroutine(PreLoadAsset());
 }