FG1000: Keyboard input for GCU 47X
From Julio Santa Cruz
This commit is contained in:
parent
486797d6c6
commit
78e9eff433
7 changed files with 58 additions and 7 deletions
|
@ -129,6 +129,13 @@ var AirportInfoController =
|
||||||
}
|
}
|
||||||
return emesary.Transmitter.ReceiptStatus_Finished;
|
return emesary.Transmitter.ReceiptStatus_Finished;
|
||||||
},
|
},
|
||||||
|
handleKeyInput : func (value) {
|
||||||
|
if (me._currentGroup == AirportInfoController.UIGROUP.APT) {
|
||||||
|
me.page.airportEntry.keyPress(value);
|
||||||
|
return emesary.Transmitter.ReceiptStatus_Finished;
|
||||||
|
}
|
||||||
|
return emesary.Transmitter.ReceiptStatus_NotProcessed;
|
||||||
|
},
|
||||||
handleFMSInner : func(value) {
|
handleFMSInner : func(value) {
|
||||||
if (me.crsrToggle == 1) {
|
if (me.crsrToggle == 1) {
|
||||||
if (me._currentGroup == AirportInfoController.UIGROUP.APT) {
|
if (me._currentGroup == AirportInfoController.UIGROUP.APT) {
|
||||||
|
|
|
@ -320,6 +320,17 @@ var DirectToController =
|
||||||
|
|
||||||
return emesary.Transmitter.ReceiptStatus_Finished;
|
return emesary.Transmitter.ReceiptStatus_Finished;
|
||||||
},
|
},
|
||||||
|
handleKeyInput : func (value) {
|
||||||
|
if (! me.dto_displayed) return emesary.Transmitter.ReceiptStatus_NotProcessed;
|
||||||
|
if (me._waypointSubmenuVisible) return emesary.Transmitter.ReceiptStatus_NotProcessed;
|
||||||
|
|
||||||
|
if (me._cursorElements[me._selectedElement].isEditable()) {
|
||||||
|
me._cursorElements[me._selectedElement].keyPress(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
return emesary.Transmitter.ReceiptStatus_Finished;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
# Reset controller if required when the page is displayed or hidden
|
# Reset controller if required when the page is displayed or hidden
|
||||||
# Note that we explicitly do NOT RegisterWithEmesary/DeRegisterWithEmesary!
|
# Note that we explicitly do NOT RegisterWithEmesary/DeRegisterWithEmesary!
|
||||||
|
|
|
@ -132,7 +132,10 @@ var IntersectionInfoController =
|
||||||
me._page.dataEntry.unhighlightElement();
|
me._page.dataEntry.unhighlightElement();
|
||||||
return emesary.Transmitter.ReceiptStatus_Finished;
|
return emesary.Transmitter.ReceiptStatus_Finished;
|
||||||
},
|
},
|
||||||
|
handleKeyInput : func (value) {
|
||||||
|
me._page.dataEntry.keyPress(value);
|
||||||
|
return emesary.Transmitter.ReceiptStatus_Finished;
|
||||||
|
},
|
||||||
# Reset controller if required when the page is displayed or hidden
|
# Reset controller if required when the page is displayed or hidden
|
||||||
ondisplay : func() {
|
ondisplay : func() {
|
||||||
me.RegisterWithEmesary();
|
me.RegisterWithEmesary();
|
||||||
|
|
|
@ -134,6 +134,10 @@ var NDBInfoController =
|
||||||
me._page.dataEntry.unhighlightElement();
|
me._page.dataEntry.unhighlightElement();
|
||||||
return emesary.Transmitter.ReceiptStatus_Finished;
|
return emesary.Transmitter.ReceiptStatus_Finished;
|
||||||
},
|
},
|
||||||
|
handleKeyInput : func (value) {
|
||||||
|
me._page.dataEntry.keyPress(value);
|
||||||
|
return emesary.Transmitter.ReceiptStatus_Finished;
|
||||||
|
},
|
||||||
|
|
||||||
# Reset controller if required when the page is displayed or hidden
|
# Reset controller if required when the page is displayed or hidden
|
||||||
ondisplay : func() {
|
ondisplay : func() {
|
||||||
|
|
|
@ -39,6 +39,10 @@ var VORInfoController =
|
||||||
}
|
}
|
||||||
return emesary.Transmitter.ReceiptStatus_Finished;
|
return emesary.Transmitter.ReceiptStatus_Finished;
|
||||||
},
|
},
|
||||||
|
handleKeyInput : func (value) {
|
||||||
|
me._page.dataEntry.keyPress(value);
|
||||||
|
return emesary.Transmitter.ReceiptStatus_Finished;
|
||||||
|
},
|
||||||
handleFMSInner : func(value) {
|
handleFMSInner : func(value) {
|
||||||
if (me._crsrToggle == 1) {
|
if (me._crsrToggle == 1) {
|
||||||
me._page.dataEntry.incrSmall(value);
|
me._page.dataEntry.incrSmall(value);
|
||||||
|
|
|
@ -266,6 +266,12 @@ var WaypointEntryController =
|
||||||
me.loadDestination(me.page.IDEntry.getValue());
|
me.loadDestination(me.page.IDEntry.getValue());
|
||||||
return emesary.Transmitter.ReceiptStatus_Finished;
|
return emesary.Transmitter.ReceiptStatus_Finished;
|
||||||
},
|
},
|
||||||
|
handleKeyInput : func (value) {
|
||||||
|
if (! me._wpentry_displayed) return emesary.Transmitter.ReceiptStatus_NotProcessed;
|
||||||
|
if (me._selectedElement == 0) return emesary.Transmitter.ReceiptStatus_NotProcessed;
|
||||||
|
me._cursorElements[me._selectedElement].keyPress(value);
|
||||||
|
return emesary.Transmitter.ReceiptStatus_Finished;
|
||||||
|
},
|
||||||
|
|
||||||
# Reset controller if required when the page is displayed or hidden
|
# Reset controller if required when the page is displayed or hidden
|
||||||
# Note that we explicitly do NOT RegisterWithEmesary/DeRegisterWithEmesary!
|
# Note that we explicitly do NOT RegisterWithEmesary/DeRegisterWithEmesary!
|
||||||
|
|
|
@ -144,11 +144,7 @@ var DataEntryElement =
|
||||||
me.highlightElement();
|
me.highlightElement();
|
||||||
me._dataEntryPos = -1;
|
me._dataEntryPos = -1;
|
||||||
},
|
},
|
||||||
incrSmall : func(value) {
|
_startEdit: func() {
|
||||||
# Change the value of this element, or start editing it if we're not already
|
|
||||||
# doing so.
|
|
||||||
|
|
||||||
if (me._dataEntryPos == -1) {
|
|
||||||
# Start editing by hiding the top level element, and displaying and
|
# Start editing by hiding the top level element, and displaying and
|
||||||
# resetting the character entry fields.
|
# resetting the character entry fields.
|
||||||
me._dataEntryPos = 0;
|
me._dataEntryPos = 0;
|
||||||
|
@ -162,6 +158,26 @@ var DataEntryElement =
|
||||||
|
|
||||||
# Highlight the first character element to indicate we're editing it
|
# Highlight the first character element to indicate we're editing it
|
||||||
me._highlightCharElement();
|
me._highlightCharElement();
|
||||||
|
},
|
||||||
|
keyPress: func(value) {
|
||||||
|
if (me._dataEntryPos == -1) {
|
||||||
|
me._startEdit();
|
||||||
|
}
|
||||||
|
var charSym = me._dataEntrySymbol[me._dataEntryPos];
|
||||||
|
charSym.setText(value);
|
||||||
|
|
||||||
|
if ( me._dataEntryPos == me._size -1 ) return;
|
||||||
|
|
||||||
|
me._unhighlightCharElement();
|
||||||
|
me._dataEntryPos = me._dataEntryPos + 1;
|
||||||
|
me._highlightCharElement();
|
||||||
|
},
|
||||||
|
incrSmall : func(value) {
|
||||||
|
# Change the value of this element, or start editing it if we're not already
|
||||||
|
# doing so.
|
||||||
|
|
||||||
|
if (me._dataEntryPos == -1) {
|
||||||
|
me._startEdit();
|
||||||
} else {
|
} else {
|
||||||
var charSym = me._dataEntrySymbol[me._dataEntryPos];
|
var charSym = me._dataEntrySymbol[me._dataEntryPos];
|
||||||
var incr_or_decr = (value > 0) ? 1 : -1;
|
var incr_or_decr = (value > 0) ? 1 : -1;
|
||||||
|
|
Loading…
Reference in a new issue