* Add rumorz mod

* ANSI/pipe working properly in VerticalMenuView
* Fix bug in renderStringLength()
* Make initSequence() part of prototype chain for inheritance
* Use proper 'desc' field vs 'status' for menus when setting client/user status
* Move pipeToAnsi() to setItems/setFocusItems vs every render
* Add %RR random rumor MCI
* Predefined MCI's can be init @ startup - RR uses random as a test bed
* Add some StatLog functionality for ordering, keep forever, etc.
* Fix TextView redraw issue
* Better VerticalMenuView drawItem() logic
* Add 'key press' emit for View
* Enable formats for BBS list - works with MCI
* Remove old system_property.js
This commit is contained in:
Bryan Ashby 2016-08-10 22:48:13 -06:00
parent 2b68201f7d
commit 30ba609fb4
13 changed files with 492 additions and 241 deletions

View file

@ -34,7 +34,6 @@ function TextView(options) {
this.justify = options.justify || 'right';
this.resizable = miscUtil.valueWithDefault(options.resizable, true);
this.horizScroll = miscUtil.valueWithDefault(options.horizScroll, true);
this.text = options.text || '';
if(_.isString(options.textOverflow)) {
this.textOverflow = options.textOverflow;
@ -136,8 +135,7 @@ function TextView(options) {
return this.position.col + offset;
};
// :TODO: Whatever needs init here should be done separately from setText() since it redraws/etc.
// this.setText(options.text || '');
this.setText(options.text || '', false); // false=do not redraw now
}
util.inherits(TextView, View);
@ -175,7 +173,9 @@ TextView.prototype.getData = function() {
return this.text;
};
TextView.prototype.setText = function(text) {
TextView.prototype.setText = function(text, redraw) {
redraw = _.isBoolean(redraw) ? redraw : true;
if(!_.isString(text)) {
text = text.toString();
}
@ -201,7 +201,9 @@ TextView.prototype.setText = function(text) {
this.dimens.width = this.text.length + widthDelta;
}
this.redraw();
if(redraw) {
this.redraw();
}
};
/*