@@ -2,8 +2,8 @@ package haxe.ui.backend;
22
33import haxe .ui .containers .dialogs .Dialog .DialogButton ;
44import haxe .ui .containers .dialogs .Dialog .DialogEvent ;
5- import haxe .ui .containers .dialogs .Dialogs ;
65import haxe .ui .containers .dialogs .Dialogs .FileDialogExtensionInfo ;
6+ import haxe .ui .containers .dialogs .Dialogs ;
77import haxe .ui .containers .dialogs .MessageBox .MessageBoxType ;
88
99typedef SaveFileDialogOptions = {
@@ -19,6 +19,7 @@ class SaveFileDialogBase {
1919 public var onDialogClosed : DialogEvent -> Void = null ;
2020
2121 public var fileInfo : FileInfo = null ;
22+ public var selectedFileInfo : SelectedFileInfo = null ;
2223
2324
2425 public function new (options : SaveFileDialogOptions = null , callback : DialogButton -> Bool -> String -> Void = null ) {
@@ -47,8 +48,13 @@ class SaveFileDialogBase {
4748 Dialogs .messageBox (" SaveFileDialog has no implementation on this backend" , " Save File" , MessageBoxType .TYPE_ERROR );
4849 }
4950
50- private function dialogConfirmed () {
51+ private function dialogConfirmed (selectedFileInfo : SelectedFileInfo = null ) {
5152 saveResult = true ;
53+ if (selectedFileInfo != null ) {
54+ this .selectedFileInfo = selectedFileInfo ;
55+ this .fileInfo = selectedFileInfo ;
56+ this .fullPath = selectedFileInfo .fullPath ;
57+ }
5258 if (callback != null ) {
5359 callback (DialogButton .OK , saveResult , fullPath );
5460 }
0 commit comments