public static DialogResult DoGBLPrefsDialog( Config config, IDialogParent dialogParent, IGameInfo game, IMovieSession movieSession, ISettingsAdapter settable) { var s = (GambatteLink.GambatteLinkSettings)settable.GetSettings(); var ss = (GambatteLink.GambatteLinkSyncSettings)settable.GetSyncSettings(); using var dlg = new GBLPrefs(dialogParent.DialogController, config, game, movieSession); dlg.PutSettings(s, ss); var result = dialogParent.ShowDialogAsChild(dlg); if (result == DialogResult.OK) { dlg.GetSettings(out s, out ss); settable.PutCoreSettings(s); if (dlg.SyncSettingsChanged) { settable.PutCoreSyncSettings(ss); } } return(result); }
private void OkBtn_Click(object sender, EventArgs e) { _settings.BGColor = (uint)BackgroundPanel.BackColor.ToArgb(); _settings.ForeColor = (uint)ForeGroundPanel.BackColor.ToArgb(); _settable.PutCoreSettings(_settings); DialogResult = DialogResult.OK; Close(); }
private void OK_Click(object sender, EventArgs e) { int[] colors = new int[5]; for (int i = 0; i < 5; i++) { colors[i] = _colors[i].ToArgb(); } _settings.SetCustomPalette(colors); _settable.PutCoreSettings(_settings); DialogResult = DialogResult.OK; Close(); }
private void OkBtn_Click(object sender, EventArgs e) { if (_s != null && _settingsChanged) { _settable.PutCoreSettings(_s); } if (_ss != null && _syncSettingsChanged) { _settable.PutCoreSyncSettings(_ss); } DialogResult = DialogResult.OK; Close(); }
private void BtnOk_Click(object sender, EventArgs e) { if (_dispSettingsSet) { _config.DispManagerAR = EDispManagerAR.System; _config.DispFixAspectRatio = true; _config.DispFixScaleInteger = false; _config.DispFinalFilter = 1; // bilinear, I hope } SyncSettingsFromGui(_settings, _syncSettings); _settings.Validate(); _settable.PutCoreSettings(_settings); _settable.PutCoreSyncSettings(_syncSettings); DialogResult = DialogResult.OK; Close(); }
private void OkBtn_Click(object sender, EventArgs e) { bool changed = _settings.AYPanConfig.ToString() != panTypecomboBox1.SelectedItem.ToString() || _settings.TapeVolume != tapeVolumetrackBar.Value || _settings.AYVolume != ayVolumetrackBar.Value; if (changed) { _settings.AYPanConfig = (AY38912.AYPanConfig)Enum.Parse(typeof(AY38912.AYPanConfig), panTypecomboBox1.SelectedItem.ToString()); _settings.TapeVolume = tapeVolumetrackBar.Value; _settings.AYVolume = ayVolumetrackBar.Value; _settable.PutCoreSettings(_settings); } DialogResult = DialogResult.OK; Close(); }
private void SaveSettings() { // Global if (VideoResolutionComboBox.Text != CustomResItemName) { var videoSettings = VideoResolutionComboBox.SelectedItem.ToString(); var strArr = videoSettings.Split('x'); _s.VideoSizeX = int.Parse(strArr[0].Trim()); _s.VideoSizeY = int.Parse(strArr[1].Trim()); } else { _s.VideoSizeX = VideoResolutionXTextBox.Text.IsUnsigned() ? int.Parse(VideoResolutionXTextBox.Text) : 320; _s.VideoSizeY = VideoResolutionYTextBox.Text.IsUnsigned() ? int.Parse(VideoResolutionYTextBox.Text) : 240; } _ss.VideoPlugin = PluginComboBox.Text switch { "Rice" => PluginType.Rice, "Glide64" => PluginType.Glide, "Glide64mk2" => PluginType.GlideMk2, "GLideN64" => PluginType.GLideN64, "Angrylion" => PluginType.Angrylion, _ => _ss.VideoPlugin }; _ss.Core = CoreTypeDropdown.SelectedItem .ToString() .GetEnumFromDescription <N64SyncSettings.CoreType>(); _ss.Rsp = RspTypeDropdown.SelectedItem .ToString() .GetEnumFromDescription <N64SyncSettings.RspType>(); _settable.PutCoreSettings(_s); _settable.PutCoreSyncSettings(_ss); }
private void OkBtn_Click(object sender, EventArgs e) { bool changed = _settings.OSDMessageVerbosity.ToString() != osdMessageVerbositycomboBox1.SelectedItem.ToString(); if (changed) { _settings.OSDMessageVerbosity = (AmstradCPC.OSDVerbosity)Enum.Parse(typeof(AmstradCPC.OSDVerbosity), osdMessageVerbositycomboBox1.SelectedItem.ToString()); _settable.PutCoreSettings(_settings); DialogResult = DialogResult.OK; Close(); } else { DialogResult = DialogResult.OK; Close(); } }
public static DialogResult DoSettingsDialog(IDialogParent dialogParent, ISettingsAdapter settable) { var s = (LibsnesCore.SnesSettings)settable.GetSettings(); var ss = (LibsnesCore.SnesSyncSettings)settable.GetSyncSettings(); using var dlg = new SNESOptions { RandomizedInitialState = ss.RandomizedInitialState, AlwaysDoubleSize = s.AlwaysDoubleSize, CropSGBFrame = s.CropSGBFrame, ShowObj1 = s.ShowOBJ_0, ShowObj2 = s.ShowOBJ_1, ShowObj3 = s.ShowOBJ_2, ShowObj4 = s.ShowOBJ_3, ShowBg1 = s.ShowBG1_0, ShowBg2 = s.ShowBG2_0, ShowBg3 = s.ShowBG3_0, ShowBg4 = s.ShowBG4_0 }; var result = dialogParent.ShowDialogAsChild(dlg); if (result == DialogResult.OK) { s.AlwaysDoubleSize = dlg.AlwaysDoubleSize; s.CropSGBFrame = dlg.CropSGBFrame; ss.RandomizedInitialState = dlg.RandomizedInitialState; s.ShowOBJ_0 = dlg.ShowObj1; s.ShowOBJ_1 = dlg.ShowObj2; s.ShowOBJ_2 = dlg.ShowObj3; s.ShowOBJ_3 = dlg.ShowObj4; s.ShowBG1_0 = s.ShowBG1_1 = dlg.ShowBg1; s.ShowBG2_0 = s.ShowBG2_1 = dlg.ShowBg2; s.ShowBG3_0 = s.ShowBG3_1 = dlg.ShowBg3; s.ShowBG4_0 = s.ShowBG4_1 = dlg.ShowBg4; settable.PutCoreSettings(s); settable.PutCoreSyncSettings(ss); } return(result); }
private void Ok_Click(object sender, EventArgs e) { _settings.Palette = ResolvePalette(true); _settings.NTSC_TopLine = (int)NTSC_FirstLineNumeric.Value; _settings.NTSC_BottomLine = (int)NTSC_LastLineNumeric.Value; _settings.PAL_TopLine = (int)PAL_FirstLineNumeric.Value; _settings.PAL_BottomLine = (int)PAL_LastLineNumeric.Value; _settings.AllowMoreThanEightSprites = AllowMoreSprites.Checked; _settings.ClipLeftAndRight = ClipLeftAndRightCheckBox.Checked; _settings.DispSprites = DispSprites.Checked; _settings.DispBackground = DispBackground.Checked; _settings.BackgroundColor = BGColorDialog.Color.ToArgb(); if (!checkUseBackdropColor.Checked) { _settings.BackgroundColor &= 0x00FFFFFF; } _settable.PutCoreSettings(_settings); Close(); }
private void OkBtn_Click(object sender, EventArgs e) { bool changed = _settings.OSDMessageVerbosity.ToString() != osdMessageVerbositycomboBox1.SelectedItem.ToString() || _settings.BackgroundColor != _bgColor || _settings.UseCoreBorderForBackground != checkBoxShowCoreBrdColor.Checked; if (changed) { _settings.OSDMessageVerbosity = (ZXSpectrum.OSDVerbosity)Enum.Parse(typeof(ZXSpectrum.OSDVerbosity), osdMessageVerbositycomboBox1.SelectedItem.ToString()); _settings.BackgroundColor = _bgColor; _settings.UseCoreBorderForBackground = checkBoxShowCoreBrdColor.Checked; _settable.PutCoreSettings(_settings); DialogResult = DialogResult.OK; Close(); } else { DialogResult = DialogResult.OK; Close(); } }
private void ButtonOk_Click(object sender, EventArgs e) { _settable.PutCoreSettings(_settings); DialogResult = DialogResult.OK; Close(); }
public static DialogResult DoSettingsDialog(IDialogParent dialogParent, ISettingsAdapter settable) { var s = (BsnesCore.SnesSettings)settable.GetSettings(); var ss = (BsnesCore.SnesSyncSettings)settable.GetSyncSettings(); using var dlg = new BSNESOptions { AlwaysDoubleSize = s.AlwaysDoubleSize, CropSGBFrame = s.CropSGBFrame, Entropy = ss.Entropy, RegionOverride = ss.RegionOverride, Hotfixes = ss.Hotfixes, FastPPU = ss.FastPPU, FastDSP = ss.FastDSP, FastCoprocessors = ss.FastCoprocessors, UseSGB2 = ss.UseSGB2, ShowObj1 = s.ShowOBJ_0, ShowObj2 = s.ShowOBJ_1, ShowObj3 = s.ShowOBJ_2, ShowObj4 = s.ShowOBJ_3, ShowBg1_0 = s.ShowBG1_0, ShowBg1_1 = s.ShowBG1_1, ShowBg2_0 = s.ShowBG2_0, ShowBg2_1 = s.ShowBG2_1, ShowBg3_0 = s.ShowBG3_0, ShowBg3_1 = s.ShowBG3_1, ShowBg4_0 = s.ShowBG4_0, ShowBg4_1 = s.ShowBG4_1 }; var result = dialogParent.ShowDialogAsChild(dlg); if (result == DialogResult.OK) { s.AlwaysDoubleSize = dlg.AlwaysDoubleSize; s.CropSGBFrame = dlg.CropSGBFrame; ss.Entropy = dlg.Entropy; ss.RegionOverride = dlg.RegionOverride; ss.Hotfixes = dlg.Hotfixes; ss.FastPPU = dlg.FastPPU; ss.FastDSP = dlg.FastDSP; ss.FastCoprocessors = dlg.FastCoprocessors; ss.UseSGB2 = dlg.UseSGB2; s.ShowOBJ_0 = dlg.ShowObj1; s.ShowOBJ_1 = dlg.ShowObj2; s.ShowOBJ_2 = dlg.ShowObj3; s.ShowOBJ_3 = dlg.ShowObj4; s.ShowBG1_0 = dlg.ShowBg1_0; s.ShowBG1_1 = dlg.ShowBg1_1; s.ShowBG2_0 = dlg.ShowBg2_0; s.ShowBG2_1 = dlg.ShowBg2_1; s.ShowBG3_0 = dlg.ShowBg3_0; s.ShowBG3_1 = dlg.ShowBg3_1; s.ShowBG4_0 = dlg.ShowBg4_0; s.ShowBG4_1 = dlg.ShowBg4_1; settable.PutCoreSettings(s); settable.PutCoreSyncSettings(ss); } return(result); }