mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-08-04 00:41:56 +02:00
* A bit of work on VerticalMenuView
* Inheritance updates for Views * Fixes and better handling of MCI factory
This commit is contained in:
parent
c3aa4c44e2
commit
edc8266310
12 changed files with 125 additions and 73 deletions
|
@ -17,7 +17,6 @@ function TextView(client, options) {
|
|||
this.maxLength = this.options.maxLength;
|
||||
}
|
||||
|
||||
this.textStyle = this.options.textStyle || 'normal';
|
||||
this.multiLine = this.options.multiLine || false;
|
||||
this.fillChar = miscUtil.valueWithDefault(this.options.fillChar, ' ').substr(0, 1);
|
||||
|
||||
|
@ -29,8 +28,6 @@ function TextView(client, options) {
|
|||
|
||||
this.setText(this.options.text || '');
|
||||
|
||||
this.isPasswordTextStyle = 'P' === this.textStyle || 'password' === this.textStyle;
|
||||
|
||||
if(this.isPasswordTextStyle) {
|
||||
this.textMaskChar = miscUtil.valueWithDefault(this.options.textMaskChar, '*').substr(0, 1);
|
||||
}
|
||||
|
@ -45,7 +42,7 @@ TextView.prototype.redraw = function() {
|
|||
this.client.term.write(this.getANSIColor(color));
|
||||
|
||||
// :TODO: If using fillChar, don't just pad. switch to non-focus color & fill with |fillChar|
|
||||
|
||||
// :TODO: Apply justification
|
||||
if(this.isPasswordTextStyle) {
|
||||
this.client.term.write(strUtil.pad(new Array(this.text.length + 1).join(this.textMaskChar), this.dimens.width));
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue