1
0
Fork 0
fgdata/Nasal/canvas/map/WXR.symbol
Gijs de Rooy 573de77cb8 Navdisplay: bug fixed and new features
- Correct z-index
- Add MAP CTR compass
- Fix active WPT color
- Hide wind data at low speeds
- Move code outside main update loop
- Correct ranges
2014-07-06 23:17:47 +02:00

24 lines
926 B
Text

# See: http://wiki.flightgear.org/MapStructure
# Class things:
var name = 'WXR'; # storms/weather layer for LW/AW (use thunderstom scenario for testing)
var parents = [DotSym];
var __self__ = caller(0)[0];
DotSym.makeinstance( name, __self__ );
var element_type = "group"; # we want a group, becomes "me.element"
# TODO: how to integrate both styling and caching?
var draw = func {
# TODO: once this works properly, consider using caching here
# FIXME: scaling seems way off in comparison with the navdisplay - i.e. hard-coded assumptions about texture size/view port ?
me.element.createChild("image")
.setFile("Nasal/canvas/map/Images/storm.png")
.setSize(128*me.model.radiusNm,128*me.model.radiusNm)
.setTranslation(-64*me.model.radiusNm,-64*me.model.radiusNm)
.setCenter(0,0)
.set("z-index",-4);
# .setScale(0.3);
# TODO: overlapping storms should probably set their z-index according to altitudes
};