public void Update() { configTable = new Dictionary <string, object>() { { Defines.KeyConfig, InputMonitor.GetConfig() }, { Defines.TouchConfig, TouchSettings.GetConfig() }, { Defines.GameConfig, GameSettingsScreen.GetConfig() } }; }
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(); }