public virtual void SaveSettings(Setting settings)
        {
            if (settings.Screens == null)
                settings.Screens = new LastScreen();

            if (this.item.Checked)
                settings.Screens.Size = this.scale;
        }
        public void SaveSettings(Setting settings)
        {
            if (this.menuItem.Checked)
            {
                if (settings.Screens == null)
                    settings.Screens = new LastScreen();

                settings.Screens.Pixellated = this.state;
            }
        }
 public void LoadSettings(Setting settings)
 {
     if (channel == 1)
         Set(settings.Audio.Square1);
     else if (channel == 2)
         Set(settings.Audio.Square2);
     else if (channel == 3)
         Set(settings.Audio.Triangle);
     else if (channel == 4)
         Set(settings.Audio.Noise);
 }
        public override void SaveSettings(Setting settings)
        {
            if (settings.Screens == null)
                settings.Screens = new LastScreen();

            if (this.item.Checked)
            {
                settings.Screens.Size = ScreenScale.NTSC;
                settings.Screens.NTSC_Options = this.ntscOption;
            }
        }
        public void SaveSettings(Setting settings)
        {
            if (settings.Audio == null)
                settings.Audio = new LastAudio();

            if (channel == 1)
                settings.Audio.Square1 = this.menuItem.Checked;
            else if (channel == 2)
                settings.Audio.Square2 = this.menuItem.Checked;
            else if (channel == 3)
                settings.Audio.Triangle = this.menuItem.Checked;
            else if (channel == 4)
                settings.Audio.Noise = this.menuItem.Checked;
        }
 public void LoadSettings(Setting settings)
 {
     if (layer == Layers.Background)
         Set(settings.Debug.Layers.Background);
     else if (layer == Layers.Sprite1)
         Set(settings.Debug.Layers.Sprites1);
     else if (layer == Layers.Sprite2)
         Set(settings.Debug.Layers.Sprites2);
     else if (layer == Layers.Sprite3)
         Set(settings.Debug.Layers.Sprites3);
     else if (layer == Layers.Sprite4)
         Set(settings.Debug.Layers.Sprites4);
     else if (layer == Layers.Foreground)
         Set(settings.Debug.Layers.Foreground);
 }
        public void SaveSettings(Setting settings)
        {
            if (settings.Debug == null)
                settings.Debug = new LastDebug();

            if (settings.Debug.Layers == null)
                settings.Debug.Layers = new LastLayers();

            if (layer == Layers.Background)
                settings.Debug.Layers.Background = Engine.Instance.GetLayerVisibility((int)this.layer);
            else if (layer == Layers.Sprite1)
                settings.Debug.Layers.Sprites1 = Engine.Instance.GetLayerVisibility((int)this.layer);
            else if (layer == Layers.Sprite2)
                settings.Debug.Layers.Sprites2 = Engine.Instance.GetLayerVisibility((int)this.layer);
            else if (layer == Layers.Sprite3)
                settings.Debug.Layers.Sprites3 = Engine.Instance.GetLayerVisibility((int)this.layer);
            else if (layer == Layers.Sprite4)
                settings.Debug.Layers.Sprites4 = Engine.Instance.GetLayerVisibility((int)this.layer);
            else if (layer == Layers.Foreground)
                settings.Debug.Layers.Foreground = Engine.Instance.GetLayerVisibility((int)this.layer);
        }
 public void LoadSettings(Setting settings)
 {
     if (settings.Screens.Pixellated == this.state)
         this.controller.Raise(this.state);
 }
Ejemplo n.º 9
0
        private void btnSelect_Click(object sender, EventArgs e)
        {
            int selection = cbxConfigToPickFrom.SelectedIndex;

            // If 0, the added option Factory index is selected
            if (selection == 0) settingsSelected = UserSettings.Default;
            else settingsSelected = userSettingObject.GetSettingByIndex(selection - 1); // -1 because an option is added at position 0

            RaiseApply();
            this.Close();
        }
Ejemplo n.º 10
0
        public void AddOrSetExistingSettingsForGame(Setting newSetting)
        {
            // No list, create a new one
            if (Settings == null)
            {
                Settings = new List<Setting>();
                Settings.Add(newSetting);
                return;
            }

            // If setting exist, replace it
            for (int x = 0; x < Settings.Count; x++)
            {
                if (Settings[x].GameFileName == newSetting.GameFileName)
                {
                    Settings[x] = newSetting; return;
                }
            }

            // Setting of name received not found, add it
            Settings.Add(newSetting);
        }
Ejemplo n.º 11
0
 static UserSettings()
 {
     Default = new Setting() {
         GameFileName = "",
         Keys = new UserKeys() {
             Up = Keys.Up,
             Down = Keys.Down,
             Left = Keys.Left,
             Right = Keys.Right,
             Jump = Keys.A,
             Shoot = Keys.S,
             Start = Keys.Enter,
             Select = Keys.Space
         },
         Screens = new LastScreen() {
             Size = ScreenScale.X1,
             Maximized = false,
             HideMenu = false,
             Pixellated = PixellatedOrSmoothed.Pixellated,
             NTSC_Options = NTSC_Options.None,
             NTSC_Custom = new NTSC_CustomOptions() {
                 Hue = 0,
                 Saturation = 0,
                 Brightness = 0,
                 Contrast = 0,
                 Sharpness = 0,
                 Gamma = 0,
                 Resolution = 0,
                 Artifacts = 0,
                 Fringing = 0,
                 Bleed = 0,
                 Merge_Fields = true
             }
         },
         Audio = new LastAudio() {
             Volume = 50,
             Musics = true,
             Sound = true,
             Square1 = true,
             Square2 = true,
             Triangle = true,
             Noise = true
         },
         Debug = new LastDebug() {
             ShowMenu = true,
             ShowHitboxes = false,
             Framerate = 60,
             Layers = new LastLayers() {
                 Background = true,
                 Sprites1 = true,
                 Sprites2 = true,
                 Sprites3 = true,
                 Sprites4 = true,
                 Foreground = true
             },
             Cheat = new LastCheat() {
                 Invincibility = false,
                 NoDamage = false
             }
         },
         Miscellaneous = new LastMiscellaneous() {
             ScreenX_Coordinate = -1,        // -1 means centered
             ScreenY_Coordinate = -1
         }
     };
 }
 public virtual void LoadSettings(Setting settings)
 {
     Set(settings.Screens.Size == this.scale);
 }
 public void SaveSettings(Setting settings)
 {
 }
 public void LoadSettings(Setting settings)
 {
 }
 public override void LoadSettings(Setting settings)
 {
     Set(settings.Screens.Size == ScreenScale.NTSC && settings.Screens.NTSC_Options == this.ntscOption);
 }