diff options
| author | Julie Lala <jules@okfoc.us> | 2015-05-22 20:27:47 +0200 |
|---|---|---|
| committer | Julie Lala <jules@okfoc.us> | 2015-05-22 20:27:47 +0200 |
| commit | 136f49308d546542c555c549d4eae72e80b36d8c (patch) | |
| tree | 8e45703cfefd777fb6bd2508a37945219248accc /js | |
| parent | 332974cf36e0bc4d5da1e684209b425fd9fd53a0 (diff) | |
make it so u can size brushes up mad high
Diffstat (limited to 'js')
| -rw-r--r-- | js/ui/controls.js | 4 | ||||
| -rw-r--r-- | js/ui/keys.js | 12 |
2 files changed, 14 insertions, 2 deletions
diff --git a/js/ui/controls.js b/js/ui/controls.js index 9580f98..6a6c005 100644 --- a/js/ui/controls.js +++ b/js/ui/controls.js @@ -233,10 +233,10 @@ var controls = (function(){ }) controls.width.key = keys.single_numeral_key(controls.width, brush, "w", 1, 10) - controls.width.raw_key = keys.arrow_key(controls.width, brush, "w", "rebuild", 1, 10) + controls.width.raw_key = keys.arrow_key(controls.width, brush, "w", "rebuild", 1, 100) controls.height.key = keys.single_numeral_key(controls.height, brush, "h", 1, 10) - controls.height.raw_key = keys.arrow_key(controls.height, brush, "h", "rebuild", 1, 10) + controls.height.raw_key = keys.arrow_key(controls.height, brush, "h", "rebuild", 1, 100) controls.canvas_width.raw_key = keys.arrow_key(controls.canvas_width, canvas, "w", "resize", 1, 999) controls.canvas_width.key = keys.multi_numeral_key(controls.canvas_width, 3) diff --git a/js/ui/keys.js b/js/ui/keys.js index 8850aa2..828e957 100644 --- a/js/ui/keys.js +++ b/js/ui/keys.js @@ -78,6 +78,18 @@ var keys = (function(){ cursor_input.value = "" // console.log("input:", char) + + if (current_tool.name != "text") { + brush.char = char + if (char == " ") { + brush.bg = brush.fg + } + else if (brush.bg != fillColor) { + brush.fg = brush.bg + brush.bg = fillColor + } + brush.rebuild() + } if (focused && char) { var y = focused.y, x = focused.x |
