Commit 9b2c740b authored by Bui's avatar Bui

prevent version link from being clicked during play on mobile

parent 3d764eb6
...@@ -240,4 +240,8 @@ kbd{ ...@@ -240,4 +240,8 @@ kbd{
color: #FFFFFF; color: #FFFFFF;
text-decoration: none; text-decoration: none;
cursor: default; cursor: default;
} }
\ No newline at end of file
.version-hide{
pointer-events: none;
}
...@@ -59,6 +59,7 @@ class View{ ...@@ -59,6 +59,7 @@ class View{
this.touchDrumDiv = document.getElementById("touch-drum") this.touchDrumDiv = document.getElementById("touch-drum")
this.touchDrumImg = document.getElementById("touch-drum-img") this.touchDrumImg = document.getElementById("touch-drum-img")
this.gameDiv.classList.add("touch-visible") this.gameDiv.classList.add("touch-visible")
document.getElementById("version").classList.add("version-hide")
pageEvents.add(this.canvas.canvas, "touchstart", this.ontouch.bind(this)) pageEvents.add(this.canvas.canvas, "touchstart", this.ontouch.bind(this))
...@@ -954,6 +955,7 @@ class View{ ...@@ -954,6 +955,7 @@ class View{
pageEvents.remove(this.touchFullBtn, "click") pageEvents.remove(this.touchFullBtn, "click")
pageEvents.remove(this.touchPauseBtn, "click") pageEvents.remove(this.touchPauseBtn, "click")
this.gameDiv.classList.remove("touch-visible") this.gameDiv.classList.remove("touch-visible")
document.getElementById("version").classList.remove("version-hide")
delete this.touchDrumDiv delete this.touchDrumDiv
delete this.touchDrumImg delete this.touchDrumImg
delete this.touchFullBtn delete this.touchFullBtn
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment