1
0
Fork 0
fgdata/Nasal/canvas/map/DME.symbol
Philosopher 7ca8482b07 MapStructure work & (partial) integration
In time for 3.0. The API is still not fully complete, and not fully
cleaned up, but this is good enough for this release cycle (and it
should offer benefit longer term, if not now -- hopefully performance as
well).

Many thanks to Hooray as well, who has helped prepare things while I
could not, and often suggested ideas.
2014-01-09 21:24:22 -06:00

35 lines
758 B
Text

# Class things:
var name = 'DME';
var parents = [DotSym];
var __self__ = caller(0)[0];
DotSym.makeinstance( name, __self__ );
var element_type = "group"; # we want a group, becomes "me.element"
var icon_dme = nil;
var draw = func {
# Init
if (me.icon_dme == nil) {
me.icon_dme = me.element.createChild("path")
.moveTo(-15,0)
.line(-12.5,-7.5)
.line(7.5,-12.5)
.line(12.5,7.5)
.lineTo(7.5,-12.5)
.line(12.5,-7.5)
.line(7.5,12.5)
.line(-12.5,7.5)
.lineTo(15,0)
.lineTo(7.5,12.5)
.vert(14.5)
.horiz(-14.5)
.vert(-14.5)
.close()
.setStrokeLineWidth(3);
}
if (me.controller != nil and me.controller.is_tuned(me.model.frequency/100))
me.icon_dme.setColor(0,1,0);
else
me.icon_dme.setColor(0,0.6,0.85);
};