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); }
public static void DoCGBColorChooserFormDialog(IDialogParent parent, Gameboy.GambatteSettings s) { using var dlg = new CGBColorChooserForm(); dlg.LoadType(s); var result = parent.ShowDialogAsChild(dlg); if (result == DialogResult.OK) { s.CGBColors = dlg._type; } }
public static DialogResult DoSettingsDialog( Config config, IDialogParent dialogParent, ISettingsAdapter settable, OctoshockDll.eVidStandard vidStandard, Size vidSize) { using PSXOptions dlg = new( config, dialogParent.DialogController, settable, (Octoshock.Settings)settable.GetSettings(), (Octoshock.SyncSettings)settable.GetSyncSettings(), vidStandard, vidSize); return(dialogParent.ShowDialogAsChild(dlg)); }
public static DialogResult DoDialogFor( IDialogParent owner, ISettingsAdapter settable, string title, bool isMovieActive, bool ignoreSettings = false, bool ignoreSyncSettings = false) { using GenericCoreConfig dlg = new( settable, isMovieActive : isMovieActive, ignoreSettings : ignoreSettings, ignoreSyncSettings : ignoreSyncSettings) { Text = title, }; return(owner.ShowDialogAsChild(dlg)); }
public static void DoColorChooserFormDialog(IDialogParent parent, Config config, IGameInfo game, Gameboy.GambatteSettings s) { using var dlg = new ColorChooserForm(parent.DialogController, config, game); dlg.SetAllColors(s.GBPalette); var result = parent.ShowDialogAsChild(dlg); if (result.IsOk()) { int[] colors = new int[12]; for (int i = 0; i < 12; i++) { colors[i] = dlg._colors[i].ToArgb(); } s.GBPalette = colors; } }
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); }
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); }