pthom / hello_imgui

Hello, Dear ImGui: unleash your creativity in app development and prototyping

Home Page:https://pthom.github.io/hello_imgui

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

App Menu vs Main Window Title

Guillaume227 opened this issue · comments

Hello again !

I initially populate my RunnerParams with:

  runnerParams.appWindowParams.windowTitle = "MyApp"
  runnerParams.imGuiWindowParams.showMenuBar = true;
  runnerParams.imGuiWindowParams.showMenu_App = true;
  runnerParams.imGuiWindowParams.showMenu_View = true;

When I update the window title once the application is up and running with the following statement:

HelloImGui::GetRunnerParams()->appWindowParams.windowTitle = "MyApp 2023.1.1";

I noticed that the App menu name gets updated to my title variable while the main window title remains the same as the value that was in the RunnerParams I originally passed to HelloImGui::Run().
In the following example the initial value of appWindowParams.windowTitle was just "MyApp", then updated to "MyApp 2023.1.1" :
image

Note: the Settings menu you can see in the image is my own custom menu on top of the App and View built-ins.

This behavior is a bit surprising to me and I want to clarify what is a feature and what might be a bug.
It also makes me wonder if there is a way to control separately the name of the App menu from the main window title ?
My expectation was that appWindowParams.windowTitle would only affect the main window title bar and not the App menu entry name.

Hello!

Thanks for the remark. You are right these should be separated.
I made some modifications for this:

With 09940d0, you can set a different value for the app menu name.

With 104f43d, you can add custom elements at the beginning of the App menu (before the Quit menu item).

Also, if you are using ImGui Bundle, I also updated the python bindings there.

Please tell me if it works for you.

Cheers.

PS: It was nice to see some feedback with a screenshot :-) Would you say that the experience with HelloImGui handling of docking and menu is easy / pleasing?

I can confirm this fully addresses my earlier questions and needs.
I am in the process of trying out hello_imgui by porting an existing 'pure' imgui application.

Docking is definitely nicer with hello_imgui. I was mulling a similar approach before I came upon your project so it's great I am able to reuse that instead. I have a question related to that so I will create another issue for that.

It feels like with hello_imgui I would have streamlined my original and rather hairy imgui integration.
It's still early stage for me but your amazing support makes it very enticing to keep going in that direction.

I am not using ImGui Bundle yet, although I am using implot (which is also fantastic).