summaryrefslogtreecommitdiff
path: root/web/web_ui.h
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-02 15:20:34 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-02 15:20:34 -0700
commit237359d107c5f8fb3e1f7a3532696eb19a6c56fc (patch)
tree192f6007e9a59c334477dd6ab6ce209b067614ba /web/web_ui.h
parent09c23f60189223db58d98e49ee94df947667662d (diff)
downloaddartboat-237359d107c5f8fb3e1f7a3532696eb19a6c56fc.tar.gz
dartboat-237359d107c5f8fb3e1f7a3532696eb19a6c56fc.tar.xz
web: buffer player info and flush on state change
Constant calls from Wasm to JS to replace unchanged elements in the DOM is not very efficient.
Diffstat (limited to 'web/web_ui.h')
-rw-r--r--web/web_ui.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/web_ui.h b/web/web_ui.h
index fa961fb..a302e0a 100644
--- a/web/web_ui.h
+++ b/web/web_ui.h
@@ -3,6 +3,12 @@
#include <stdbool.h>
+void ui_flush();
+
+void ui_flush_player_info(int pn);
+void ui_set_player_avg(int pn, double avg);
+
+void update_player_name(int pn, char *str);
void update_player_sugg(int pn, int rem);
void update_player_avg(int pn, int n_darts);
void update_player_rem(int pn, int rem);