Ejemplo n.º 1
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();
            }
        }
Ejemplo n.º 2
0
        private void OnGammaSliderChange(Single p_value)
        {
            Single num = 0.5f + m_gammaSlider.sliderValue * 2.5f;

            GraphicsConfigManager.Settings.Gamma = (Single)Math.Round(num, 2);
            m_gammaLabel.text = GraphicsConfigManager.Settings.Gamma.ToString("0.0#");
            GraphicsConfigManager.ApplyBrightnessOrGamma();
        }
Ejemplo n.º 3
0
        public void ReloadConfigs()
        {
            switch (m_lastCategory)
            {
            case ECategory.GAME:
                ConfigManager.Instance.ReloadGameOptions();
                break;

            case ECategory.INPUT:
                KeyConfigManager.ReloadConfigurations();
                break;

            case ECategory.GRAPHICS:
                GraphicsConfigManager.ReloadConfigurations();
                GraphicsConfigManager.ApplyBrightnessOrGamma();
                break;

            case ECategory.SOUND:
                SoundConfigManager.ReloadConfigurations();
                break;
            }
        }