Allow user to change new path settings in the path config dialog.

This commit is contained in:
SuuperW 2018-11-04 07:08:59 -06:00
parent c8d534299f
commit 4affd3ca8a
3 changed files with 64 additions and 31 deletions

View File

@ -173,7 +173,9 @@ BOOL PathSettings_OnInitDialog(HWND hDlg, HWND hwndFocus, LPARAM lParam)
SetDlgItemText(hDlg, IDC_ROMPATHEDIT, path.pathToRoms);
SetDlgItemText(hDlg, IDC_SAVERAMPATHEDIT, path.pathToBattery);
SetDlgItemText(hDlg, IDC_SRAMIMPORTPATHEDIT, path.pathToSramImportExport);
SetDlgItemText(hDlg, IDC_STATEPATHEDIT, path.pathToStates);
SetDlgItemText(hDlg, IDC_STATESLOTPATHEDIT, path.pathToStateSlots);
SetDlgItemText(hDlg, IDC_SCREENSHOTPATHEDIT, path.pathToScreenshots);
SetDlgItemText(hDlg, IDC_AVIPATHEDIT, path.pathToAviFiles);
SetDlgItemText(hDlg, IDC_CHEATPATHEDIT, path.pathToCheats);
@ -259,12 +261,24 @@ void PathSettings_OnCommand(HWND hDlg, int id, HWND hwndCtl, UINT codeNotify)
SetDlgItemText(hDlg, IDC_SAVERAMPATHEDIT, path.pathToBattery);
}
break;
case IDC_BROWSESRAMIMPORT:
{
if(BrowseForPath(path.pathToSramImportExport))
SetDlgItemText(hDlg, IDC_SRAMIMPORTPATHEDIT, path.pathToSramImportExport);
}
break;
case IDC_BROWSESTATES:
{
if(BrowseForPath(path.pathToStates))
SetDlgItemText(hDlg, IDC_STATEPATHEDIT, path.pathToStates);
}
break;
case IDC_BROWSESTATESLOTS:
{
if(BrowseForPath(path.pathToStateSlots))
SetDlgItemText(hDlg, IDC_STATESLOTPATHEDIT, path.pathToStateSlots);
}
break;
case IDC_BROWSESCREENSHOTS:
{
if(BrowseForPath(path.pathToScreenshots))
@ -344,7 +358,9 @@ void PathSettings_OnCommand(HWND hDlg, int id, HWND hwndCtl, UINT codeNotify)
GetDlgItemText(hDlg, IDC_ROMPATHEDIT, path.pathToRoms, MAX_PATH);
GetDlgItemText(hDlg, IDC_SAVERAMPATHEDIT, path.pathToBattery, MAX_PATH);
GetDlgItemText(hDlg, IDC_SRAMIMPORTPATHEDIT, path.pathToSramImportExport, MAX_PATH);
GetDlgItemText(hDlg, IDC_STATEPATHEDIT, path.pathToStates, MAX_PATH);
GetDlgItemText(hDlg, IDC_STATESLOTPATHEDIT, path.pathToStateSlots, MAX_PATH);
GetDlgItemText(hDlg, IDC_SCREENSHOTPATHEDIT, path.pathToScreenshots, MAX_PATH);
GetDlgItemText(hDlg, IDC_AVIPATHEDIT, path.pathToAviFiles, MAX_PATH);
GetDlgItemText(hDlg, IDC_CHEATPATHEDIT, path.pathToCheats, MAX_PATH);

View File

@ -153,6 +153,10 @@
#define IDD_PATHSETTINGS 366
#define IDC_ASSOCIATE 367
#define IDC_CLOSE_LUA_SCRIPTS 368
#define IDC_SRAMIMPORTPATHEDIT 369
#define IDC_BROWSESRAMIMPORT 370
#define IDC_STATESLOTPATHEDIT 371
#define IDC_BROWSESTATESLOTS 372
#define IDC_DES_BOX 402
#define IDC_R0 403
#define IDC_R1 404

View File

@ -57,47 +57,60 @@ BEGIN
LTEXT "Static",IDC_MROM,67,103,100,8
END
IDD_PATHSETTINGS DIALOGEX 0, 0, 252, 294
IDD_PATHSETTINGS DIALOGEX 0, 0, 252, 325
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Path Settings"
FONT 8, "Ms Shell Dlg 2", 0, 0, 0x0
BEGIN
GROUPBOX "Roms",IDC_STATIC,0,0,247,39
EDITTEXT IDC_ROMPATHEDIT,6,11,221,14,ES_AUTOHSCROLL
PUSHBUTTON "...",IDC_BROWSEROMS,230,11,13,14
CONTROL "Automatically use last visited folder",IDC_USELASTVISIT,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,27,129,10
CONTROL "Associate nds Files",IDC_ASSOCIATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,132,27,80,10
EDITTEXT IDC_SAVERAMPATHEDIT,5,51,221,14,ES_AUTOHSCROLL
GROUPBOX "SaveRam",IDC_STATIC,0,42,248,44
LTEXT "Auto save",IDC_STATIC,5,54,35,14
EDITTEXT IDC_SAVERAMPATHEDIT,42,51,184,14,ES_AUTOHSCROLL
PUSHBUTTON "...",IDC_BROWSESRAM,229,51,13,14
EDITTEXT IDC_STATEPATHEDIT,5,81,221,14,ES_AUTOHSCROLL
PUSHBUTTON "...",IDC_BROWSESTATES,229,81,13,14
EDITTEXT IDC_SCREENSHOTPATHEDIT,5,112,221,14,ES_AUTOHSCROLL
PUSHBUTTON "...",IDC_BROWSESCREENSHOTS,229,112,13,14
RADIOBUTTON "PNG",IDC_PNG,36,131,29,10
RADIOBUTTON "BMP",IDC_BMP,65,131,29,10
EDITTEXT IDC_FORMATEDIT,124,128,118,14,ES_AUTOHSCROLL
EDITTEXT IDC_AVIPATHEDIT,5,158,221,14,ES_AUTOHSCROLL
PUSHBUTTON "...",IDC_BROWSEAVI,229,158,13,14
EDITTEXT IDC_CHEATPATHEDIT,5,189,221,14,ES_AUTOHSCROLL
PUSHBUTTON "...",IDC_BROWSECHEATS,229,189,13,14
CONTROL "CHEAT.DAT",IDC_R4TYPE1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,160,206,54,10
CONTROL "USRCHEAT.DAT",IDC_R4TYPE2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,160,218,67,10
EDITTEXT IDC_LUAPATHEDIT,5,243,221,14,ES_AUTOHSCROLL
PUSHBUTTON "...",IDC_BROWSELUA,229,243,13,14
CONTROL "Auto-load Lua scripts with ROM",IDC_AUTOLOADLUA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,259,219,8
PUSHBUTTON "Defaults",IDC_PATHDEFAULTS,3,274,50,14
DEFPUSHBUTTON "OK",IDOK,148,274,50,14
PUSHBUTTON "Cancel",IDCANCEL,198,274,50,14
LTEXT "Format:",IDC_FORMATSTATIC,95,131,26,8
LTEXT "Save As:",IDC_SAVEAS,6,131,30,8
GROUPBOX "Screenshots",IDC_STATIC,0,103,248,44
GROUPBOX "States",IDC_STATIC,0,71,248,30
GROUPBOX "Roms",IDC_STATIC,1,0,247,39
GROUPBOX "SaveRam",IDC_STATIC,0,42,248,27
GROUPBOX "AviFiles",IDC_STATIC,0,149,247,27
GROUPBOX "Cheats",IDC_STATIC,0,180,247,50
GROUPBOX "Lua",IDC_STATIC,0,233,247,38
LTEXT "R4 cheats database file name",IDC_STATIC,56,206,100,17
LTEXT "Im/export",IDC_STATIC,5,70,35,14
EDITTEXT IDC_SRAMIMPORTPATHEDIT,42,67,184,14,ES_AUTOHSCROLL
PUSHBUTTON "...",IDC_BROWSESRAMIMPORT,229,67,13,14
GROUPBOX "States",IDC_STATIC,0,87,248,46
EDITTEXT IDC_STATEPATHEDIT,5,97,221,14,ES_AUTOHSCROLL
PUSHBUTTON "...",IDC_BROWSESTATES,229,97,13,14
LTEXT "Slots",IDC_STATIC,5,116,15,14
EDITTEXT IDC_STATESLOTPATHEDIT,24,113,202,14,ES_AUTOHSCROLL
PUSHBUTTON "...",IDC_BROWSESTATESLOTS,229,113,13,14
GROUPBOX "Screenshots",IDC_STATIC,0,135,248,44
EDITTEXT IDC_SCREENSHOTPATHEDIT,5,144,221,14,ES_AUTOHSCROLL
PUSHBUTTON "...",IDC_BROWSESCREENSHOTS,229,144,13,14
LTEXT "Save As:",IDC_SAVEAS,6,163,30,8
RADIOBUTTON "PNG",IDC_PNG,36,163,29,10
RADIOBUTTON "BMP",IDC_BMP,65,163,29,10
LTEXT "Format:",IDC_FORMATSTATIC,95,163,26,8
EDITTEXT IDC_FORMATEDIT,124,160,118,14,ES_AUTOHSCROLL
GROUPBOX "AviFiles",IDC_STATIC,0,181,247,28
EDITTEXT IDC_AVIPATHEDIT,5,189,221,14,ES_AUTOHSCROLL
PUSHBUTTON "...",IDC_BROWSEAVI,229,189,13,14
GROUPBOX "Cheats",IDC_STATIC,0,212,247,50
EDITTEXT IDC_CHEATPATHEDIT,5,221,221,14,ES_AUTOHSCROLL
PUSHBUTTON "...",IDC_BROWSECHEATS,229,221,13,14
LTEXT "R4 cheats database file name",IDC_STATIC,56,238,100,17
CONTROL "CHEAT.DAT",IDC_R4TYPE1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,160,238,54,10
CONTROL "USRCHEAT.DAT",IDC_R4TYPE2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,160,250,67,10
GROUPBOX "Lua",IDC_STATIC,0,265,247,38
EDITTEXT IDC_LUAPATHEDIT,5,275,221,14,ES_AUTOHSCROLL
PUSHBUTTON "...",IDC_BROWSELUA,229,275,13,14
CONTROL "Auto-load Lua scripts with ROM",IDC_AUTOLOADLUA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,291,219,8
PUSHBUTTON "Defaults",IDC_PATHDEFAULTS,3,306,50,14
DEFPUSHBUTTON "OK",IDOK,148,306,50,14
PUSHBUTTON "Cancel",IDCANCEL,198,306,50,14
END
IDD_ARCHIVEFILECHOOSER DIALOGEX 0, 0, 182, 113