Ejemplo n.º 1
0
 //GameScreen TestGameScreen;
 public SteamAge()
 {
     CurrentSettings = new GameSettings();
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     graphics.IsFullScreen = false;
     Mods = new List<BaseMod>();
     IsMouseVisible = true;
 }
Ejemplo n.º 2
0
        public void ApplySettings(VAPI.GameSettings Settings)
        {
            SteamAge.CurrentSettings = Settings;
            this.graphics.IsFullScreen = Settings.FullScreen;
            this.graphics.PreferredBackBufferWidth = Settings.ResX;
            this.graphics.PreferredBackBufferHeight = Settings.ResY;

            GeneralManager.ScreenX = Settings.ResX;
            GeneralManager.ScreenX = Settings.ResY;

            this.graphics.ApplyChanges();
        }
Ejemplo n.º 3
0
        public void Load(string Path)
        {
            XmlSerializer Serializer = new XmlSerializer(typeof(GameSettings));
            GameSettings GameSettings;
            try
            {
                GameSettings = (GameSettings)Serializer.Deserialize(new StreamReader(Path));
            }
            catch (Exception e)
            {
                Logger.Write("Deserialization of settings file failed, make sure its proper XML format");
                Logger.Write(e.StackTrace.ToString());
                GameSettings = new GameSettings();
            }

            this.DebugMode = GameSettings.DebugMode;
            this.EnableLogging = GameSettings.EnableLogging;
            this.FullScreen = GameSettings.FullScreen;
            this.ParticlesMultipler = GameSettings.ParticlesMultipler;
            this.ResX = GameSettings.ResX;
            this.ResY = GameSettings.ResY;
        }
Ejemplo n.º 4
0
 private void LoadSettings()
 {
     VAPI.GameSettings TestSettings = new VAPI.GameSettings();
     try
     {
         TestSettings.Load(@"settings.xml");
     }
     catch (FileNotFoundException)
     {
         TestSettings.Save(@"settings.xml");
     }
     ApplySettings(TestSettings);
 }