| 2924 | } |
| 2925 | |
| 2926 | bool UI::ShowSaveImageDialog(String& filename) { |
| 2927 | try { |
| 2928 | auto dialog = pfd::save_file( |
| 2929 | "Save Screenshot", // title |
| 2930 | WORKING_FOLDER_FULL, // initial directory (like open dialog) |
| 2931 | { |
| 2932 | "PNG Image", "*.png", |
| 2933 | "JPEG Image", "*.jpg", |
| 2934 | "JPEGXL Image", "*.jxl", |
| 2935 | "All Files", "*" |
| 2936 | }, |
| 2937 | pfd::opt::none |
| 2938 | ); |
| 2939 | |
| 2940 | auto result = dialog.result(); |
| 2941 | if (!result.empty()) { |
| 2942 | filename = result; |
| 2943 | return true; |
| 2944 | } |
| 2945 | } catch (const std::exception& e) { |
| 2946 | DEBUG("File dialog error: %s", e.what()); |
| 2947 | } |
| 2948 | return false; |
| 2949 | } |
| 2950 | |
| 2951 | void UI::SetupCustomSettings(Window& window) { |
| 2952 | // Register custom settings handler |
no test coverage detected