2017-12-10 22:15:21 +00:00
|
|
|
# UserWPTInfo
|
|
|
|
var UserWPTInfo =
|
|
|
|
{
|
|
|
|
new : func (mfd, myCanvas, device, svg)
|
|
|
|
{
|
|
|
|
var obj = {
|
2017-12-27 19:51:54 +00:00
|
|
|
parents : [
|
|
|
|
UserWPTInfo,
|
|
|
|
MFDPage.new(mfd, myCanvas, device, svg, "UserWPTInfo", "WPT - USER WPT INFORMATION")
|
|
|
|
],
|
2017-12-10 22:15:21 +00:00
|
|
|
};
|
|
|
|
|
2018-01-13 18:53:06 +00:00
|
|
|
obj.topMenu(device, obj, nil);
|
2017-12-10 22:15:21 +00:00
|
|
|
|
2017-12-27 19:51:54 +00:00
|
|
|
obj.controller = fg1000.UserWPTInfoController.new(obj, svg);
|
|
|
|
|
2017-12-10 22:15:21 +00:00
|
|
|
return obj;
|
|
|
|
},
|
|
|
|
offdisplay : func() {
|
|
|
|
me._group.setVisible(0);
|
|
|
|
|
|
|
|
# Reset the menu colours. Shouldn't have to do this here, but
|
|
|
|
# there's not currently an obvious other location to do so.
|
|
|
|
for(var i = 0; i < 12; i +=1) {
|
|
|
|
var name = sprintf("SoftKey%d",i);
|
|
|
|
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
|
|
|
|
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
|
|
|
|
}
|
2017-12-27 19:51:54 +00:00
|
|
|
me.controller.offdisplay();
|
2017-12-10 22:15:21 +00:00
|
|
|
},
|
|
|
|
ondisplay : func() {
|
|
|
|
me._group.setVisible(1);
|
|
|
|
me.mfd.setPageTitle(me.title);
|
2017-12-27 19:51:54 +00:00
|
|
|
me.controller.ondisplay();
|
2017-12-10 22:15:21 +00:00
|
|
|
},
|
2018-01-13 18:53:06 +00:00
|
|
|
topMenu : func(device, pg, menuitem) {
|
|
|
|
pg.clearMenu();
|
|
|
|
pg.resetMenuColors();
|
|
|
|
device.updateMenus();
|
|
|
|
},
|
|
|
|
|
|
|
|
|
2017-12-10 22:15:21 +00:00
|
|
|
};
|