summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Worthe <justin@worthe-it.co.za>2018-06-03 20:50:15 +0200
committerJustin Worthe <justin@worthe-it.co.za>2018-08-05 23:03:52 +0200
commit0ebd24ea3f0556d147d44e9c7b2d0c90b042bd13 (patch)
treeaebd112df0f719360cebca4584ead28d22357429
parentdada176e8400d1c3cc8fb51cb1d7864485851059 (diff)
Hid cursor on the canvas
You can put a different canvas on with a sprite. This isn't as universally useful.
-rw-r--r--gate/src/core/sdl/mod.rs2
-rw-r--r--gate_build/src/html/index.html2
2 files changed, 3 insertions, 1 deletions
diff --git a/gate/src/core/sdl/mod.rs b/gate/src/core/sdl/mod.rs
index 767eb38..e575a31 100644
--- a/gate/src/core/sdl/mod.rs
+++ b/gate/src/core/sdl/mod.rs
@@ -74,6 +74,8 @@ pub fn run<AS: AppAssetId, AP: App<AS>>(info: AppInfo, mut app: AP) {
.accelerated()
.build().unwrap();
+ sdl_context.mouse().show_cursor(false);
+
init_gl(&video);
let mut renderer = build_renderer(&info, &sdl_renderer);
diff --git a/gate_build/src/html/index.html b/gate_build/src/html/index.html
index 6a13089..61da126 100644
--- a/gate_build/src/html/index.html
+++ b/gate_build/src/html/index.html
@@ -6,7 +6,7 @@
<style>
* { margin:0; padding:0; }
html, body { width:100%; height:100%; background-color: black; }
- canvas { display: block; background-color: black; }
+ canvas { display:block; background-color: black; cursor: none; }
video { display: none; }
#gate-wrapper-div { display: block; width: 100%; height: 100%; background-color: black; overflow: hidden }
h1 { font-family:Arial,Helvetica,sans-serif;font-size:50px;color:white;text-align:center;padding-top:25px; }