-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
How do I make a full on, Proper GUI app with ImGUI? #7109
Comments
Just look at #6897 soo many BEAUTIFUL UIs, I wanna learn how do this. |
Depends on many things. You have example code for all of the backends. Build them all with your preferred build setup and see what suits you best.
What do you mean by that? You open a menu bar and submit custom menu items (or other widgets) to it.
These UIs are mostly collections of "simpler" windows that are neatly docked. To get you started on more complex stuff, you should get the docking branch, create a dockspace over the entire viewport (with If you want a full tutorial, there seem to be a lot of resources out there if you search, but I can't recommend anything in particular since I didn't read/watch them. This is a far to broad topic to just answer. |
I am talking about this #6897 (comment) or this #6897 (comment) I really want to know how or what steps they took to achieve this. |
This is too generic/wide of a topic to be meaningfully answered here. As you get acquainted to Dear ImGui you will find it more natural over time to do things like this, but all the tools are available it's up to you to assemble the code. In the first link I see:
In the second link I see:
Also see https://github.com/ocornut/imgui/wiki/Useful-Extensions for code reference. |
So, basically a toolbar with custom widgets inside. The way to start the process goes like this... First you need to think about what your toolbar should be able to do. Usually it's a bar of fixed size that sits directly under the main menu (if there is any). Docking is not allowed to split it, the user can't move or resize it, ... so what comes to mind that already does this kind of thing? The main menu bar. Since you have the complete source code available, you can take a look at the implementation of As per the main menu bar, you need this: If you look where this structure is defined, you will see that you need to include The toolbar is placed at To get rid of decorations and unwanted interactions, you can set a few flags, start with The steps for custom widgets are similar. You think about what you want, take a look at stock widgets that do something similar and use them as a reference to implement your own. You can use groups to group widgets together, you can use invisible buttons to define an interactive area and retrieve draw lists to draw them as you see fit. Of course there are lots of other things you can do as well. You can put it at the bottom, you can do a vertical layout on the left or right. Experiment. The best thing about diving into the code is that you learn useful things you otherwise won't even think to ask about. |
Thank you, Mr Omar, Daniel Cremers. |
Many people (including me) use ImGUI for its true intended purpose, Immediate mode GUI.
However, because of the sheer low-level control and customisations you can do with it, I want to use it as a GUI library insted.
So, Mr Omar, do you recommend I go thorough with this idea (I know it will be complex but still).
If so, what Graphics backend should I use for the smallest executable size possible.
How do I make proper windows. (Not window inside a window like the default style)
How do I get started, are there any examples?
What about custom menu bars?
How do I achieve this?
I am looking for suggestions, resources and feedback from the community 😊
Thanks in advance
The text was updated successfully, but these errors were encountered: