Beispiel #1
0
        public static RotpOptions LoadOptions()
        {
            RotpOptions options = (RotpOptions) Load(optionPath, typeof(RotpOptions));

            if (options == null)
            {
                options = new RotpOptions();
                options.IsFullScreen = false;
                options.Resolution = new Vector2(1024, 720);
                options.IsBgmOn = true;
                options.IsSoundOn = true;

            }

            return options;
        }
Beispiel #2
0
        public OptionsMenu(SceneManager manager)
            : base(manager, "Options")
        {
            InitHandlers();
            _options = Game1.RotpOptions;

            _bgm = new MenuItem("");
            _bgm.Selected += OnBgmSelected;
            MenuItems.Add(_bgm);

            _sound = new MenuItem("");
            _sound.Selected += OnSoundSelected;
            MenuItems.Add(_sound);

            _fs = new MenuItem("");
            _fs.Selected += OnFullScreenSelected;
            MenuItems.Add(_fs);

            MenuItem ok = new MenuItem("Valider");
            ok.Selected += OnOkSelected;
            MenuItems.Add(ok);
        }
Beispiel #3
0
 public static bool SaveOptions(RotpOptions options)
 {
     onOptionsChanged();
     return Save(optionPath, options);
 }