Convert settings save prompt to TaskDialog
This commit is contained in:
@@ -893,12 +893,12 @@ BEGIN
|
||||
2048 "86Box"
|
||||
IDS_2049 "86Box Error"
|
||||
IDS_2050 "86Box Fatal Error"
|
||||
IDS_2051 "This will hard reset the emulated machine.\nAre you sure you want to save the settings?"
|
||||
IDS_2051 "Are you sure you want to save the settings?"
|
||||
IDS_2052 "Use CTRL+ALT+PAGE DOWN to return to windowed mode"
|
||||
IDS_2053 "Speed"
|
||||
IDS_2054 "ZIP %03i %i (%s): %ls"
|
||||
IDS_2055 "ZIP images (*.IM?;*.ZDI)\0*.IM?;*.ZDI\0"
|
||||
IDS_2056 "86Box could not find any usable ROM images.\n\nPlease download a ROM set from https://github.com/86Box/roms/releases/latest and extract it into the ""roms"" directory."
|
||||
IDS_2056 "86Box could not find any usable ROM images.\n\nPlease download a ROM set from <a href=""https://github.com/86Box/roms/releases/latest"">https://github.com/86Box/roms/releases/latest</a> and extract it into the ""roms"" directory."
|
||||
IDS_2057 "(empty)"
|
||||
IDS_2058 "ZIP images (*.IM?;*.ZDI)\0*.IM?;*.ZDI\0All files (*.*)\0*.*\0"
|
||||
IDS_2059 "Turbo"
|
||||
@@ -939,7 +939,7 @@ BEGIN
|
||||
IDS_2086 "MB"
|
||||
IDS_2087 "Check BPB"
|
||||
IDS_2088 "KB"
|
||||
IDS_2089 "86Box could not initialize the video renderer."
|
||||
IDS_2089 "Could not initialize the video renderer."
|
||||
IDS_2090 "Default"
|
||||
IDS_2091 "%i Wait state(s)"
|
||||
IDS_2092 "Type"
|
||||
@@ -954,8 +954,8 @@ BEGIN
|
||||
IDS_2101 "Microsoft SideWinder Pad"
|
||||
IDS_2102 "Thrustmaster Flight Control System"
|
||||
IDS_2103 "None"
|
||||
IDS_2104 "Unable to load Keyboard Accelerators!"
|
||||
IDS_2105 "Unable to register Raw Input!"
|
||||
IDS_2104 "Unable to load keyboard accelerators."
|
||||
IDS_2105 "Unable to register raw input."
|
||||
IDS_2106 "%u"
|
||||
IDS_2107 "%u MB (CHS: %i, %i, %i)"
|
||||
IDS_2108 "Floppy %i (%s): %ls"
|
||||
@@ -968,7 +968,12 @@ BEGIN
|
||||
IDS_2115 "MO %i (%03i): %ls"
|
||||
IDS_2116 "MO images (*.IM?)\0*.IM?\0All files (*.*)\0*.*\0"
|
||||
IDS_2117 "Welcome to 86Box!"
|
||||
IDS_2118 "Internal controller"
|
||||
IDS_2118 "Internal controller"
|
||||
IDS_2119 "Exit"
|
||||
IDS_2120 "No ROMs found"
|
||||
IDS_2121 "Save changes\nThis will hard reset the emulated machine."
|
||||
IDS_2122 "Discard changes\nAll changes made to the settings will be lost."
|
||||
IDS_2123 "Cancel\nGo back to the Settings window."
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
||||
@@ -396,17 +396,31 @@ static int
|
||||
settings_msgbox_reset(void)
|
||||
{
|
||||
int changed, i = 0;
|
||||
TASKDIALOGCONFIG tdconfig = {0};
|
||||
TASKDIALOG_BUTTON tdbuttons[] = {
|
||||
{IDYES, MAKEINTRESOURCE(IDS_2121)},
|
||||
{IDNO, MAKEINTRESOURCE(IDS_2122)},
|
||||
{IDCANCEL, MAKEINTRESOURCE(IDS_2123)}
|
||||
};
|
||||
|
||||
changed = win_settings_changed();
|
||||
|
||||
if (changed) {
|
||||
i = settings_msgbox(MBX_QUESTION, (wchar_t *)IDS_2051);
|
||||
tdconfig.cbSize = sizeof(tdconfig);
|
||||
tdconfig.hwndParent = hwndParentDialog;
|
||||
tdconfig.dwFlags = TDF_USE_COMMAND_LINKS;
|
||||
tdconfig.dwCommonButtons = 0;
|
||||
tdconfig.pszWindowTitle = MAKEINTRESOURCE(IDS_STRINGS);
|
||||
tdconfig.pszMainInstruction = MAKEINTRESOURCE(IDS_2051);
|
||||
tdconfig.cButtons = ARRAYSIZE(tdbuttons);
|
||||
tdconfig.pButtons = tdbuttons;
|
||||
TaskDialogIndirect(&tdconfig, &i, NULL, NULL);
|
||||
|
||||
if (i == 1) return(1); /* no */
|
||||
if (i == IDNO) return(1); /* no */
|
||||
|
||||
if (i < 0) return(0); /* cancel */
|
||||
if (i == IDYES) return(2); /* yes */
|
||||
|
||||
return(2); /* yes */
|
||||
return(0); /* cancel */
|
||||
} else
|
||||
return(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user