UI rework

The branch just got merged. Now is time to report them bugs, before the next release if possible^^
The NASSP folk found that annotations seem to cause a CTD. You can reproduce it by loading the "Challenge 1" scenario under the Challenges folder; it'll try to print an annotation and crash on scenario load. I was going to try to spend some time digging into the root cause, but... I don't have any right now, as per usual!
 
The NASSP folk found that annotations seem to cause a CTD. You can reproduce it by loading the "Challenge 1" scenario under the Challenges folder; it'll try to print an annotation and crash on scenario load. I was going to try to spend some time digging into the root cause, but... I don't have any right now, as per usual!
Some paths are not providing the string length but use '-1' and it makes the conversion from UTF8 crash. I'll fix it shortly.
 
In my experimental SDL3 branch (which will see some large changes soon-ish), I've messed around a bit with potential styles:
View attachment 42490
View attachment 42491
View attachment 42492
View attachment 42493
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!
Wow, good to see improvement like this that even makes Orbiter looks modern.
Very nice
 
I compiled the latest Orbiter code, but then when compiling SSV I'm getting a few warnings like this...
Code:
orbiterapi.h(712): warning C4251: 'ImGuiDialog::name': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'ImGuiDialog' (compiling source file LCC_MFD.cpp)
... but everything compiles and runs. Any idea?

The new Orbiter do dialogs show up and they look good, especially the popups being next to the mouse, and actually reacting to it.
Any quick guide on how upgrade existing dialogs to the new looks? We should have that in the manual...

Also, could the "x1.0" time accel. not be shown? Maybe it is the years of not having it, but I find it very distracting...
 
I compiled the latest Orbiter code, but then when compiling SSV I'm getting a few warnings like this...
Code:
orbiterapi.h(712): warning C4251: 'ImGuiDialog::name': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'ImGuiDialog' (compiling source file LCC_MFD.cpp)
... but everything compiles and runs. Any idea?
That particular field is const, do you have a warning for the other two? (helpfile and help topic)
The new Orbiter do dialogs show up and they look good, especially the popups being next to the mouse, and actually reacting to it.
Any quick guide on how upgrade existing dialogs to the new looks? We should have that in the manual...
If you're using oapiOpenInputBox then it'll use the new dialogs automatically. There is currently nothing in the OAPI to expose the context menu though. The functions are "doxygen" commented and should appear in the generated documentation.
Also, could the "x1.0" time accel. not be shown? Maybe it is the years of not having it, but I find it very distracting...
You can disable it : right click on the menubar and there's an "Always show warp factor" option
 
That particular field is const, do you have a warning for the other two? (helpfile and help topic)
Yes:
Code:
orbiterapi.h(712): warning C4251: 'ImGuiDialog::name': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'ImGuiDialog' (compiling source file LCC_MFD.cpp)
orbiterapi.h(714): warning C4251: 'ImGuiDialog::helpfile': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'ImGuiDialog' (compiling source file LCC_MFD.cpp)
orbiterapi.h(715): warning C4251: 'ImGuiDialog::helptopic': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'ImGuiDialog' (compiling source file LCC_MFD.cpp)


The functions are "doxygen" commented and should appear in the generated documentation.
Yeah, but we also should have something in the Developer Manual on how to migrate.


If you're using oapiOpenInputBox then it'll use the new dialogs automatically.
Nop, using the old DlgCtrl, thus the need to upgrade... eventually, for now it runs fine.


You can disable it : right click on the menubar and there's an "Always show warp factor" option
Yep, that is it, thanks!


Also, on the frame rate display and chart: the numbers are changing so much that they are unreadable, and the chart does look better with the range outside (as it was), instead of just the maximum inside, which kinda makes the user think that is the current fps.
BTW: for consistency of looks, the ":" after the fps and dt/f should not be shown.
 
Just found out we can Ctrl-Tab between dialogs! (y)
But there is a thing that could be improved there: the main window is labeled "(Untitled)"... the top menu is what gets highlighted, but it isn't shown (I have it on auto-hide), so I'm not sure if the untitled window is the top menu or it is the main window. Anyway, it should be called something other than "untitled".

Bug: the "Target Lock" in the Ground tab of the Camera window isn't working as it should: the camera gets stuck in "free" or "tgt-lock", and it ignores the checkbox.
 
Just found out we can Ctrl-Tab between dialogs! (y)
But there is a thing that could be improved there: the main window is labeled "(Untitled)"... the top menu is what gets highlighted, but it isn't shown (I have it on auto-hide), so I'm not sure if the untitled window is the top menu or it is the main window. Anyway, it should be called something other than "untitled".

Bug: the "Target Lock" in the Ground tab of the Camera window isn't working as it should: the camera gets stuck in "free" or "tgt-lock", and it ignores the checkbox.
Thanks for all the feedback! I fixed almost all of this, except for the max FPS (I need to think of a way to do this properly) and the warning (I need to setup an addon build outside of the Orbiter tree).
 
Not 100% related to the thread subject, but I just posted a PR that improves the camera distance display, with the addition of parsec units and then scientific notation for even larger numbers, so instead of something like "894641723285147473821810392317583676283453251007612135AU" it shows a much more compact "5.647e+24pc".
I also replaced the "10^" with "e" in the information dialog outputs, so it looks more "correct".
Also in that dialog, there is a mix usage of spaces, or nothing, between the number and the unit: "10.7 kg" vs "10.7kg". Not sure what would make more sense.
Finally, also in the information dialog, the vessel PMI display now has units "kg m2", which I'm not sure is what Orbiter uses... I think it is "normalized" to the mass of the vessel, and I only remember seeing "m2" in the API, so that need to be looked at.
 
Not sure how this is handled, but we just noticed the ± symbol is now being rendered as a ? symbol in our checklist MFD after these updates.

Additionally the degree symbol is having the same issue...a pretty important one for a space flight simulator ;)
 
Last edited:
Not sure how this is handled, but we just noticed the ± symbol is now being rendered as a ? symbol in our checklist MFD after these updates.

Additionally the degree symbol is having the same issue...a pretty important one for a space flight simulator ;)
You need to save your source files in UTF-8. I had some trouble with some files and had to copy/paste the ° symbol from wikipedia because MSVC2022 was failing to convert when using saves with encoding for whatever reason...
 
You need to save your source files in UTF-8. I had some trouble with some files and had to copy/paste the ° symbol from wikipedia because MSVC2022 was failing to convert when using saves with encoding for whatever reason...
The files with the text in question are excel files, so I am not sure what exactly I can change in those.
 
Back
Top