mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-25 03:58:17 +02:00
* Merged changes
This commit is contained in:
commit
cb5fc13da5
11 changed files with 217 additions and 16 deletions
|
@ -37,7 +37,6 @@ EditTextView.prototype.onKeyPress = function(key, isSpecial) {
|
|||
|
||||
assert(1 === key.length);
|
||||
|
||||
// :TODO: how to handle justify left/center?
|
||||
if(this.text.length < this.maxLength) {
|
||||
key = strUtil.stylizeString(key, this.textStyle);
|
||||
|
||||
|
@ -61,8 +60,6 @@ EditTextView.prototype.onKeyPress = function(key, isSpecial) {
|
|||
};
|
||||
|
||||
EditTextView.prototype.onSpecialKeyPress = function(keyName) {
|
||||
// :TODO: handle 'enter' & others for multiLine
|
||||
|
||||
if(this.isSpecialKeyMapped('backspace', keyName)) {
|
||||
if(this.text.length > 0) {
|
||||
this.text = this.text.substr(0, this.text.length - 1);
|
||||
|
@ -76,10 +73,10 @@ EditTextView.prototype.onSpecialKeyPress = function(keyName) {
|
|||
}
|
||||
}
|
||||
}
|
||||
} else if(this.isSpecialKeyMapped('clear', keyName)) {
|
||||
// :TODO: this doesn't work right at all:
|
||||
//this.setText('');
|
||||
//this.client.term.write(ansi.goto(this.position.x, this.position.y));
|
||||
} else if(this.isSpecialKeyMapped('clearLine', keyName)) {
|
||||
this.text = '';
|
||||
this.cursorPos.x = 0;
|
||||
this.setFocus(true); // resetting focus will redraw & adjust cursor
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue