+ MCI support for focusArgs, e.g. 'focusTextStyle'

+ TextView initial support for fillChar and justify
+ Add color support to string_util.js::pad()
* Better color handling in Views
This commit is contained in:
Bryan Ashby 2014-11-03 16:49:15 -07:00
parent 4234e03008
commit 6c841105ab
13 changed files with 126 additions and 162 deletions

View file

@ -16,7 +16,8 @@ function EditTextView(client, options) {
TextView.call(this, client, options);
this.clientBackspace = function() {
this.client.term.write('\b \b');
this.client.term.write(
'\b' + this.getANSIColor(this.getColor()) + this.fillChar + '\b' + this.getANSIColor(this.getFocusColor()));
};
}
@ -29,7 +30,7 @@ EditTextView.prototype.onKeyPress = function(key, isSpecial) {
assert(1 === key.length);
console.log('key: ' + key);
// :TODO: how to handle justify left/center?
if(this.text.length < this.options.maxLength) {
key = strUtil.stylizeString(key, this.textStyle);