//Method to initialize graphic settings (before starting the game). static public void Initialize() { settings = new SettingsLoader(path); try { Resolution = new Point(int.Parse(settings.GetSetting("width")), int.Parse(settings.GetSetting("height"))); } catch { Log.Write(LogType.ERROR, "Error loading resolution settings, using default settings."); Resolution = DefaultResolution; } Fullscreen = bool.Parse(settings.GetSetting("fullscreen")); VSync = bool.Parse(settings.GetSetting("vsync")); MusicVolume = float.Parse(settings.GetSetting("musicvolume")); SoundVolume = float.Parse(settings.GetSetting("soundvolume")); VoiceVolume = float.Parse(settings.GetSetting("voicevolume")); ApplySettings(); }