tat
04d90bae5a
Added: %s support for scanf
2008-10-01 18:36:09 +00:00
mfranz
283dd67ca8
whoops
2008-10-01 16:39:26 +00:00
mfranz
32c5cde2f0
move improved help screen generator multikey.{xml -> nas}
2008-10-01 16:30:25 +00:00
mfranz
772112df89
use color codes only when printing to the terminal
2008-10-01 14:04:47 +00:00
mfranz
613e693656
Be a bit more careful with the kbd hack ... not that I noticed any problems.
...
(Proper fix probaly necessary in OSG. On my TODO list.)
2008-09-30 20:41:06 +00:00
mfranz
886cf8b382
also let adjEngControl return value (average of selected engines)
2008-09-30 20:33:18 +00:00
mfranz
b1a3428bd8
make slewProp(), and with it {aileron,elevator,rudder}Trim return new value
2008-09-30 18:11:46 +00:00
mfranz
f5babfe796
s/desc/_/ & cosmetics
2008-09-29 22:39:45 +00:00
mfranz
12412f0a56
does no longer work after the nasal update
2008-09-29 16:37:23 +00:00
mfranz
7274bfe94a
s/desc/_/ (binding return variable)
2008-09-29 14:16:50 +00:00
mfranz
1b9f9a2f98
hack around kbd bug for now (eew!)
2008-09-29 13:30:42 +00:00
mfranz
024842d9b9
indendation fix, drop a few braces (because we can :-)
2008-09-29 10:06:50 +00:00
mfranz
df90d69de9
string.scanf(): return elements in vector given as argument; function
...
only returns success (0: no match, 1: extensible match, 2: safe match)
2008-09-29 10:06:16 +00:00
mfranz
eb11977be2
implementation of vi-like multiple-key commands (as suggested by John DENKER)
2008-09-28 20:28:28 +00:00
mfranz
3197bc3f24
string.scanf(): more efficient and (more :) correct %f detection
2008-09-28 20:23:14 +00:00
mfranz
13a5e62995
scanf: '+' or '-' alone aren't really numbers
2008-09-28 16:20:49 +00:00
mfranz
2ea8466111
steering: vim typo
2008-09-26 22:53:57 +00:00
mfranz
d5605e2280
steering: fix after nasal update
2008-09-26 22:48:48 +00:00
mfranz
3f4df41fc7
add simple scanf function (a.k.a. poor man's regex)
2008-09-26 12:04:57 +00:00
mfranz
bb6b98b306
runBinding: support optional default namespace/module
2008-09-25 11:10:35 +00:00
mfranz
ba68b4f8eb
typo & consistency
2008-09-24 23:06:43 +00:00
mfranz
366792cf3d
add props.runBinding(<binding-node>) command
2008-09-24 20:03:06 +00:00
mfranz
e354f26a4d
add braces to work with Nasal TNG
2008-09-24 19:38:56 +00:00
mfranz
91ab7d4b97
- remove no longer neede complement_runways() function
...
- s/threshold1/threshold/
2008-09-23 20:08:15 +00:00
mfranz
c047efb41f
debug.proptrace: increase the default frame number to get one complete frame
2008-08-17 07:35:27 +00:00
mfranz
a289958717
improve help message
2008-08-16 15:37:54 +00:00
mfranz
917cace77c
string.nas: remove forgotten debug message
...
props.nas: replace some "arg[*]" by named args
aircraft.nas: load aircraft data only if the file exists (to avoid warning)
debug.nas: no space before colon & fixed comment & cosmetics
2008-08-14 22:13:25 +00:00
mfranz
4ac84809e9
nasal: cleanup & minor fixes
...
- fuel.nas: use props.initNode()
- debug.nas: fix comment
- globals.nas: load_nasal(): check extension and set module arg
- io.nas: update log message (the rules are no longer for io.open() only)
2008-08-10 17:53:41 +00:00
mfranz
51aae20072
screen.nas: evaluate --prop:display when fdm is up, or some props are missed
...
(you didn't take the "final version" seriously, anyway, did you?)
2008-08-05 12:35:01 +00:00
mfranz
f0463b345f
screen.nas: display option (final version)
...
- use --prop:display=fdm/jsbsim/fcs to display this node only
- use --prop:display=fdm/jsbsim/fcs/ to display this node's children
2008-08-05 12:20:27 +00:00
mfranz
2823009955
s/live/display/ ... makes more sense
2008-08-05 11:58:43 +00:00
mfranz
1f65d80475
allow to add properties to the live display with --prop:live=/some/property
2008-08-05 11:49:13 +00:00
mfranz
b360c2ad62
use <enabled>false</enabled> flag for widgets that shouldn't be drawn
...
instead of <hide>true</hide>. This is consistent with other places
in fgfs, like menu entries, hud elements, subsystem switches, etc.
2008-08-05 05:28:27 +00:00
mfranz
2040b96b4f
s/show_widgets/enable_widgets/ (the function doesn't show anything)
2008-08-03 15:37:43 +00:00
mfranz
463105bca5
add show_widgets() function
2008-08-03 13:41:07 +00:00
mfranz
49defb639e
- load_nasal(): catch usage of improper namespaces (e.g. $FG_HOME/Nasal/isa.nas)
...
- IOrules: add harmless rule for extremely popular Nasal addon script :-)
2008-07-30 20:34:52 +00:00
mfranz
443c261cdd
- drop redundant log message
...
- cosmetics: fix mixed tab/space indentation, drop pair of curly braces
2008-07-30 19:33:42 +00:00
mfranz
8202730c4e
use io.load_nasal() to load the local Nasal files from ~/.fgfs/Nasal/
2008-07-30 19:25:27 +00:00
mfranz
ad781922a7
here's a case where we want explicit namespace prefixes everywhere
...
(just renaming debug.string instead was plan B ;-)
2008-07-30 19:22:36 +00:00
mfranz
78ba60685c
some convenience functions for the built-in bits library
2008-07-29 17:17:09 +00:00
mfranz
00475e2d5c
- set "archive" flags on all /sim/presets/ children on saving flight, and
...
- run "presets-commit" after loading
2008-07-29 00:07:18 +00:00
mfranz
ae40faf4e5
cosmetics (comment fixes & improvements, variable name)
2008-07-27 22:00:58 +00:00
mfranz
dec94a9bb4
- fully complement runways (for external callers)
...
- show id/name of new airport
- use props.initNode()
- cleanup
2008-07-27 21:59:13 +00:00
mfranz
daee426f00
minor reorganization and cosmetics
2008-07-24 17:41:40 +00:00
mfranz
9148a4b2eb
cosmetics: white space fix & one "var" added
2008-07-23 19:37:51 +00:00
mfranz
de1aa4c56e
finally make printf() globally available
2008-07-23 15:43:45 +00:00
mfranz
93bc59c9a3
update comment
2008-07-23 15:42:43 +00:00
mfranz
f046c00c3d
make valdiation listeners safe
2008-07-23 15:42:16 +00:00
mfranz
fee6139da5
partly revert last change: thisfunc() isn't safe enough for this purpose
2008-07-23 00:41:18 +00:00
mfranz
7bbbfa6a8e
use thisfunc() instead of caller(0)[1]
2008-07-22 23:26:46 +00:00
mfranz
54e6ec55b4
closure(): better error formatting
2008-07-22 22:50:42 +00:00
mfranz
e522611638
closure(): level is optional and defaults to 0
2008-07-22 22:38:34 +00:00
mfranz
1ad5b18ec8
closure(): must freeze io.open for the comparison
2008-07-22 22:26:09 +00:00
mfranz
dc4b8633a3
new io.open()'s closure musn't get manipulated either
2008-07-22 21:30:47 +00:00
mfranz
3cfc93927f
make sure the closure of security code can't be manipulated by wrapping
...
closure()
2008-07-22 21:23:54 +00:00
mfranz
8b6ff24167
make sure functions used by the security code are tamper-proof
2008-07-22 21:22:59 +00:00
mfranz
b9e7bb1b4b
add thisfunc() for reliable recursion
2008-07-22 19:03:25 +00:00
mfranz
cb3150b915
(failing attempt to) lock down two functions
2008-07-22 16:46:18 +00:00
mfranz
30cd488f90
data.load(): use io.read_properties() (fixes *.sav loading bug)
2008-07-11 22:50:58 +00:00
mfranz
abdc416f32
- remove "load flight"/"save flight" dialogs, and
...
- use a file selector instead
- file-select.xml: handle non-existing files correctly
2008-07-11 20:57:52 +00:00
mfranz
c604b92deb
now that the file reading/writing fgcommands underlie the same mechanism
...
as Nasal's io.open(), we need to allow saving/loading flights and saving
aircraft specific data at exit
2008-07-11 16:38:51 +00:00
mfranz
32f1730c6e
- load_nasal: better error message if compile() fails
...
- io.open handler: extract validation to separate function and
- add detached read/write validation listeners
2008-07-11 15:37:27 +00:00
mfranz
86475efa5e
fixpath: handle empty strings
2008-07-11 15:23:23 +00:00
mfranz
3be5c6956b
io: use default attribs rather than a hard-coded number for globals identification
...
gui/tutorial/aircraft: use io.read_properties()/io.write_properties()
2008-07-11 09:37:33 +00:00
mfranz
ee44cdf0db
Anders GIDENSTAM: enable fuel&payload dialog for JSBSim
...
mf: minor modifications & adding several instances of "var"
2008-07-10 20:13:58 +00:00
mfranz
9be716de1c
typo
2008-07-10 16:55:45 +00:00
mfranz
8909695f36
add io.{read,write}_properties() convenience wrappers for
...
fgcommand("loadxml") and fgcommand("savexml")
2008-07-10 16:53:43 +00:00
mfranz
951f31a56c
change attribute names from read/write to readable/writable
2008-07-07 10:25:08 +00:00
mfranz
b8ba3c5f66
cosmetics (no braces for one-liner functions; looks nicer, IMHO)
2008-07-03 16:24:52 +00:00
mfranz
6e24e077ba
- invert io.load_nasal() return value
...
- let load_rules() return nil or the path (rather than 0 or 1)
- better log output
- cosmetics
2008-07-03 16:23:13 +00:00
mfranz
6f9f70e84d
- don't use undefined variable `curr'
...
- cosmetics
2008-06-22 18:00:02 +00:00
mfranz
caca942012
revert last change: don't append cwd to relative paths for now. There's
...
no way yet to safely detect absolute paths, so this would break on MS Windows.
This will only mean that relative paths will always fail, as they don't
match any pattern. These are all absolute.
2008-06-22 13:54:36 +00:00
mfranz
875b99c90e
whoops, wrong quotes
2008-06-22 12:17:02 +00:00
mfranz
cf9f30cb11
fixpath(): simplify by using new join() and replace() functions
2008-06-22 11:33:13 +00:00
mfranz
5240b57018
io.open(): turn relative paths into absolute ones before checking
2008-06-22 11:31:41 +00:00
mfranz
d86b1b9c74
string.nas: new functions string.join() and string.replace()
...
debug.nas: let benchmark() repeat tested function
io.nas: cosmetics
aircraft.nas: initialize time property only once
2008-06-21 07:10:32 +00:00
mfranz
ab08bfb8eb
make sure that a die() (e.g. caused by an IOrules file being read protected)
...
doesn't disable the whole security mechanism
2008-06-16 11:19:29 +00:00
mfranz
94e010e4d1
whoops ... s/and/or/
2008-06-16 11:00:05 +00:00
mfranz
bf9c2dc6a5
read rules for io.open() file access from $FG_ROOT/Nasal/IOrules or, if
...
available, from $FG_HOME/Nasal/IOrules. That's desirable because
ordinary users aren't allowed to edit files in $FG_ROOT.
2008-06-16 10:47:02 +00:00
mfranz
7cc783c2f5
this comes from not using tabs ... sigh
2008-06-16 07:16:10 +00:00
mfranz
b5cdfeb2b8
... and allow reading only from ~/.fgfs/* and $FG_ROOT/*
2008-06-16 07:07:50 +00:00
mfranz
df018fff49
only allow writing to ~/.fgfs/Scenery/*.stg and ~/.fgfs/Export/*
2008-06-16 06:32:32 +00:00
mfranz
141f1c8da4
must not use setlistener in $FG_ROOT/Nasal/*.nas ...
2008-06-15 10:11:32 +00:00
mfranz
0fad328217
load_nasal: boolify result, as the number doesn't mean anything and might
...
be confusing
2008-06-14 22:39:28 +00:00
mfranz
56eef9c69f
move load_nasal to io module
2008-06-14 14:32:37 +00:00
mfranz
62cc0f457c
load_nasal: fix module and let it return whether there was an error
2008-06-14 14:25:34 +00:00
mfranz
a79c0e95c5
move load_nasal() here from the debug module
2008-06-14 14:22:34 +00:00
mfranz
c159ea1755
io.open(): drop die() color
2008-06-13 19:19:54 +00:00
mfranz
4a30ad6efe
io.open(): remove debug messages (for easier code review)
2008-06-13 19:14:48 +00:00
mfranz
59e3d65545
and die() with red color for now
2008-06-13 13:18:16 +00:00
mfranz
0216b1a65c
improve log messages
2008-06-13 13:08:56 +00:00
mfranz
4d17687f12
move fixpath back to string.nas. It *is* about strings, after all, and also
...
usable for property paths, so io.nas doesn't seem the right place.
2008-06-13 13:01:38 +00:00
mfranz
496a76b9fa
and "br" as well :-)
2008-06-13 12:11:42 +00:00
mfranz
06aa2b772c
open: allow "rb" everywhere like "r"
2008-06-13 12:09:45 +00:00
mfranz
2b3f574063
don't need /var/log/
2008-06-13 11:57:20 +00:00
mfranz
7d9bd68742
- move fixpath() from "string" to "io" module
...
- first stab at Nasal security model: allow writing files only to authorized
dirs. (Most of the debug messages will be removed later.)
2008-06-13 11:35:55 +00:00
mfranz
11d7de3e85
enable the Multiplayer menu if any of txport and rxport is set
2008-06-11 20:05:46 +00:00
mfranz
55670ccb35
enable multiplayer menu only in MP mode
2008-06-11 18:46:54 +00:00
mfranz
761444b917
close dialog on Esc, like every other dialog with a close button
2008-06-11 18:39:03 +00:00
mfranz
c1581e2ea1
Till BUSCH: multiplayer dialog (open with multiplayer.dialog.open() or toggle())
2008-06-11 18:23:03 +00:00
mfranz
2866043c3d
- prop_key_handler: limitate history to history-max-size on loading
...
- string/debug: cosmetics
2008-06-08 11:14:57 +00:00
mfranz
238fce1d15
let initNode() initialize a property to double(0) by default
2008-06-04 20:41:44 +00:00
mfranz
246ce973ec
save and reload up to 20 history entries
2008-05-19 17:31:57 +00:00
mfranz
8fe1cf807d
add initNode() function that initializes (if necessary) and returns a property.
...
If the property has a valid value already, then the given value is ignored.
var x = props.initNode("/foo", 10);
var y = props.initNode("/bar", 1, "BOOL");
2008-05-19 15:44:23 +00:00
mfranz
67ba396942
display: redraw on window resize so that the display won't disappear
2008-05-19 09:48:41 +00:00
mfranz
3184ea67a3
- add screen.display documentation
...
- add screen.display.setfont() and .toggle() method
- make property labels optional
2008-05-16 16:26:15 +00:00
mfranz
5334016034
display: format number, true/false for bools, quotes for strings
2008-05-15 20:31:35 +00:00
mfranz
f54cb1159f
prop_disp: change color to white ... again. (Sorry for the many small commits. :-)
2008-05-15 16:11:50 +00:00
mfranz
54f8fc4370
property_display: turn it into a regular class & lots of improvements
2008-05-15 15:42:31 +00:00
mfranz
0b4322736f
- make debug.dump() accept more than one argument (one could already write
...
debug.dump([a, b]) for that, but debug.dump(a, b) is more obvious)
- change output colors: variable names are no longer bold, all property
attributes are now blue, not just the property type)
- drop redundant braces & other cosmetics
2008-05-15 15:23:17 +00:00
mfranz
b6d987453f
data.add(): use props.nodeList() function
2008-05-15 15:20:11 +00:00
mfranz
a329a7ba14
- add props.nodeList() function which turns property ghosts, props.Nodes,
...
and path strings into a list of props.Nodes. It also digests lists of
properties, or lists of lists of properties etc., thus allowing things
like props.nodeList(arg), props.nodeList(n.getChildren("foo")). This is
meant for functions like aircraft.data.add() or screen.display.add().
- remove some redundant braces
- fix comment
2008-05-15 15:17:56 +00:00
mfranz
e5c027786d
property_display:
...
- don't use screen.window, but let it do its own dialog handling. Thereby
- make it faster (update every frame by default)
- prevent collisions with the menu
- allow to move the dialog away (only the left edge is draggable!)
- try color white (better color suggestions welcome :-)
2008-05-14 20:06:50 +00:00
mfranz
356a8430a7
property display: make sure tags are as short as possible but unique
2008-05-14 15:40:00 +00:00
mfranz
af38cc7c63
property display:
...
- make interval and color configurable
- use bigger font
- display strings containing \n in one line
2008-05-14 12:04:54 +00:00
mfranz
ee8b517246
property display: don't choke on nil properties
2008-05-14 10:57:02 +00:00
mfranz
ba57bd9a2e
property display: set HELVETICA_12 font (same as for fps display)
2008-05-14 10:36:37 +00:00
mfranz
02c4b7a613
- screen.nas: add live property display
...
- prop_key_handler.nas add support for live property display
2008-05-14 10:23:47 +00:00
mfranz
b055de3528
add setCursor() wrapper function for the "set-cursor" fgcommand
2008-05-08 10:15:18 +00:00
mfranz
7c5bd888ac
negative key numbers mark events consumed now
2008-05-03 21:29:38 +00:00
stuart
7513200f8e
Add additional message check so callsign is not prefixed if present in message itself.
2008-05-03 19:45:22 +00:00
stuart
acef95d90c
Re-order initialization and fix a couple of bugs.
2008-04-29 19:58:10 +00:00
mfranz
757c2314dd
don't try to build completion from invalid node
2008-04-26 23:29:52 +00:00
mfranz
1544af3ab9
return negative key numbers to report key event as consumed
2008-04-26 13:27:27 +00:00
stuart
b703e21db9
Initialize on /sim/signals/fdm-initialized instead of /sim/signals/nasal-dir-initialized. This happens later on, and ensure we have a valid /sim/time/delta-sec value for the filters.
2008-04-23 22:09:34 +00:00
mfranz
c78327ee21
- lowpass: work with delta-sec = nil
...
- cosmetics
2008-04-23 22:01:44 +00:00
stuart
01d21c928a
Add generic redout.
2008-04-23 20:44:57 +00:00
mfranz
efaeff5180
- make the limiter a tad faster
...
- fix comment
2008-04-21 21:39:45 +00:00
mfranz
ff6c9ec672
view_limiter: fix wrong starting offset
2008-04-15 16:55:40 +00:00
mfranz
c97010cefd
make panViewDir use new limiter params & some parameter tweaks
2008-04-15 13:29:23 +00:00
mfranz
7fbeb50695
view_limiter:
...
- new parameter naming (left/right instead of min/max; signs are ignored)
- fix wrap-around skips
- use regular constructor so as not to confuse people ;-)
2008-04-15 13:02:18 +00:00
mfranz
c4ebd9a0f2
- use separate view-limiter handler instances per view
...
- cleanup
2008-04-15 07:04:52 +00:00
mfranz
656340fa3d
davidB21 + Vivian MEAZZA + /me: pilot view limiter
...
If a <view> contains a <limits> block, then a view handler gets attached to
it, which limits head turns to a given range, whereby headings beyond a given
threshold cause an additional sideways movement. This is turned off by default
for now.
2008-04-14 10:00:27 +00:00
mfranz
3e9a108288
make view.index (value of "/sim/current-view/view-number") and view.current
...
(a props.Node hash of the current view, e.g. /sim/view[100]/) available
2008-04-12 20:25:21 +00:00
sydadams
c7b3412af0
Added a check for passive mode to allow keyboard controls ..
2008-04-01 05:56:38 +00:00
mfranz
6d3676639b
revert bad livery.current initialization
2008-03-01 12:01:23 +00:00
mfranz
4db470acd4
move MP livery update parts from the livery class into a separate
...
livery_update class and add an optional third argument to its constructor:
a callback function that's called whenever the class noticed a livery
change
2008-03-01 09:49:57 +00:00
mfranz
e9e234410d
initialize livery.current at livery.init()
2008-02-29 21:28:34 +00:00
mfranz
713685f275
add aircraft.livery methods for updating the livery in MP loaded aircraft
2008-02-29 17:17:40 +00:00
mfranz
217cbcae34
add mod-up action to magneto keys, and ignore that in the controls wrapper;
...
This allows to implement car-like combined magneto/starter switches.
2008-02-23 18:18:55 +00:00
stuart
dc4ad0dc80
Update to generic blackout, incorporating feedback from Melchior FRANZ:
...
- Update redout level every frame
- Replace reading of properties every iteration with listeners
- move -onset and -complete properties into a parameters subtree
2008-02-16 20:23:27 +00:00
stuart
dd923792ec
Add generic blackout/redout for all aircraft, along with a gui.
...
Based on previous work by vivian and myself.
2008-02-16 08:26:59 +00:00
vmmeazza
0e0b9b4b06
Add a new class which enables formations to be changed during runtime. A modification of the Livery Class
2008-02-15 14:09:37 +00:00
mfranz
80ed641d69
avoid unnecessary call()
2008-02-13 20:12:42 +00:00
andy
4ae206fc00
Turns out some code likes to call isa() with non-objects. Might as
...
well have it return false (which is valid) instead of throwing an
exception (also valid, but more surprising).
2008-02-07 21:23:42 +00:00
andy
bedac8ec83
Fix isa() when used on classes with superclasses.
2008-02-07 18:03:03 +00:00
mfranz
b94a02a4f5
disable ground steering head turn (until there's a better implementation?).
...
This does often work badly, especially in seaplanes.
2008-02-07 15:07:09 +00:00
mfranz
46f66693e2
- make timer.stop() return "me"
...
- make door.move() only spawn an interpolate event if the target value
differs from the current pos (fixes brake problem in the dhc6)
2008-02-05 12:39:56 +00:00
mfranz
30f3dff563
make axis wrappers a tad faster (and a whole lot cooler :-)
2008-01-30 21:52:29 +00:00
mfranz
c35f3207d3
preferences.xml: drop /sim/input/selected/engine settings (these properties
...
are set in controls.nas since ages)
controls.nas: avoid repeated querying of /sim/input/selected/engine[*]
properties; this isn't supposed to change at runtime and is a rather
costly process, especially in axis handlers
2008-01-30 16:48:04 +00:00
mfranz
5776d1cc87
make mixture/propeller/carbHear only work for selected engine (like throttle)
2008-01-29 23:45:31 +00:00
mfranz
cce72f08a9
don't save view-enabled state of nameless views to aircraft config file
...
(the view may have been removed from the *-set.xml file)
2008-01-18 14:16:38 +00:00
mfranz
7c9566860d
Stewart ANDREASON: fix broken index calculation in livery.set()
2007-12-17 21:49:52 +00:00
mfranz
c96fd4b089
- make stepView() read the <enabled> flag as bool
...
- some more 'var', as usual
2007-12-13 20:16:20 +00:00
mfranz
e37bd9d12f
add new key defs
2007-12-09 22:58:51 +00:00
vmmeazza
4ee3367452
Stuart Buchanan:
...
Add chat menu
2007-12-08 19:01:03 +00:00
mfranz
cf0f21dec3
... and turning them on again should actually make the frames visible.
2007-12-07 12:23:46 +00:00
mfranz
c83a76d585
disable top bar only if /sim/model/geometry/square/top is unset. Put this
...
into your ~/.fgfsrc if you want complete squares (yes, 0 is on :-).
--prop:sim/model/geometry/square/top=0
2007-12-07 11:49:55 +00:00
mfranz
77dcb9dc34
glide slope tunnel visualization script
2007-12-01 19:10:12 +00:00
mfranz
62b3343fef
Markus ZOJER: add wingSweep() wrapper
...
mf: add var keyword, use named args, ...
2007-11-29 13:16:13 +00:00
mfranz
0183e43b38
allow to open several property browsers with one command line argument
...
(comma separated paths):
--prop:browser=position,orientation,sim/model
2007-11-28 22:22:29 +00:00
mfranz
8e1364713f
reorder instructions in start(); rename some variables
2007-11-27 16:28:52 +00:00
mfranz
125d9d7f19
don't remove double entries in the whole history, but only push unique ones
2007-11-27 01:40:23 +00:00
mfranz
4faba765b0
remove obsolete code
2007-11-26 16:42:43 +00:00
mfranz
7592b8243a
remove leftover debug statement
2007-11-26 16:14:44 +00:00
mfranz
73c0285ef9
- remove property browser binding from the <SPACE> key
...
- rename prop-key-handler.nas to prop_key_handler.nas (the hyphens were
intentional, exactly to *make* using it as namespace less inviting,
but times change ...)
- add property browser binding to the '/'-key for when the property key handler
is turned off (/sim/input/property-key-handler=0). If it's on, use /: or
/<property>: to open the browser.
- run keyboard event listener only when property key handler is active
I hope that the '/' key can keep this binding even after a keyboard review.
The '/' is just the most natural key for dealing with properties, and it's
far less prominent on non-US-keyboards (e.g. Shift-7 on German keyboards),
so it's not really very well suited for important aircraft functions, anyway.
But I don't insist. :-)
2007-11-26 16:12:37 +00:00
mfranz
4b5550520b
character class fixes (isfoo())
2007-11-26 09:50:18 +00:00
mfranz
a53e636268
debug.nas: _dump_string(): escape some characters
...
prop-key-handler.nas: minor cleanup
2007-11-25 20:36:57 +00:00
mfranz
ecf469e295
prop-key-handler.nas: check for nil property
...
tutorial.nas, globals.nas, controls.nas: cosmetics
2007-11-20 17:02:13 +00:00
mfranz
73bbdd280d
treat "Cockpit View" like other views; limit view.stepView() step to 1 and -1
2007-11-20 11:34:54 +00:00
mfranz
eccdedf12c
- ensure correct order of initialization
...
- only save aircraft view properties that are defined
- unset "userarchive" flags, just in case
2007-11-19 20:20:55 +00:00
mfranz
73aeb8d772
OK, and now it Really Works.
...
(Yes, that's one way to get a better place in the number-of-commits ranking. ;-)
2007-11-19 18:55:24 +00:00
mfranz
87e746a755
sheesh ... another little bug to fix: fixate path for settimer closure
2007-11-19 18:30:55 +00:00
mfranz
59e51fa533
refresh "enabled" state of aircraft views (or they'd last only until the next run)
2007-11-19 18:07:30 +00:00
mfranz
b8b665d347
work correctly if the stepView() step is >1 or <-1 (though such steps
...
don't really make much sense)
2007-11-19 17:08:47 +00:00
mfranz
10c875f75e
make system and aircraft views configurable in Menu->Views->View Options.
...
These are then skipped with view.stepView(n), unless the second, optional
argument is set to 1: view.stepView(n, 1);
Whether a view is enabled or not, is saved in $FG_ROOT/.fgfs/autosave.xml
(system views) or $FG_ROOT/.fgfs/aircraft-data/<aircraft>.xml
2007-11-19 16:26:15 +00:00
mfranz
d6be4c8303
make sure aircraft don't use reserved view indices (0..99)
...
I tried it the nice way, but it didn't work. Why is it important to
reserve indices for fgfs? Because someone has otherwise to go through
all aircraft in CVS and move aircraft specific views out of the way,
every time a system view gets added. Been there, done that.
2007-11-19 14:22:55 +00:00
mfranz
96c76c4fe0
display hash keys that are numbers as numbers; import string.nas functions
2007-11-19 13:31:18 +00:00
mfranz
31807d6538
dump funny hash keys correctly, as string with escaped non-printables
2007-11-19 12:36:26 +00:00
mfranz
4ed4939b8e
describe <Shift-TAB> and <Shift-Backspace> keys as well :-)
2007-11-18 13:30:30 +00:00
mfranz
0bca5bdea6
- add Debug->Development Extensions dialog with two checkboxes to
...
- allow turning on/off extra widgets for developers (HUD dialog: colors,
rendering dialog: visualization of shadow edges), and to turn on/off new
- property key handler ('/'-key)
Both features are off by default, and their state is saved to autosave.xml.
2007-11-18 12:20:17 +00:00
mfranz
9dfa8830a7
more isfoo() functions (yes, I intend to use them :-)
2007-11-16 17:16:42 +00:00
mfranz
d85ba7575c
make debug.attributes() verbose by default. This adds the refcounter to
...
the property attribute string, as in:
(NONE, L1, #8345 )
... for a node of type "NONE", with one listener attached, and 8345 instances
of the shared pointer around.
2007-11-15 21:27:42 +00:00
mfranz
3a83fb99d5
- "export" the attributes function for return a property node's attributes
...
as string (s/_attrib/attributes)
- bind() the code in load_nasal() correctly
2007-11-15 06:46:14 +00:00
mfranz
14a5f38be2
make gui.property_browser() not only digest property paths, but
...
also props.Node class hashes
2007-11-14 20:13:35 +00:00
david
45363925fc
Add function to toggle lighting.
2007-11-10 01:29:31 +00:00
mfranz
5481c73b20
- fix bug that made gui.popupTip() ignore the optional delay argument
...
- 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.
2007-11-09 13:00:05 +00:00
mfranz
2ba2925cd0
add view manager which manages view handlers. fly-by-view is now implemented
...
as such a view handler. Views that don't use one aren't affected -- the view
manager doesn't run when they are active.
2007-11-06 21:49:33 +00:00
mfranz
b3ab26db07
fix comment & cosmetics
2007-11-06 21:23:53 +00:00
mfranz
9b7eafd658
use sim time delta for the lowpass, not realtime delta
2007-11-06 21:22:06 +00:00
mfranz
99bcbe8ea5
change global dynamic-view flag from /sim/view[0]/dynamic/enabled to
...
/sim/current-view/dynamic-view. There are additionally <dynamic-view>
settings per view, but those only enable it for that view if it's
globally turned on.
2007-11-03 14:08:39 +00:00
mfranz
eb5b350ec9
we need more colors!
2007-10-16 18:54:25 +00:00
mfranz
be3025b40f
bah ... always shortly after presenting a new feature on the list, I change
...
it and the description doesn't match any more. :-}
Number of frames makes more sense than seconds (default = 1):
debug.proptrace([<property> [, <number_of_frames>]]);
2007-10-16 17:23:25 +00:00
mfranz
fc6f357a0e
add new debugging function proptrace(), which outputs all regular property
...
writes (not directly written tied ones), all node additions and removal.
Frames are separated with a line. Turn off ANSI coloring if you want to
pipe the results into a file: --prop:sim/startup/terminal-ansi-colors=0
2007-10-16 15:24:30 +00:00
mfranz
c6790fd328
don't set stopTutorial listener before we can be sure that markerN is set
2007-10-15 21:55:23 +00:00
mfranz
256b1880cb
wrapNode(): One argument ought to be enough for anybody.
2007-10-15 18:32:20 +00:00
mfranz
2bcddab9b6
setlistener(): accessing the node via cmdarg() is now depreciated. Use
...
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);
2007-10-15 18:27:42 +00:00
mfranz
12c11dfa6f
setlistener(): now that we know the params, we only need to unwrap the first two
2007-10-15 18:00:17 +00:00
mfranz
0d3c7cec6f
- setlistener(): add wrapper function to turn ghost arguments into props.Nodes
...
- "modernization": use more named function arguments and "var" keywords
2007-10-15 16:30:37 +00:00
mfranz
cdc2b360d7
launchbar message: adapt for new setlistener() syntax; fourth argument set
...
to zero, so that the listener is only triggered when the launchbar state
has change. (YASim writes it in every frame. Sigh.)
2007-10-14 18:04:53 +00:00