UI rework

Gondos

Well-known member
Joined
Apr 18, 2022
Messages
514
Reaction score
707
Points
108
Location
On my chair
Hi,
With the official release of OpenOrbiter2024 now behind us, we can move on to more impacting developments.
For those who are unaware, there is a push to make Orbiter more cross platform friendly. To that end there is ongoing work to replace the current dialogs using the native Windows API with widgets from a cross platform framework called imgui
For the end user the impact should be only visual, but here are a few exemples of what can be done with the framework now :
- Proper notifications instead of oneliner error messages provided by oapiDebugString(). Error messages can be copied to the clipboard, recurrent errors are counted instead of filling the screen.
notif.png
- Mouse and keyboard friendly context menus
contextmenu.gif
- Addons can add entries in the menu bar, which can be sorted.
menubar.gif
Since it has a big impact on the look and feel of Orbiter, I think that community feedback is really important on this.
The color theme can be customized and right now it's using mostly default colors.
You can look here to see what kind of styling can be done.
A basic theme editor can be made and if desired an option to import/export themes can be added in the future if people are interested.

The main questions for addon devs is do you often need to create external windows, are you skeptical about having to use a different framework, is it a no-go for you?

I'll see if binaries can be made available for those that don't have the possibility of building feature branches.
The PR related to these changes is here: https://github.com/orbitersim/orbiter/pull/550

Sorry for the crappy gifs, I cannot access my youtube account anymore.
 
In my experimental SDL3 branch (which will see some large changes soon-ish), I've messed around a bit with potential styles:
1740250543862.png
1740250599945.png
1740250631204.png
1740250641900.png
I'm always open to feedback for these visual things, but they're not my main priority with that branch right now so it might be a bit before I get to them :P
Ultimately that PR will probably be split into a few (see my other post and some of the discussion around it)

Having a consistent style between Orbiter core parts is nice, however, and the way ImGui works it's possible for modules to override said style.
I personally like this style (its colors are derived from "Delta Glider Red" haha), but I'm no UI designer so feedback is appreciated!
 
I've been working on the menubar to allow adding custom buttons, I'm not quite happy with the font for the info bars but that can be changed later :
menubar_en.png

The nice thing is that the button labels are handled as normal text so it is possible to do things like that in the future :
menubar_fr.png
All core dialogs have been ported, except for the scenario editor. The main obstacle is custom tab support that requires a new API.
Nothing impossible but it'll require updating the addons that use that feature.
I already did something similar to the XR fleet on the linux branch, here is how it can be integrated :
payload_editor.png
Maybe I'll keep both available for a while if that can help.
The WIP branch is here for those interested.
 
If its about me, I would like this to be integrated into mainline Orbiter. :) Of course, it needs more work and breaks a lot of stuff, but it removes one of the most annoying examples of low-level Windows programming.
 
I like what I'm seeing with the UI rework. I had a couple of thoughts, which I'm sure are mostly already covered.

  • Whatever we use for a UI framework should have no non-free components (linked or compiled).
  • Dependencies should be lightweight and shouldn't break things if the dependency maintainer stops maintaining (as much as possible at least).
  • (the above points make a great case against Windows lol)
  • If we ever want to switch away from the Windows UI we will already break the UI API, so let's do it in a way that allows us to keep it relatively stable in subsequent versions.
  • I really like the custom menu buttons. :)
 
Yes, everything is under the MIT license to stay compatible.
Don't know if it's often used but the FlightData plugin has been converted to use ImPlot :
flightdata.png
It's not as CPU friendly as the old one but I still get several hundred FPS in debug build so I guess it should be OK if it's something of a niche.
 
Yes, everything is under the MIT license to stay compatible.
Don't know if it's often used but the FlightData plugin has been converted to use ImPlot :
View attachment 42754
It's not as CPU friendly as the old one but I still get several hundred FPS in debug build so I guess it should be OK if it's something of a niche.
Does the FlightData plugin support user-defined inputs? I can't remember if the old one did.
 
Does the FlightData plugin support user-defined inputs? I can't remember if the old one did.

AFAIR not, or I just did not discover that feature yet.
 
More progress toward removing GDI usage in the core :
Atlantis.png
On the left the current dialogs, on the right the conversion to DearImGui.
I used the R13L panel texture and manually placed custom buttons for the payload bay controls because using the default ImGui layout engine would have been a nightmare.
 
There is an ongoing pull request to integrate this.
x86 test binaries are available here (at the bottom of the page), some feedback from the community is really required so if you have some time to test this it would be appreciated.
A basic theme was added that uses the HUD color and you can right-click on the menubar if you want to change the size of the buttons.
 
Thank you. I tried it a little:

Без імені.png

I set "Mouse focus behavior" to "Focus follows mouse", but it seems not to work. This is a feature that I really like to use.

Also, I don't know how, but I separated one of the windows into a separate Windows window and then returned it back to the game.
 
External MFDs suddenly separate into separate windows:

View attachment 46241
What do you mean by "suddenly"? I see 2 External MFDs icons appearing in your menubar, that shouldn't happen. Do you know when the second one appeared?
When dragging a dialog outside of the main window, it'll create a native window that can live outside of it. I can add an option to prevent this behavior or just remove their taskbar icons if necessary.
 
What do you mean by "suddenly"?
I just created several external MFDs and after a while they just separated into separate windows. I don't know how that happened. And now I can't repeat this behavior:

Без імені.png
I see 2 External MFDs icons appearing in your menubar, that shouldn't happen. Do you know when the second one appeared?
No, I don't know it.
 
I really like that you can change and lock the MFD aspect ratio.

Could I make a small request though? Can you add a button to set/reset the aspect ratio [back] to 1:1 and 4:3. Some things depend on that formatting.

Are all the dependencies for this change compiled in, or are we linking to anything?
 
Back
Top