Giter Club home page Giter Club logo

Comments (3)

GamingMinds-DanielC avatar GamingMinds-DanielC commented on May 23, 2024

There is a lot of useful documentation (in form of source comments) in the header file itself if you navigate to the function declarations. Small excerpt:

    IMGUI_API bool          BeginMenu(const char* label, bool enabled = true);                  // create a sub-menu entry. only call EndMenu() if this returns true!
    IMGUI_API void          EndMenu();                                                          // only call EndMenu() if BeginMenu() returns true!

In short: your unconditional call to EndMenu() is wrong.

from imgui.

BraunSilas avatar BraunSilas commented on May 23, 2024

WOOW, Thank you. I didn't expect it to be this simple. HAHA.
Well thank you very much for your quick response.
I'll close this issue now.

from imgui.

GamingMinds-DanielC avatar GamingMinds-DanielC commented on May 23, 2024

That's not the only thing though. As you can see in the documentation, BeginMenu() is for sub-menues only, not for menu bars. A few lines higher in the header you will find the correct functions to use if you want a menu bar (and according to your window flag that seems to be your intention) instead of a sub-menu widget.

Also always a good reference for how things work: ImGui::ShowDemoWindow(). That function is there to showcase features and is basically a reference source on how to use them. And it starts with a menu bar.

from imgui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.