Hello
Try this:
Create a folder:
- mobile
- scene-map.ts
In scene-map.ts
import { RpgGui, PrebuiltGui, RpgSceneMapHooks } from '@rpgjs/client'
const sceneMap: RpgSceneMapHooks = {
onAfterLoading() {
if (!isMobileDevice()) {
RpgGui.hide(PrebuiltGui.Controls);
}
}
}
function isMobileDevice() {
return window.innerWidth <= 768;
}
export default sceneMap
In rpg.toml
:
modules = [
'./main',
'@rpgjs/mobile-gui',
'./mobile' # add after
]