-
Notifications
You must be signed in to change notification settings - Fork 227
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
Add support for ImGui #550
base: main
Are you sure you want to change the base?
Conversation
…g the scenario to prevent calling oapiOpenDialog before it exists
I've added a temporary port for the D3D9 gfx dialog to help in refining the API. I'll either remove it later or port the other dialogs. |
Thanks, I tested this and it worked fine, no problems with building and the code looks very simple and efficient. So, I'll have to start looking into the documentation and learning how to use the widgets. There seems to be pretty good collection of them. Is there a "Load file", "Save file" dialogs ? Is there still much to do before merge ? |
There is no "native" file dialog but there are a few projects that provide one, I'll try a couple and see if one is easier to use than the others. Before merging I'd like some feedback from someone with a HiDPI display to know if the dialogs aren't too small there. |
Yes, I tried the "TGT" button and it works perfectly. Nice work there. On 1920x1080 the scaling looks good al-tough in some cases I might prefer little smaller, like in a property tree. Is the scaling adjustable ? |
The font used to be 14 in size, I upped it to 18 but that's something that'll need tweaking I guess. Edit: I did some work on Lua bindings but the "usual" tool is unmaintained. I could get it to a work with the current ImGui version but there is some work involved. I'll do that in another PR not to pollute this one. |
This is ready for review but not for merge.
|
This PR adds support for Dear ImGui, which provides an OS agnostic GUI toolkit.
The first commit hooks the library to the orbiter core and the D3D9Client library. I've used cmake fetch+patch mecanism to add the external dependency. I'm not an expert in cmake so don't hesitate to comment if you're not satisfied with the way the library has been added.
The ImGui code is instanciated inside the Orbitersdk.lib file so that modules can eventually use it in the future.
The second commit changes the handling of input boxes/context menus to use the new library.
Some feedback would be nice from users with high DPI monitors so that we can know if the font size is acceptable.
The library has backends for DX9/DX12, OpenGL, vulkan, WinAPI, SDL, glfw... so it should be future proof.
I've got ImGui equivalents for almost all dialogs in my linux branch so if we decide to expand on this, it should not be too difficult to replace the core Orbiter dialogs currently using the Windows API.