mfranz
a021ab0af0
- aircraft.nas: remove formation class (Deprecated only three hours ago.
...
Is this fast development, or what?! :-)
- gui.nas: remove debug message
2008-10-15 18:14:54 +00:00
mfranz
181dbba72c
OverlaySelector: more robust path handling
2008-10-15 16:48:24 +00:00
mfranz
c350a7b6a8
s/fixpath/normpath/ (as in python)
2008-10-15 16:35:11 +00:00
mfranz
8c7e7cb994
OverlaySelector: add callback func arg; only store the file paths
2008-10-15 16:13:10 +00:00
mfranz
5d576f0e3d
- gui.OverlaySelector: add optional sort criterion, add selection by index,
...
add next(), and previous() methods.
- aircraft.nas: deprecate formation class
2008-10-15 15:27:56 +00:00
mfranz
6a72126327
OverlaySelector: don't autosave choice. That's easy enough to do "by hand".
2008-10-14 18:48:54 +00:00
mfranz
4341781968
add overlay selector dialog class (similar to the livery selector)
2008-10-14 18:41:19 +00:00
mfranz
782368fefa
documentation update and cosmetics
2008-10-09 17:20:27 +00:00
mfranz
b1017ac425
Vivian MEAZZA: tyresmoke: add spray flag/intensity for wet surfaces
2008-10-08 22:57:50 +00:00
mfranz
996fd73c0c
- let F12 pop up radio settings dialog (used to be Ctrl-r)
...
- disable "reload global preferences", which is semi-broken
2008-10-08 21:59:31 +00:00
mfranz
ce0504cfd4
- move development functions from function keys to :Y (multikey)
...
- move replay from 'r' to 'Ctrl-r' where it is less dangerous
2008-10-07 20:13:34 +00:00
mfranz
3ba03ff2d7
AJ MacLEOD: add braking chute wrapper function
2008-10-07 19:22:49 +00:00
mfranz
363e210fda
- typeset longer option lists in multiple columns
...
- make it a tad faster
2008-10-07 10:44:45 +00:00
mfranz
fe8f9134ec
fun hack to get useful error message
2008-10-06 23:21:54 +00:00
mfranz
d9b5505a39
load_nasal(): hack around new Nasal bug
2008-10-06 21:21:13 +00:00
mfranz
77480233a6
ok, and now really fix it :-P
2008-10-06 20:22:28 +00:00
mfranz
459add7acb
d'oh ... s/setlistener/_setlistener/
2008-10-06 20:12:50 +00:00
mfranz
757b64a2c3
tyresmoke: s/getNode/getChild/
2008-10-05 23:35:02 +00:00
mfranz
c56653d203
tyresmoke: make it faster, cleaner, shorter
2008-10-05 23:16:15 +00:00
vmmeazza
f7339eeb22
Add generic tyre smoke - correctly this time
2008-10-05 22:56:44 +00:00
vmmeazza
16818db739
Add generic tyre smoke
2008-10-05 22:41:39 +00:00
mfranz
eab70dccda
improve dialog layout
2008-10-05 16:13:13 +00:00
mfranz
adc77f2777
replace all %%
2008-10-04 22:43:24 +00:00
mfranz
437dbf524d
aircraft.nas: light: remove backwards compatibility warning
...
multikey.nas: don't show %% in option display for %
string.nas: scanf: add -1 return mode; documentation
2008-10-03 20:46:08 +00:00
mfranz
e6e1f8ae20
- move color functions from debug.nas to string.nas
...
- multikey.nas: add exit/no-exit markers to help output
2008-10-03 15:20:12 +00:00
mfranz
597a7d2187
add teleport() function
2008-10-03 10:48:39 +00:00
mfranz
fbd73ee7d3
multikey.nas: don't show empty ("reserved") entries
...
string.nas: scanf: detect %% correctly
2008-10-03 09:47:40 +00:00
abory
8fcaaf4491
- Alexis Bory: As seen previously with Till, the nasty F-14 radar brakes multiplayer.dialog.show() unless we better test the "valid" node.
2008-10-02 20:12:00 +00:00
mfranz
e561c08c04
- gui.nas: make fuel&payload warning closable with Esc
...
- multikey.nas: minor clarification in the help output
2008-10-02 15:19:47 +00:00
mfranz
a334ed9e7b
add initial slightly greyed out help text about <Tab> options
2008-10-02 11:37:17 +00:00
mfranz
29f7d18865
repair :? help function ... sigh, should never have started with colorizing
2008-10-02 10:43:17 +00:00
mfranz
67c40af00c
use patthern tree, offer options on <TAB>
2008-10-02 00:59:52 +00:00
mfranz
3fbb11b27a
scanf: don't bark on empty test string if format ends with number element
2008-10-02 00:58:57 +00:00
mfranz
5fd89049bb
add field width to %s & coding style
2008-10-01 19:51:44 +00:00
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