MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / Window_SaveFileDialog

Function Window_SaveFileDialog

src/Window_OS2.c:557–575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

555}
556
557cc_result Window_SaveFileDialog(const struct SaveFileDialogArgs* args) {
558 FILEDLG fileDialog;
559 HWND hDialog;
560
561 memset(&fileDialog, 0, sizeof(FILEDLG));
562 fileDialog.cbSize = sizeof(FILEDLG);
563 fileDialog.fl = FDS_HELPBUTTON | FDS_CENTER | FDS_PRELOAD_VOLINFO | FDS_SAVEAS_DIALOG;
564 fileDialog.pszTitle = (PSZ)args->titles;
565 fileDialog.pszOKButton = NULL;
566
567 Mem_Copy(fileDialog.szFullFile, *(args->filters), CCHMAXPATH);
568 hDialog = WinFileDlg(HWND_DESKTOP, hwndClient, &fileDialog);
569 if (fileDialog.lReturn == DID_OK) {
570 cc_string temp = String_FromRaw(fileDialog.szFullFile, CCHMAXPATH);
571 args->Callback(&temp);
572 }
573
574 return 0;
575}
576
577/* Displays on-screen keyboard for platforms that lack physical keyboard input. */
578/* NOTE: On desktop platforms, this won't do anything. */

Callers 1

SaveLevelScreen_FileFunction · 0.70

Calls 2

Mem_CopyFunction · 0.85
String_FromRawFunction · 0.85

Tested by

no test coverage detected