fix: mobile entry click and add fullscreen button

- Delay virtual controls creation until after game starts (ctrl overlay
  was intercepting title screen touches)
- Add touchstart handler on game container for mobile entry
- Add fullscreen button overlay in top-right corner
- Hide title text after game starts
This commit is contained in:
Mai
2026-07-04 08:36:15 +08:00
parent dfb738f406
commit 3376c3e333
3 changed files with 38 additions and 6 deletions
+3 -2
View File
@@ -83,7 +83,8 @@ c.onmouseup = (ev) => {
// ─── Mobile virtual controls ───
if (is_touch) {
// Called from main.js after game start
create_touch_controls = () => {
let ctrl = document.createElement('div');
ctrl.id = 'ctrl';
ctrl.innerHTML =
@@ -148,5 +149,5 @@ if (is_touch) {
if (t.identifier === touch_id) touch_id = null;
}
});
}
};