Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any way to popup chooseFileDlg by pressing menuItem in MainMenuBar? #47

Closed
damekko opened this issue Nov 7, 2018 · 2 comments

Comments

@damekko
Copy link

damekko commented Nov 7, 2018

I tried to call "dlg.chooseFileDialog(true); " directly, but no response.

@damekko
Copy link
Author

damekko commented Nov 7, 2018

it is done! just put dlg.chooseFileDialog in imgui window block, and use a boolean value as trigger.

@damekko damekko closed this as completed Nov 7, 2018
@Flix01
Copy link
Owner

Flix01 commented Nov 7, 2018

It's done!

Nice! 😃

For others, as I've already explained it in another post (#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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants