mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 14:44:40 +02:00
* isSpecialKeyMapped() renamed to isKeyMapped()
* Functional HorizontalMenuView * Minor updates
This commit is contained in:
parent
a1b87c7a60
commit
c1469a1f9c
11 changed files with 81 additions and 23 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue