Add touch controls for mobile support

This commit is contained in:
Flashfyre committed 2023-12-25 15:03:50 -05:00
1 parent de29ea9c05
commit 41d1a84c76
8 files changed
+332 -24

No files matched your search

+3
View File
@@ -280,6 +280,9 @@ export default class UI extends Phaser.GameObjects.Container {
if (chainMode && this.mode && !clear)
this.modeChain.push(this.mode);
this.mode = mode;
const touchControls = document.getElementById('touchControls');
if (touchControls)
touchControls.dataset.uiMode = Mode[mode];
this.getHandler().show(args);
}
resolve();