mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 14:44:40 +02:00
* Rename position x/y stuff to row/col. X/Y were backwards anyway :)
This commit is contained in:
parent
159cdcb763
commit
eaa4feeebd
9 changed files with 49 additions and 49 deletions
|
@ -24,7 +24,7 @@ function TextView(options) {
|
|||
if(options.maxLength) {
|
||||
this.maxLength = options.maxLength;
|
||||
} else {
|
||||
this.maxLength = this.client.term.termWidth - this.position.x;
|
||||
this.maxLength = this.client.term.termWidth - this.position.row;
|
||||
}
|
||||
|
||||
this.fillChar = miscUtil.valueWithDefault(options.fillChar, ' ').substr(0, 1);
|
||||
|
@ -84,9 +84,9 @@ function TextView(options) {
|
|||
));
|
||||
};
|
||||
|
||||
this.getEndOfTextYPosition = function() {
|
||||
this.getEndOfTextColumn = function() {
|
||||
var offset = Math.min(this.text.length, this.dimens.width);
|
||||
return this.position.y + offset;
|
||||
return this.position.col + offset;
|
||||
};
|
||||
|
||||
this.setText(options.text || '');
|
||||
|
@ -105,7 +105,7 @@ TextView.prototype.setFocus = function(focused) {
|
|||
|
||||
this.redraw();
|
||||
|
||||
this.client.term.write(ansi.goto(this.position.x, this.getEndOfTextYPosition()));
|
||||
this.client.term.write(ansi.goto(this.position.row, this.getEndOfTextColumn()));
|
||||
this.client.term.write(this.getFocusSGR());
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue