In conjunction with some FlightGear changes, the delegate can now do
all sequencing decisions, i.e the GPS C++ code does not make any policy
decisions about sequencing.
Update the default Nasal delegate to mimic the old behaviour, and set
the config option, both to allow future developments and to demonstrate
the new API.
It looks like widgets don't inherit font or colour from parent widgets. Also,
setting font=nil gives sublety different results compared to leaving font
unspecified.
So we now set font and colour explicitly for every widget using new function
set_default().
Also set font and colour of 'Pilots:' widgets and heading widget to me.fg[1] to
match other text.
resetViewPos(): set /sim/current-view/?-offset-m to
/sim/view[]/config/?-offset-m, not zeros.
This requires corresponding change to flightgear to compensate for the extra
offset, and fixes things when aircraft implement custom views by writing to
/sim/current-view/?-offset-m.
It's always been at the top; and although it is clear that the intent of this change was to improve things it highlights the need to make more substantial improvements to the way on screen messages are handled.
What we probably should have is an area that has a transparent dark background, a fixed size, supports scrolling, can be left open (or re-opened) and moved persitently around the screen.
This reverts commit 82f3eb45b9.
Due to Nasal/view.nas making a sequential copy of views, inserting new view
number 8 for Tower View AGL broke custom views, e.g. for aircraft 777).
We no longer require Model View (it's identical to Helicopter view now), so
this way we can have Tower View AGL without altering sequential view numbers.
I think the previous alternating colours were confusing because of the use of
a third and fourth colour for when we have no model or are using a fallback
model.
I think this is more convenient than the normal model-view buttons / popup
list. [Though this is still there.]
Nasal/multiplayer.nas:
Added new column 'view' with checkbox. Also added 'view self' button to
titlebar to view the user's aircraft.
Fix some bad indentation.
Nasal/view.nas:
Changed /sim/current-view/model-view to contain just the callsign, not
'<callsign> <model>', so that Nasal/multiplayer.nas can get the callsign
reliably.
We remember the multiplayer aircraft so that when switching between views,
multiplayer views (currently Helicopter, Model, Tower and Tower AGL) show the
same aircraft.
Nasal/view.nas: use /orientation/true-heading-deg in Model view and Tower AGL
view. This avoids problem when looking at multiplayer aircraft because there is
no /ai/models/multiplayer[]/orientation/heading-deg
Nasal/view.nas: improved handling of sim/current-view/{x,y,z}-offset-m. Changed
resetViewPos() to set these all to zero, because view's offsets are now
kept separate. Also removed setting of /sim/current-view/z-offset-m to
chase-distance - this is the wrong place now that views define the offset
explicitly.
Also added Tower View AGL support.
- This will alert if any individual notifcation takes more than a certain amount of time to process.
Works well with the Emesary M_exec to identify where the slow parts of Nasal are.