diff options
| author | Jules Laplace <jules@okfoc.us> | 2016-05-11 16:07:44 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2016-05-11 16:07:44 -0400 |
| commit | 7375bd0ca48a6900bb0accc33192425024311b33 (patch) | |
| tree | 7b657eb216b4ecb2d72a8d4218b9da5ca5c46f28 /js | |
| parent | 5e6b378965fc8e969309059aa4ea7e5d239ab3b5 (diff) | |
get colors from currently selected palette
Diffstat (limited to 'js')
| -rw-r--r-- | js/ui/letters.js | 4 | ||||
| -rw-r--r-- | js/ui/nopaint.js | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/js/ui/letters.js b/js/ui/letters.js index 5ed7ffb..d745171 100644 --- a/js/ui/letters.js +++ b/js/ui/letters.js @@ -13,9 +13,11 @@ var letters = (function(){ var lex = new Lex (x,y) return lex }) + + letters.charset = "" letters.repaint = function(charset){ - charset = charset || last_charset + letters.charset = charset = charset || last_charset last_charset = charset var chars = unicode.block(charset, 32) if (chars[0] != " ") chars.unshift(" ") diff --git a/js/ui/nopaint.js b/js/ui/nopaint.js index da6a74b..5ca439b 100644 --- a/js/ui/nopaint.js +++ b/js/ui/nopaint.js @@ -279,11 +279,10 @@ var nopaint = (function(){ var LetterBrush = SolidBrush.extend({ type: "letter", - chars: unicode.block('Basic Latin', 32), recolor: function(){ this.fg = rand_hue() this.bg = rand_hue() - this.char = choice(this.chars) + this.char = choice( unicode.block(letters.charset, 32) ) }, }) @@ -299,14 +298,14 @@ var nopaint = (function(){ this.bg = n } if (Math.random() < 0.7) { - this.char = choice(this.chars) + this.char = choice( unicode.block(letters.charset, 32) ) } this.regenerate() this.__iterate() }, update: function(){ if (Math.random() < 0.3) { - this.char = choice(this.chars) + this.char = choice( unicode.block(letters.charset, 32) ) } this.regenerate() }, @@ -406,11 +405,10 @@ var nopaint = (function(){ var FillLetterTool = FillTool.extend({ type: "fill-letter", rate: 25, - chars: unicode.block('Basic Latin', 32), recolor: function(){ this.fg = randint(16) this.bg = randint(16) - this.char = choice(this.chars) + this.char = choice( unicode.block(letters.charset, 32) ) this.opacity = 1 }, }) |
