1
0
Fork 0
Commit graph

6904 commits

Author SHA1 Message Date
mfranz
597298d5a7 - fix slider
- order functions like in puAuxList.cxx (plib/cvs) for easier
  back/forward-porting
2006-05-24 20:46:10 +00:00
mfranz
e7e0e84add - force multiline contents (Nasal scripts!) into one line, so that they
don't print over other entries or even leak out of the widget
- warning-- (MSVC)
2006-05-24 14:00:56 +00:00
fredb
790848b822 Compile 2006-05-24 10:51:35 +00:00
mfranz
dab5434edb Vivian MEAZZA:
"Remove unnecessary, redundant or duplicated code. Functionally, there is no
change"
2006-05-24 10:06:44 +00:00
mfranz
b08a588fb1 ok, now I know why the destructor was commented out in prop_picker.cxx:
there's a bug that I had copied: update() checks each list node: if it
has no children, then a listener is attached. Later, when freeing the
children list, it assumed again that each node without children would
have a listener attached. This caused a crash when a node had children
before, but lost them in the meantime. Now we tried to remove a listener
where there never was one.
2006-05-24 09:42:10 +00:00
mfranz
6465141ac2 - don't jump to top after bool toggling 2006-05-23 21:35:38 +00:00
mfranz
91a367379c catch non-existent nodes, too 2006-05-23 20:48:01 +00:00
mfranz
9c98766700 treat widget input correctly 2006-05-23 20:24:56 +00:00
mfranz
e0b1d12a60 don't abort fgfs only because a nasal script called a property function
with an invalid path, as in getprop("/sim/model/737") or x.getNode("f:1").
Forward sg's error message to the Nasal runtime error function instead, so
you get something like:

  Nasal runtime error: name must begin with alpha or '_'
    at /home/m/fgfs/Base.local/Nasal/props.nas, line 30

Unfortunately, the location points to the line where the ghost wrapper
sits, rather than the offending script line.
2006-05-23 18:55:38 +00:00
mfranz
fdb9e94af3 ugly "fix": the constructor was commented out in prop_picker.cxx since
*many* years, so the property browser always leaked memory. I activated
this line in property_list.cxx and ... got a crash right there. So this
was the reason for it being commented out? Doing the same for now, until
I know the exact reason and can really fix it.
2006-05-23 16:49:32 +00:00
mfranz
4c940a55f9 fix for broken plib 1.8.4 2006-05-23 16:44:10 +00:00
mfranz
d47e4ce0bd Vivian MEAZZA:
"Bug Fix - amend the code so that JSBSIm can have more than one tanker in
the environment at the same time. A nasal script has to be added to each
aar-capable JSBSim model to complete this fix."
2006-05-22 20:18:40 +00:00
mfranz
e2c195f3a6 - move the ID stuff to dialog.hxx
- add an identifier to fgPropertyList(), which is also PUCLASS_LIST based
2006-05-22 16:14:50 +00:00
mfranz
9ff339332c make new widget available as <property-list> 2006-05-22 14:35:39 +00:00
mfranz
0007098aac add property_list.[ch]xx 2006-05-22 14:34:59 +00:00
mfranz
3610680095 new property browser widget 2006-05-22 14:34:20 +00:00
mfranz
7b4238fe8c - backport plib/cvs (transparency feature; never tried that :-)
- backport submissions for plib 1.8.5:
  * set slider size correctly
  * remove slider/arrow when all entries fit into the view
  * don't allow to scroll off the list
2006-05-22 14:33:01 +00:00
mfranz
dfdb7f8107 the last patch fixed the AirportList ... and broke all other PUCLASS_LIST.;
Unfortunately, there's no simple way to distinguish them. plib has no
user defined widget classes, and getTypeString() -- which could be used
for that -- isn't virtual. Sigh. I'll discuss the problem on the plib list.
For now I can only offer an ugly workaround. (Don't look closely!)
2006-05-21 22:14:18 +00:00
mfranz
24981fd043 - replace string methods with property methods The class was originally adapted
from plib's file-picker, where it made some sense to keep the current path as
  string, and to chop off elements when leaving a dir, and adding them when
  entering. But it doesn't make the least sense in SGPropertyNode space, where
  we already have everything to move in a tree.

- add R & W flags for TRACE_READ and TRACE_WRITE. Remember: lower case letters:
  disabled (rw ... reading/writing), upper case letters: enabled (RWAUT)

- remove some verbosity & further cleanup ... to make further work easier :-)
2006-05-20 15:25:38 +00:00
fredb
d6320ad76b Create the /sim/ai node if someone has the unfortunate idea of removing it from preferences.xml 2006-05-20 13:29:31 +00:00
fredb
b55833dffb Add an option to enable ai scenarii from the command line instead of editing preferences.xml 2006-05-20 12:19:33 +00:00
mfranz
368349aa58 fix "airport list" crash: I had wrongly assumed that now all PUCLASS_LIST
would actually be an fgList class. The airport list is a PUCLASS_LIST, too,
so we have to check for that. -> Use getTypeString() for identification.
2006-05-20 11:35:28 +00:00
mfranz
53572823bc - unify several indentation and coding styles (and no, this is not my
preferred style, but the most sane of those used :-)
- remove trailing spaces
- cleanup

(all of this will make further work on the files easier)
2006-05-19 10:59:04 +00:00
mfranz
f5955a9cab Vivian MEAZZA:
"Add Air to Air TACAN and User-User refuelling over the Multiplayer Network.
With this change, your TACAN instrument can be tuned to the channel of a
Multiplayer ac. It also activates fuel flow between User and User aircraft
when they are less than 50 ft apart. To participate in multiplayer as a
tanker, all you require to do is to use the callsign MOBIL* (where * is some
number) on the net. Only MOBIL1, MOBIL2 and MOBIL3 have been assigned TACAN
channels, but any MOBIL callsign will be able to give fuel."
2006-05-18 16:59:04 +00:00
mfranz
ee0d288e32 show attributes if /sim/gui/dialogs/property-browser/show-flags == true:
r ... read protected
w ... write protected (untested; does probably not work for obvious reasons ;-)
A ... archive
U ... userarchive
T ... tied
2006-05-18 14:46:42 +00:00
mfranz
865a1c037e unselect entry after editing process has been finished 2006-05-18 13:09:34 +00:00
mfranz
7512553a9a don't reset list to top after having changed a value 2006-05-18 12:51:32 +00:00
mfranz
6d24d7496e Ctrl-Click on bool entry toggles property 2006-05-18 12:12:10 +00:00
mfranz
fa62bc3ec2 SDL 1.2.10 (released today!) doesn't report unicode on key release. Now
we have to ourselves which unicode code a key release even should fire.
(Tested with 1.2.9 and an 1.2.10. Please report any new keyboard problems.)
2006-05-17 21:21:38 +00:00
mfranz
5a38a9d071 - undefine PUCLASS_LIST, as we have our own (old_warning--)
- PropertyObject: remove additional "values" member again
- don't create entry lists for <list>, <select>, and <combo> at dialog
  creation and delete them on dialog close, but let a separate class
  fgValueList handle this. The three widgets are now subclassed and the
  derived widget lets fgValueList manage the lists
- make <select> consistent with <list>. This breaks backwards
  compatibility, but not a single dialog in fgfs uses it and did so
  since ... forever. (Shoot me!)

Rationale: now that dialogs are a bit more dynamic than they used to be
(thanks to embedded Nasal), we have to delete and recreate entry lists
during dialog use. Deleting only at dialog closing doesn't cut it anymore.
Especially list widgets that are updated several times per second would
use up a lot of memory otherwise. The route-manager doesn't update that
often, but it did already leak. One TODO less.  :-)
2006-05-16 12:45:38 +00:00
mfranz
95b6f8057a Vivian MEAZZA: check for carrier name and aircraft callsign without
creating them
2006-05-15 10:47:32 +00:00
mfranz
93f4180597 linking with the puaux lib would be recommendable, if we are using its
widgets  ;-)
2006-05-14 12:22:53 +00:00
mfranz
7ddc71dd13 fix data type (no wonder that this crashes on 64 bit systems :-) 2006-05-14 11:14:49 +00:00
fredb
b30d903a56 Use puAux widgets available in plib 1.8.4 instead of using pui deprecated widgets now removed from CVS 2006-05-14 09:03:50 +00:00
mfranz
d9ee19d6cc - remove trailing spaces
- fix ridiculous mixture of 2-space-, 3-space-, 4-space-, tab-indents,
  and ~K&R & (braindead) FSF coding style
2006-05-13 10:02:17 +00:00
mfranz
db22f457b5 Vivian MEAZZA:
"Preparations for an upgrade to Air-to-Air Refuelling to allow more than one
tanker in the environment at a time. This will only work with YASim models.
JSBSim models are unaffected by this change."
2006-05-13 09:06:57 +00:00
mfranz
6c1be4fffb - remove listener first in the destructor
- make function arg const again
2006-05-12 15:37:25 +00:00
mfranz
244547eb4c only lock AP automatically if above /autopilot/route-manager/min-lock-altitude-agl-ft
The ufo sets this to a very low value, "serious" aircraft (which don't want this
unrealistic automatism at all) set it to a very high value, and those that don't
care ... don't need to care.
2006-05-12 09:36:21 +00:00
mfranz
ef339945fd only activate heading & altitude lock when in air (and even then it should
probably be configurable?).
2006-05-11 10:01:47 +00:00
mfranz
cbddd130ec also set new target altitude if wp is appended to empty list 2006-05-10 21:46:27 +00:00
mfranz
2ff16ca93f - set target altitude if a new WP becomes active through deleting/inserting
- cosmetics
2006-05-10 09:40:08 +00:00
mfranz
43dce6a2be remove wrong comment; should be obvious, anyway 2006-05-09 21:08:01 +00:00
mfranz
641f0a8e9b - implement target altitude handling 2006-05-09 21:01:01 +00:00
mfranz
d409d5dbbe add "signals" for start and end of screenshot capturing. Like the other
signals, this is meant for attaching listeners. The ufo will use that to
hide/reveal the status line in screenshots. The following signal properties
are now available:

  /sim/signals/exit       ... set to 1 right before quitting
  /sim/signals/reinit     ... set to 1 on re-init  (Shift-Esc)
  /sim/signals/screenshot ... set to 1 before and to 0 after screenshot
  /sim/signals/click      ... set to 1 after mouse clicks at terrain, signalling
                              that the geo coords in /sim/input/click/ were updated
2006-05-09 09:39:28 +00:00
mfranz
95a97dbee4 remove obsolete menu functions 2006-05-08 15:00:10 +00:00
mfranz
30a38b2c3a remove obsolete fgcommands 2006-05-08 14:56:46 +00:00
mfranz
264edc470d ignore spaces after the colon in "@insert 3: ebase" 2006-05-08 14:53:23 +00:00
mfranz
f9959b7f2c - move auto_gui's addWaypoint to routemgr.cxx
- add command interface property (monitored by listener)
- remove all traces of auto_gui.[ch]xx
- remove some trailing spaces, fix indentation
2006-05-08 14:35:29 +00:00
curt
f9edbf3620 Dave Culp:
I've got some updates for the soaring scenario that will make for a more
realistic (and fun) experience.  They are:

1)  A cap cloud, which will sit atop each thermal
2)  A thermal scenario with wide coverage around KSFO, and using cap clouds
3)  A one-line change to AIThermal.cxx to position cap cloud properly
4)  Schweizer 2-33 set file change to match cloud coverage with thermal
heights.

files:

1)  data/Models/Geometry/thermalcap.ac
2)  data/Models/Geometry/thermalcap.xml
3)  data/Models/Geometry/thermal_cap.rgb

4)  data/AI/thermal_demo.xml

5)  data/Aircraft/sgs233/sgs233-set.xml

6)  source/src/AIModel/AIThermal.cxx
*** or, if you prefer diffs ***
7)  aimodel.diff
2006-05-02 01:19:02 +00:00
ehofman
f531203951 Add binary output support for the generic protocol. 2006-04-29 12:17:30 +00:00