mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-30 14:36:19 +02:00
+ 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:
parent
4234e03008
commit
6c841105ab
13 changed files with 126 additions and 162 deletions
|
@ -9,8 +9,10 @@ var assert = require('assert');
|
|||
exports.ButtonView = ButtonView;
|
||||
|
||||
function ButtonView(client, options) {
|
||||
options.acceptsFocus = miscUtil.valueWithDefault(options.acceptsFocus, true);
|
||||
options.acceptsInput = miscUtil.valueWithDefault(options.acceptsInput, true);
|
||||
console.log(options);
|
||||
options.acceptsFocus = miscUtil.valueWithDefault(options.acceptsFocus, true);
|
||||
options.acceptsInput = miscUtil.valueWithDefault(options.acceptsInput, true);
|
||||
options.justify = miscUtil.valueWithDefault(options.justify, 'center');
|
||||
|
||||
TextView.call(this, client, options);
|
||||
}
|
||||
|
@ -21,6 +23,7 @@ ButtonView.prototype.onKeyPress = function(key, isSpecial) {
|
|||
ButtonView.super_.prototype.onKeyPress.call(this, key, isSpecial);
|
||||
|
||||
// allow spacebar to 'click' buttons
|
||||
// :TODO: need to check configurable mapping here
|
||||
if(' ' === key) {
|
||||
this.emit('action', 'accept');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue