1
0
Fork 0
Commit graph

786 commits

Author SHA1 Message Date
mfranz
158c7ea800 - check for availability of MP models (add 'available' member)
- display "??? foo" if "foo" isn't available on the system
- make sure x/y/z are never nil (I think I had such a case)
2009-02-03 16:15:37 +00:00
mfranz
7985e6e984 model_view: add some orientation parameters 2009-02-01 21:59:41 +00:00
mfranz
afe8de52ab - faster sorting
- update loop fix
2009-02-01 01:58:15 +00:00
mfranz
a644007c67 disabling the dialog in screenshots is nice in theory, but doesn't really work 2009-01-31 22:01:42 +00:00
mfranz
9fdec57110 dialog: don't start multiple loops 2009-01-31 21:53:54 +00:00
mfranz
ab1e00a81e - re-open after gui-reinit
- only update once per sec
- cosmetics
2009-01-31 21:22:18 +00:00
mfranz
3cf6667328 gahh ... s/setlistener/_setlistener/ 2009-01-31 20:29:20 +00:00
mfranz
8bb50c1871 model_view_handler: use multiplayer.model + add selection popup 2009-01-31 19:30:31 +00:00
mfranz
65e4b71406 factor the MP aircraft monitoring code out of the dialog class and let
the dialog use it. Other services need the same functionality and it
should only be done once.
2009-01-31 17:15:48 +00:00
mfranz
82d4864c24 model_view: remove stale/invalid entries 2009-01-31 10:24:08 +00:00
mfranz
9927e31504 - use "var" keywords everywhere
- bail out if there's no autopilot at all
2009-01-30 21:24:59 +00:00
mfranz
e31acedcfa model_view: make it more reliable 2009-01-30 15:22:17 +00:00
mfranz
db1fcf2949 model_view: remove experimental mouse handling; cleanup 2009-01-30 12:05:29 +00:00
mfranz
cf69b0d01b model_view: ignore AI models for now (make that configurable?) 2009-01-30 00:16:14 +00:00
mfranz
6aa74d2e7a add model-view: switch through all AI/MP models via dialog in bottom/left corner 2009-01-29 23:57:57 +00:00
mfranz
c697394b1c strip \n from own chat messages (again :-) 2009-01-27 20:12:19 +00:00
mfranz
9957c0a6e1 add eXtended isstring: isxstring(), which also applies to \n 2009-01-27 19:27:21 +00:00
mfranz
fedd64d89a optimization & cleanup & var keyword:
- 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)
2009-01-27 16:55:46 +00:00
mfranz
14a928f391 trim: allow to specify alternative trim class function 2009-01-27 01:42:46 +00:00
mfranz
9d4d61e2e8 don't close the dialog on Esc (Jester was right: that's annoying :-) 2009-01-25 15:18:51 +00:00
mfranz
2541ad8e30 All elements of a --prop:display expression containing a percent sign are
interpreted as number format. (They couldn't be valid property paths anyway.)
If there's more than one such element, then the last one counts.

  --prop:display=%.2g,velocities/airspeed-kt,position/altitude-ft
2009-01-25 00:27:12 +00:00
mfranz
8d62bc2b0f Anders GIDENSTAM: center dialog and print report only when there was a fire 2009-01-18 16:15:02 +00:00
mfranz
1fe5ace8b5 Anders GIDENSTAM: wildfire (read $FG_ROOT/Models/Effects/Wildfire/README) 2009-01-18 15:43:08 +00:00
mfranz
e8484502da s/set_lonlat/set_latlon/ 2009-01-15 00:39:51 +00:00
mfranz
64a22469ab s/hdg/brg/ 2009-01-12 21:50:43 +00:00
mfranz
c31ab0ea96 showHelpDialog(): leave some margin for resizing 2009-01-12 12:27:41 +00:00
mfranz
1fc7581f77 add symbols for new cursors 2009-01-11 15:04:55 +00:00
mfranz
e96322b351 OverlaySelector: don't choke if there are no options 2009-01-11 02:42:33 +00:00
mfranz
198d1cb60f make dialog resizable with Ctrl-dragging 2009-01-10 22:31:30 +00:00
curt
278b0a7262 This should never really have been in the central nasal area. 2009-01-03 01:23:47 +00:00
mfranz
aff4cacf70 ... and allow to specify several paths separated with comma. Of course,
multiple usage of --prop:display[*]=... is also supported.
2008-12-23 10:15:12 +00:00
mfranz
087494abf5 add some documentation about the property display 2008-12-23 10:03:26 +00:00
mfranz
bab238d58b string(): make zero padding work if arg is 0 2008-12-22 01:50:48 +00:00
mfranz
58897fb5f4 revert init signal change -- better fix the real problem 2008-12-19 20:52:22 +00:00
mfranz
305cac01f3 use a more reliable property to detect real-weather-fetch 2008-12-19 13:50:44 +00:00
mfranz
8fc95fdde1 - add geo.viewer_position()
- make geo.{aircraft,click}_position() a bit faster
- no longer import the math functions (wasn't worth it)
2008-12-19 13:41:25 +00:00
mfranz
2d37f6c60b - remove menu greying out (there's no such entry any more)
- start dynamic view at fdm-initialized to avoid nasal errors (math.cos)
2008-12-18 13:05:56 +00:00
mfranz
5df46f3e5c - add controls.wingsDown() wrapper
- carrier-bindings.xml: remove trailing spaces & add some blanks
2008-12-17 18:42:41 +00:00
mfranz
06cb820759 add KT2MPS/MPS2KT conversion constants 2008-12-17 01:03:32 +00:00
mfranz
821c3bd31c rain: read some properties only if they are actually needed 2008-12-15 16:16:08 +00:00
mfranz
cb76be5383 rain: add units to the output properties and explain them 2008-12-15 08:01:33 +00:00
mfranz
d8131d6944 only turn osg precipitation off for internal views 2008-12-15 00:18:26 +00:00
mfranz
e8a666c8e4 globals: cosmetics
props: initNode(): allow nil as first arg
2008-12-14 23:45:33 +00:00
mfranz
2abb0516b5 Vivian MEAZZA: support for handling rain flow on canopies
/me: some modifications + cosmetics in the light class
2008-12-14 23:43:46 +00:00
mfranz
2be64792e1 add NM2M and M2NM constants 2008-12-13 12:55:47 +00:00
mfranz
117dac8b4f removelistener() must not remove path validation listeners 2008-12-12 14:57:38 +00:00
mfranz
e5656fedc9 store 30 history entries by default (settable via property
/sim/gui/prop-key-handler/history-max-size)
2008-12-09 00:20:29 +00:00
mfranz
59ff8c6129 also search value 2008-12-08 14:03:18 +00:00
mfranz
db4c98d63e add constants GAL2L and LB2KG 2008-12-07 14:44:52 +00:00
mfranz
291ba987d3 fuel dialog: add tank checkbox only if the "selected" property is actually
writable. This omits the box: <selected type="bool" write="n">1</selected>
2008-12-04 11:34:05 +00:00
mfranz
71f80dff34 initNode: add fourth optional parameter: "force", which enforces a type,
so n.initNode("whatever", 1 "BOOL", 1);  will make node n a BOOL even
if it was "DOUBLE" before. Default: 0. An existing value will be retained,
though.
2008-12-04 11:30:44 +00:00
mfranz
8bf823c4fb initNode: make path optional and let it default to "". This is allowed:
props.globals.getNode("sim/foo", 1).initNode();  and equivalent to
    props.globals.getNode("sim").initNode("foo");
2008-12-03 20:53:00 +00:00
mfranz
5c88cdf6f1 dump: no space after [ and before ] 2008-12-03 20:49:33 +00:00
mfranz
bcc043a368 security wrappers: move original func var into wrapper closure 2008-11-26 16:17:55 +00:00
mfranz
1e5cf9ff0a more use of initNode & some consistency improvements (method format) 2008-11-26 16:09:16 +00:00
mfranz
f7e246905b tree(): show which nodes are aliased to which nodes 2008-11-26 16:07:32 +00:00
mfranz
acff4f55ab add getAliasTarget() wrapper 2008-11-26 11:35:48 +00:00
mfranz
8b62c82b38 fix another forgotten geo.FT2M -> globals.FT2M 2008-11-23 22:22:49 +00:00
mfranz
521954116c only enable precipitation if it's enabled in the gui
(/sim/rendering/precipitation-gui-enabled) *and* if the aircraft wants it
(/sim/rendering/precipitation-aircraft-enabled). Some aircraft model rain
on the windshield and want to turn rain off for interior views.
2008-11-23 09:53:46 +00:00
mfranz
31162ce78b more initNode() (Alzheimer?) 2008-11-22 21:02:04 +00:00
mfranz
75470bf31d Rename Node.clear() to Node.clearValue(), because that's the name that we
use on the C++ side.
2008-11-22 12:05:01 +00:00
mfranz
b3032f63c7 Add Node.clear() method, which resets a node to type "NONE" and value 'nil'.
This can be used to invalidate nodes and may be interesting for debugging
purposes. Use carefully!
2008-11-22 11:20:44 +00:00
mfranz
2b77665c22 setCursor: complain and show options if wrong cursor name was given 2008-11-20 23:03:24 +00:00
mfranz
8d7545252f convert more initNode to the method version (sorry, had forgotten these) 2008-11-20 22:06:54 +00:00
mfranz
f263e693f2 remove deprecated (wrapper) function props.initNode() 2008-11-20 20:41:19 +00:00
mfranz
55b7e3d8e0 dynamic_view.nas: use D2R/R2D constants
globals.nas: move constants to top
geo.nas: fix comments & make bucket_span "private"
2008-11-20 20:18:39 +00:00
mfranz
c74d6ee75e - make props.initNode a props.Node method
- props.nas: some minor improvements
2008-11-20 19:45:40 +00:00
mfranz
55c34a0748 calculate M2FT from FT2M (of course :-) 2008-11-20 11:33:42 +00:00
mfranz
eebfdf218c - make constants D2R, R2D, M2FT, FT2M global
- geo.put_model: use 'add-model' fgcommand
2008-11-20 11:24:46 +00:00
mfranz
dcb1321923 make constants D2R, R2D, M2FT, FT2M global 2008-11-20 11:24:45 +00:00
mfranz
9976b71472 init: make sure /sim/tutorials actually exists 2008-11-15 19:40:28 +00:00
mfranz
81e967a609 nasal now returns constant and readable ghosttypes, so we do no longer
need the symbol table and comparison with the ghosttype of props._globals()
2008-11-13 12:00:23 +00:00
mfranz
c6cd898f64 - update comment to reflect alias()/unalias() addition
- minor improvements & cosmetics
2008-11-13 11:57:07 +00:00
mfranz
2aba6e7d80 Node: only wrap() functions that actually return property ghosts 2008-11-12 17:06:53 +00:00
mfranz
547770e30b add alias()/unalias() wrapper methods 2008-11-12 14:43:41 +00:00
mfranz
78d1a6e631 OverlaySelector: check callback function explicitly for nil 2008-11-12 11:43:26 +00:00
mfranz
d1fd61c728 gui.nas: use nasal-dir-initialized signal for INIT func, so that it's
earlier available. (The settimer/1 was a workaround for another
    problem that should be fixed by now.)
globals.nas: load $FG_HOME/Nasal/ files as first settimer(0) function,
    so that it always comes after all nasal-dir-initialized callbacks

This should fix the glide_slope_tunnel/popupTip bug and makes the
startup order clearer and cleaner.
2008-11-11 14:54:51 +00:00
mfranz
05cc0f3fda add complementary function to bits.string(): bits.value() This is rather
pointless for running fgfs, but can be useful for development and debugging,
and it's just a few lines.
2008-10-25 15:03:32 +00:00
mfranz
6384588444 I said "correctly". 2008-10-25 14:24:26 +00:00
mfranz
f7bd13fed3 debug.dump(): print empty strings as hash key correctly 2008-10-25 14:20:47 +00:00
mfranz
6371627424 bits.string: add optional zero-padding 2008-10-23 22:16:32 +00:00
mfranz
97c1ec0ac7 set: bugfix (invert test; still faster than the old version :-) 2008-10-22 23:27:03 +00:00
mfranz
f5ab1de0b6 set/clear: shorter & a few nanoseconds faster 2008-10-22 23:04:07 +00:00
mfranz
464d9d3f75 add bits.toggle() and bits.switch() 2008-10-22 20:56:22 +00:00
mfranz
80215e0731 "export" bit vector & cleanup 2008-10-22 14:02:58 +00:00
mfranz
6003c3a17d bits.test: remove silly loop 2008-10-22 13:26:55 +00:00
mfranz
6d5585ec65 restore simple bits functions. Useful for setting/testing boolean values
inr MP transport, and for setting/clearing modifier bits in js config files.
2008-10-22 12:49:01 +00:00
mfranz
2f76461c8c io.nas/stat: drop use of broken bits library
gui.nas/OverlaySelector: me.data is no longer a node; only sort once
2008-10-21 21:37:41 +00:00
mfranz
0bd5bc58a7 livery: documentation fix 2008-10-19 21:12:57 +00:00
mfranz
c5fe446f58 overlay-select.xml, gui.nas: fix overlay-dialog close(); add relpath() func
aircraft.nas: remove redundant data.add()
2008-10-19 12:34:09 +00:00
mfranz
94211721cf livery: fix bad default nameprop (must be relative) 2008-10-19 11:55:52 +00:00
mfranz
32bf0f7265 gui.nas: remove trailing slashes in nameprop/sortprop
aircraft.nas: add generic overlay_update function, and make livery_update
         a wrapper for it
2008-10-19 11:52:56 +00:00
mfranz
da7d1ded71 aircraft.nas: make aircraft.livery a wrapper for gui.OverlaySelector
gui.nas: add file name to stored data (needed for MP-livery)
2008-10-16 15:26:19 +00:00
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