diff options
| author | Julie Lala <jules@okfoc.us> | 2014-12-20 22:29:09 -0500 |
|---|---|---|
| committer | Julie Lala <jules@okfoc.us> | 2014-12-20 22:29:09 -0500 |
| commit | f6cd4aac9a8ea96df0c41618c3a83a0c8097acc4 (patch) | |
| tree | 1937c4d01732247c985c7856104d637ac30ab4a9 /js/lex.js | |
| parent | 6946255bb23b50e841a6684dc8950797d2a5dce6 (diff) | |
making more things textareas
Diffstat (limited to 'js/lex.js')
| -rw-r--r-- | js/lex.js | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -17,7 +17,7 @@ Lex.prototype.build = function(){ this.span.innerHTML = this.html() } Lex.prototype.css = function(){ - if (this.opacity == 0) return "fabb" + if (this.opacity == 0 && ! this.char) return "fabb" return "f" + letters[mod(this.fg,16)] + "b" + letters[mod(this.bg,16)] } Lex.prototype.html = function(){ @@ -57,6 +57,14 @@ Lex.prototype.clone = function (lex){ this.opacity = lex.opacity this.build() } +Lex.prototype.paint = function (lex){ + if (lex.opacity == 0) return + if (brush.draw_fg) this.fg = lex.fg + if (brush.draw_bg) this.bg = lex.bg + if (brush.draw_char) this.char = lex.char + this.opacity = 1 + this.build() +} Lex.prototype.copy = function () { var lex = new Lex (0,0) lex.clone(this) @@ -108,6 +116,6 @@ Lex.prototype.demolish = function(){ Lex.prototype.key = function(char, keyCode) { if (! char) { return } this.char = char - this.fg = brush.bg + this.fg = brush.fg this.build() } |
