diff --git a/src/controls.ts b/src/controls.ts index 640ab277..d4522eae 100644 --- a/src/controls.ts +++ b/src/controls.ts @@ -580,7 +580,7 @@ contro.on('release', ({ command }) => { export const f3Keybinds: Array<{ key?: string, - action: () => void, + action: () => void | Promise, mobileTitle: string enabled?: () => boolean }> = [ diff --git a/src/optionsStorage.ts b/src/optionsStorage.ts index 335a9ebc..165bf331 100644 --- a/src/optionsStorage.ts +++ b/src/optionsStorage.ts @@ -34,6 +34,7 @@ const defaultOptions = { touchButtonsOpacity: 80, touchButtonsPosition: 12, touchControlsPositions: getDefaultTouchControlsPositions(), + touchControlsSize: getTouchControlsSize(), touchMovementType: 'modern' as 'modern' | 'classic', touchInteractionType: 'classic' as 'classic' | 'buttons', gpuPreference: 'default' as 'default' | 'high-performance' | 'low-power', @@ -138,6 +139,16 @@ function getDefaultTouchControlsPositions () { } as Record } +function getTouchControlsSize () { + return { + joystick: 60, + action: 36, + break: 36, + jump: 36, + sneak: 36, + } +} + // const qsOptionsRaw = new URLSearchParams(location.search).getAll('setting') const qsOptionsRaw = appQueryParamsArray.setting ?? [] export const qsOptions = Object.fromEntries(qsOptionsRaw.map(o => {