MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / ShowSaveFileDialog

Method ShowSaveFileDialog

Source/Engine/Platform/Mac/MacFileSystem.cpp:98–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98bool MacFileSystem::ShowSaveFileDialog(Window* parentWindow, const StringView& initialDirectory, const StringView& filter, bool multiSelect, const StringView& title, Array<String>& filenames)
99{
100 bool result = true;
101 @autoreleasepool {
102 NSWindow* focusedWindow = [[NSApplication sharedApplication] keyWindow];
103
104 NSSavePanel* dialog = [NSSavePanel savePanel];
105 [dialog setExtensionHidden:NO];
106 InitMacDialog(dialog, initialDirectory, filter, title);
107
108 if ([dialog runModal] == NSModalResponseOK)
109 {
110 const NSURL* url = [dialog URL];
111 filenames.Add(AppleUtils::ToString((CFStringRef)[url path]));
112 result = false;
113 }
114
115 [focusedWindow makeKeyAndOrderFront:nil];
116 }
117 return result;
118}
119

Callers 2

NewProjectMethod · 0.45
ExportMethod · 0.45

Calls 3

InitMacDialogFunction · 0.85
ToStringFunction · 0.50
AddMethod · 0.45

Tested by

no test coverage detected