Beispiel #1
0
 public void Update()
 {
     configTable = new Dictionary <string, object>()
     {
         { Defines.KeyConfig, InputMonitor.GetConfig() },
         { Defines.TouchConfig, TouchSettings.GetConfig() },
         { Defines.GameConfig, GameSettingsScreen.GetConfig() }
     };
 }
Beispiel #2
0
        public void Save(string filepath = "")
        {
            if (!String.IsNullOrEmpty(filepath))
            {
                FilePath = filepath;
            }

            var data = new Dictionary <string, object>()
            {
                { Defines.KeyConfig, InputMonitor.GetConfig() },
                { Defines.TouchConfig, TouchSettings.GetConfig() },
                { Defines.GameConfig, GameSettingsScreen.GetConfig() }
            };

            Toml.WriteFile(data, Defines.ConfigFile);

            // Should this go here? I don't see why we would save if we didn't want to apply it immediately
            UpdateGlobals();
        }