summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authoruntir_l <87096069+untir-l@users.noreply.github.com>2022-06-11 16:15:23 +0000
committeruntir_l <87096069+untir-l@users.noreply.github.com>2022-06-11 16:18:20 +0000
commit023103612eeeb8681b65ec5e9114d206b2d9a1dc (patch)
tree7082030a96ae4a1eeedd52e85f43094cfba92a6e /web
parent4f6198b965357ca63daf24d7767be715987fe58b (diff)
downloadhitomezashi-023103612eeeb8681b65ec5e9114d206b2d9a1dc.tar
hitomezashi-023103612eeeb8681b65ec5e9114d206b2d9a1dc.tar.gz
hitomezashi-023103612eeeb8681b65ec5e9114d206b2d9a1dc.zip
Add screenshot of web UI to README.md, add back download button, misc.
Added assert(0) to the end of main() in hitomezashi_web.c indicating that it is unreachable.
Diffstat (limited to 'web')
-rw-r--r--web/hitomezashi_web.c3
-rw-r--r--web/hitomezashi_web_shell.html4
2 files changed, 5 insertions, 2 deletions
diff --git a/web/hitomezashi_web.c b/web/hitomezashi_web.c
index 994eaa5..7e756ff 100644
--- a/web/hitomezashi_web.c
+++ b/web/hitomezashi_web.c
@@ -3,6 +3,7 @@
#include "emscripten.h"
#include "hitomezashi.h"
#include "hitomezashi_utils.h"
+#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
@@ -21,7 +22,7 @@ int EMSCRIPTEN_KEEPALIVE main(void) {
emscripten_set_main_loop(main_loop, -1, true);
- return EXIT_SUCCESS;
+ assert(0); // This should never be reached
}
void EMSCRIPTEN_KEEPALIVE main_loop(void) {
diff --git a/web/hitomezashi_web_shell.html b/web/hitomezashi_web_shell.html
index e0e23d4..8e53afe 100644
--- a/web/hitomezashi_web_shell.html
+++ b/web/hitomezashi_web_shell.html
@@ -58,8 +58,10 @@
<p><label>foreground colour: <input name="fg_colour" type="color"></label></p>
<p><label>background colour: <input name="bg_colour" type="color"></label></p>
</form>
-
+ <br>
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" tabindex=-1></canvas>
+ <br>
+ <button id="downloadCanvas">download as image</button>
<script type='text/javascript'>
var Module = {
canvas: (function () {