diff options
-rw-r--r-- | web/dartboat_wasm.c | 2 | ||||
-rw-r--r-- | web/static/dartboat.js | 4 | ||||
-rw-r--r-- | web/static/index.html | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/web/dartboat_wasm.c b/web/dartboat_wasm.c index bc384dc..4c9973b 100644 --- a/web/dartboat_wasm.c +++ b/web/dartboat_wasm.c @@ -550,7 +550,7 @@ void prompt_handle_clear() if (pm == PM_NONE) return; - EM_ASM(promptClear()); + EM_ASM({setPromptInput($0)}, ""); prompt_handle_on_change(); } diff --git a/web/static/dartboat.js b/web/static/dartboat.js index 371af93..428ff85 100644 --- a/web/static/dartboat.js +++ b/web/static/dartboat.js @@ -34,10 +34,6 @@ function promptGet() { return str; } -function promptClear() { - document.getElementById('prompt-input').textContent = ''; -} - function setPromptActive() { document.getElementById('prompt').classList.add('active') } diff --git a/web/static/index.html b/web/static/index.html index b7f915e..2af1f35 100644 --- a/web/static/index.html +++ b/web/static/index.html @@ -67,11 +67,15 @@ </div> <div id="help-modal" class="modal"> <div class="modal-content"> - <p><strong>dartboat</strong> uses an internal representation of a specification dartboard. Darts are thrown following a normal distribution, with the resultant coordinates used to calculate the segments in which they land. The idea is that this provides a more realistic opponent than picking points at random.</p> + <h2>dartboat</h2> + <p>dartboat uses an internal representation of a specification dartboard. Darts are thrown following a normal distribution, with the resultant coordinates used to calculate the segments in which they land. The idea is that this provides a more realistic opponent than picking points at random.</p> <p> <h2>Settings</h2> <p><em>stdev</em> — the standard deviation of the bot's throws in millimetres. A value of 24 translates to a three-dart average of roughly 35. A value of 13 would be a 65 average, and a value of 8 a 95 average.</p> <p><em>delay</em> — milliseconds it takes the bot to throw each dart.</p> + <h2>Interface</h2> + <p>To avoid destructive actions being a misclick away, certain actions require two presses—one to activate the button and another to trigger it.</p> + <p>The controls are designed to be keyboard-friendly. The keys should be fairly intuitive for the most part.</p> <h2>Info</h2> <p>dartboat is <a href="https://retarded.software/dartbot.git/" target="_blank">free and open-source software</a>. It is written in C and compiled to WebAssembly for the web target. JavaScript is used to handle the interactive elements.</p> </div> |