adamdruppe / arsd

This is a collection of modules that I've released over the years. Most of them stand alone, or have just one or two dependencies in here, so you don't have to download this whole repo.
http://arsd-official.dpldocs.info/arsd.html
531 stars 128 forks source link

[Minigui] - getOpenFileName/getSaveFileName #332

Open MrcSnm opened 2 years ago

MrcSnm commented 2 years ago

I think they're missing 2 things:

  1. Argument for the window title
  2. The void delegate(string path) for the OK could be a bool delegate, returning true/false or adding another function for validating the input before the window is actually closed
adamdruppe commented 2 years ago

I don't think Windows supports that bool delegate thing...

MrcSnm commented 2 years ago

Humm you sure? I have seen a lot of times dialogs which could show a message box when selecting invalid things and it would back to selecting the thing.

Btw forgot to ask too:

getOpenFolderName when

adamdruppe commented 2 years ago

That's done in the void delegate - you can display the mesasge box there then call getOpenFileName again

MrcSnm commented 2 years ago

Humm usually I saw them showing without closing the window, but that's ok for now