* isSpecialKeyMapped() renamed to isKeyMapped()

* Functional HorizontalMenuView
* Minor updates
This commit is contained in:
Bryan Ashby 2015-07-01 20:18:34 -06:00
parent a1b87c7a60
commit c1469a1f9c
11 changed files with 81 additions and 23 deletions

View file

@ -32,7 +32,7 @@ require('util').inherits(EditTextView, TextView);
EditTextView.prototype.onKeyPress = function(ch, key) {
if(key) {
if(this.isSpecialKeyMapped('backspace', key.name)) {
if(this.isKeyMapped('backspace', key.name)) {
if(this.text.length > 0) {
this.text = this.text.substr(0, this.text.length - 1);
@ -47,7 +47,7 @@ EditTextView.prototype.onKeyPress = function(ch, key) {
}
return;
} else if(this.isSpecialKeyMapped('clearLine', key.name)) {
} else if(this.isKeyMapped('clearLine', key.name)) {
this.text = '';
this.cursorPos.col = 0;
this.setFocus(true); // resetting focus will redraw & adjust cursor