- use more "var" keywords and named args
- popupTip(): add optional third hash argument that is merged with the
dialog properies hash. This can be used to select different font or
dialog colors, etc.
a regular function argument for that. Note the "n" in this example:
setlistener("/sim/current-view/view-number", func(n) {
setprop("/sim/hud/visibility", !n.getValue());
}, 1);
- move "fire starter" from SPACE-key to s-key
- move "open property browser" from Shift-SPACE to Shift-Enter (Shift-Return)
- implement PTT on SPACE/Shift-SPACE (with the other six SPACE/modifier
combinations unused, apart from a popup)
- add controls.ptt(v) wrapper function (v can be 1 or 2 for on, and 0 for off)
Easter-Egg:
- pressing the t-key for at least one second resets the warp delta.
This is an experimental feature that most people won't notice. It's meant
for investigating if suchlike "unorthodox" key use is acceptable. While
modifier-keys are the norm on computer keyboards, modifier-times aren't,
although we are used to them from other devices, such as alarm clocks etc.)
May later get removed without warning.
algorithm (needed for the file selector and useful for other purposes, like
assembling lists of livery or screenshot files etc.)
- io.nas: move fixpath to string.nas (it's not only useful for file paths
but can also be used for property paths)
- screen.nas: move trim to string.nas (used by screen.nas and nasal-console.xml)
- gui.nas: add pattern matching to FileSelctor
- ufo.nas: use patterm matching (only *.ac and *.xml files shall be listed)
dialog's <name> entry)
- FileSelctor: new class derived from Dialog. It clones the file-select
dialog and reports chosen files/dirs via callback function.
$FG_ROOT/gui/dialogs/tutorial.xml. It combines the former selection
and description dialogs, which makes browsing much more pleasant.
No more switching back and forth between the two old dialogs. Also,
the <list> box can handle a bigger number of tutorials than the
<combo> box could.
- remove comments from the top of tutorial.nas. The documentation is
now $FG_ROOT/Docs/README.tutorials
- fix sliders: revisions 1.43/1.44 had introduced a mandatory <min-lb>;
if that was missing, a slider without handle was generated, and a click
on the slider lead to a crash.
-> check for both <min-lb> and <max-lb> and set default values
0, respectively 100
var min = w.getNode("min-lb", 1).getValue();
var max = w.getNode("max-lb", 1).getValue();
slider.set("min", min != nil ? min : 0);
slider.set("max", max != nil ? max : 100);
tank indices, so that changing drop tanks automatically modifies the
corresponding FDM tank capacity (and load, if it is too high).
Add the new tank stuff to the harrier config, along with a few new
items (e.g. AMRAAMs on the outboard pylons) that aren't in the 3D
model yet, but correspond to actual usage.
An IRC discussion about shavlir's (really nice) harrier model showed
that it had its own version of something like the Fuel & Weight
dialog, developed because the existing subsystem only supported
sliders and not "combo box" style selection for specific external
stores. That seemed sub-optimal, so I spent a few hours extending the
F&W dialog to do this and forward-ported the harrier to use it.
Check the harrier-set.xml file for an example. Basically, the weight
dialog reads a list of options for each weight listed under
/sim/weight[n] and manages a "selected" proprty telling us which one
is in use. The FDM code can then read out the weight-lb property as
before, and the model animations can use the selected option to
predicate drawing the appropriate 3D content. It seems to work pretty
well.
- always disable tutorial-stop; enable tutorial-start if tutorial available
- don't call the tutorial selector "Wizard 1/2". There is only one tutorial
selector, the next dialog is already part of the tutorial. Also, the dialogs
don't guide you through multi-dialog setup, which is what "wizards" normally
stand for.
- use tutorial name as dialog title
- set button shortcuts (default == return, esc)
- make esc go back to select dialog
- beautify sliders & some other tweaks
functions when used in $FG_ROOT/Nasal/*.nas, because it
depends on props.nas being available; no restrictions in
aircraft files, where it will proof most useful
gui.nas: replace inefficient FPS display polling loop with listener
callback
- gui.nas: use 4-space indents like the rest of the file; waste slightly less
cycles: checking for the property shouldn't be done in a loop at
all, it only serves as a temporary solution
to pop themselves down while the simulator is paused.
The problem was with the "real time" queue in the event manager,
causing the third argument of Nasal's settimer() (a flag for "sim
time") to be ignored. Inverts the default sense of the argument, as
there are lots of uses of settimer() in the current code, almost none
of which want to use real time.
Note this fix introduces a header file incompatibility in SimGear --
be sure to update.
Implement simple help system with global and aircraft specific dialogs:
The gui.nas changes have been discussed with Andy. All ac have a help dialog,
but some are empty. (This wouldn't have been necessary, as the system falls
back to the "Common Aircraft Keys" if an aircraft has no help defined, but an
empty dialog is less confusing and encourages to be filled with interesting
information. :-) I scanned all aircraft files for interesting performance
data and added some to the dialogs (stall speed, etc.) The Concorde and the
p51d have (over?)complete dialogs and can serve as examples. The format is
documented in $FG_ROOT/Nasa/gui.nas.
There is also a couple of other, minor fixes.
The following files have ugly MSDOS line endings:
$FG_ROOT/Aircraft/Hunter/hunter{-2tanks,}-set.xml
$FG_ROOT/Aircraft/A380/A380-set.xml
The Concorde-jsbsim.nas file is a useless copy of the real */nas file, which is
in Nasal/. I'was debugging the Concorde and wondered why changes to this file
had no effect ...
(Fixed Concorde in the help-ac.diff patch: don't use "interpol" keyword as
variable.)
x/y/width/height values went into the calculation for the next popup,
and things got iteratively worse due to padding issues). But the
good news is that this whole subsystem is vastly simpler when
implemented with the new interface.
Move the "tip popup" code from view.nas to a new gui.nas module, and
make it generically useful.
Wire up flap steppings for the 747 as an example of per-aircraft
flaps.
Realtime-based property slewing, to eliminate dependence of trim and
view direction rates on frame rate.