From c93aad173849e9a4c4d63911036a454887cef716 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 10 May 2016 21:54:56 -0400 Subject: change ui --- css/sally.css | 2 +- index.html | 6 +++--- js/tool.js | 1 - js/ui/controls.js | 2 ++ js/ui/nopaint.js | 4 ++++ 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/css/sally.css b/css/sally.css index 00fdb4a..b831aff 100644 --- a/css/sally.css +++ b/css/sally.css @@ -122,7 +122,7 @@ textarea { font-size:12pt; width: 37vw; height: 300px; background: #333; color: #secret_rapper span { float: left; } .vertical #secret_rapper { margin-right: 10px; } .vertical #secret_rapper span { float: left; clear: both; } -.nopaint #brush_rapper { min-height: 50px; min-width: 50px; } +.nopaint #brush_rapper { min-height: 70px; min-width: 50px; } #nopaint_rapper.hidden { display: none; diff --git a/index.html b/index.html index f068683..2419110 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,7 @@
. - . +
@@ -28,11 +28,11 @@ x char

+ add -
diff --git a/js/tool.js b/js/tool.js index 0ad23b9..23c96ae 100644 --- a/js/tool.js +++ b/js/tool.js @@ -162,6 +162,5 @@ var HiddenCheckbox = BlurredCheckbox.extend({ update: function(state){ this.el.innerHTML = state ? this.on : this.off if (this.memorable) { localStorage.setItem("ascii.tools." + this.name, !! state) } - console.trace() } }) diff --git a/js/ui/controls.js b/js/ui/controls.js index 00cb14c..a2b0c7b 100644 --- a/js/ui/controls.js +++ b/js/ui/controls.js @@ -182,6 +182,7 @@ var controls = (function(){ this.update(state) } +/* controls.nopaint = new HiddenCheckbox (nopaint_toggle) controls.nopaint.memorable = true controls.nopaint.on = "N" @@ -189,6 +190,7 @@ var controls = (function(){ var state = nopaint.toggle(state) this.update(state) } +*/ // diff --git a/js/ui/nopaint.js b/js/ui/nopaint.js index d6b0004..e3fb03c 100644 --- a/js/ui/nopaint.js +++ b/js/ui/nopaint.js @@ -11,11 +11,13 @@ var nopaint = (function(){ controls.paint = new Tool (nopaint_paint_el) controls.paint.use = function(state){ nopaint.play() + nopaint_pause_el.classList.toggle("hidden", false) } controls.nopaint_pause = new Tool (nopaint_pause_el) controls.nopaint_pause.use = function(state){ nopaint.pause() + nopaint_pause_el.classList.toggle("hidden", true) } // use own stepwise clock to drive tweens @@ -33,6 +35,7 @@ var nopaint = (function(){ nopaint.toggle = function(state){ var state = typeof state == "boolean" ? state : nopaint_rapper.classList.contains("hidden") nopaint_rapper.classList.toggle("hidden", ! state) + nopaint_pause_el.classList.toggle("hidden", true) document.body.classList.toggle("nopaint", state) return state } @@ -359,5 +362,6 @@ var nopaint = (function(){ nopaint.add_tool( new StarsTool({ weight: 6 }) ) nopaint.regenerate_weights() + nopaint.toggle(true) return nopaint })() -- cgit v1.2.3-70-g09d2