1
0
Fork 0
A320-family/Models/Instruments/ND/canvas/map/DECEL.symbol

32 lines
770 B
Text
Raw Normal View History

2019-10-14 16:48:35 +00:00
# See: http://wiki.flightgear.org/MapStructure
# Class things:
var name = 'DECEL';
var parents = [canvas.DotSym];
var __self__ = caller(0)[0];
canvas.DotSym.makeinstance( name, __self__ );
#canvas.SymbolLayer.get(name).df_style = {
# radius: 13,
#};
var element_type = "group";
var init = func {
var svg_path = me.getStyle('svg_path');
if(svg_path == nil)
svg_path = get_local_path('res/airbus_decel.svg');
me.decel_grp = me.element.createChild("group","decel");
canvas.parsesvg(me.decel_grp, svg_path);
me.decel_grp.set('z-index', 5);
2019-10-14 16:48:35 +00:00
}
var draw = func{
if(me.decel_grp != nil){
var spd_ctrl = getprop(me.options.spd_ctrl);
if(spd_ctrl)
me.decel_grp.setColor(me.style.managed_color);
else
me.decel_grp.setColor(me.style.selected_color);
}
2019-10-14 16:48:35 +00:00
}