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.
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.
Change fonts; make use of the new feature to allow fonts to be specified using property from dialog xml.
Ensure that all fonts are defined within the style.
This is a new button in the pilot list, left of the callsign. It's
binded to multiplayer.compose_message("<CALLSIGN>, ");
Signed-off-by: Anders Gidenstam <anders@gidenstam.org>
Use new "model-installed" property instead of searching directories
directly - which didn't work with new "--fg-aircraft" dirs.
Also, pilot list now keeps its position. Avoid jumping to top-right
corner when updating.
I suspect that work around for the /ai/models/model-added listener problem
(i.e. that the listener is called in the middle of the process of
adding/removing a MP entry) isn't the right way to solve the problem.
The attached patch instead defer processing of the added/removed
MP entries in the multiplayer Nasal module until the next time the Nasal
subsystem is executed. This should prevent the problematic execution of
the Nasal listener callback in the middle of C++ MP code.
- use find() instead of string.match() (way faster!)
- add a missing var keyword
- don't store old messages in a hash, but only store the respective last
message in the model's multiplayer branch
- keep history \n-trimmed (instead of removing \n only when concatenating)