Closed damekko closed 5 years ago
it is done! just put dlg.chooseFileDialog in imgui window block, and use a boolean value as trigger.
It's done!
Nice! :smiley:
For others, as I've already explained it in another post (https://github.com/Flix01/imgui/issues/19), this snippet should work:
bool browseButtonPressed = false;
if (ImGui::BeginMenu("File")) {
browseButtonPressed = ImGui::MenuItem("Open...", "CTRL+O");
ImGui::EndMenu();
}
static ImGuiFs::Dialog dlg;
const char* chosenPath = dlg.chooseFileDialog(browseButtonPressed);
I tried to call "dlg.chooseFileDialog(true); " directly, but no response.