Settings & screen

The player's Settings window, the screen ratio and its bars, and the image viewer.

Settings

Per device, separate from save slots, in the settings window, grouped in tabs: General (language, screen ratio, hide idle mouse, fullscreen, dev panel, erase all data), Text (text size, font, text box opacity, text speed, auto-play pause, skip options, reduce shaking and flashes, read text aloud), Audio (master/music/sfx/voice/movies, voices play to the end, lower music under voices, voice language when the game has more than one), Voices (a portrait per voiced character; pick one, then its volume slider and mute button; below them the system voice picker when a character has system voice clips; hidden when no character has a voice, see Voices) and Controls (a picture of the keyboard or controller: press a key / button, then pick what it does; see Input). General also has Vibration, shown only while the player uses a controller or a touch screen that can buzz (keyboards do not vibrate). Controls is hidden while the player uses touch, and comes back on the first key or button press. See Saves & settings.

The choices and defaults for the reading options are in src/content/scenes.ts:

text: {
  sizes: [0.85, 1, 1.15, 1.3, 1.5],        // Text size
  defaultSize: 1,
  fonts: {                                  // Font: the first is the default
    game: { name: 'Game font' },
    sans: { name: 'Plain (easy to read)', family: 'Verdana, sans-serif' },
  },
  defaultBoxOpacity: 1,
  logLines: 200,
},
comfort: { reduceMotionByDefault: 'system', reducedFlash: 0.25 },
rumble: { onShake: true, strength: 0.6 },

Your own settings

The game's own settings go in src/content/settings.ts, each with its default (its type comes from it). They are kept per device like the engine's, erased with Erase all data, and a setting added later gets its default for players who already have settings saved.

// src/content/settings.ts
export default defineSettings({
  bigCursor: false,
  hints: 'on' as 'on' | 'off',          // a few choices
  brightness: 0.5,
})

game.settings.get('hints')              // 'on'
game.settings.set('hints', 'off')
const hints = useGameSetting('hints')   // React (from '@/core/managers/gameSettings')

A row for one in the Settings window (src/content/windows/settings/), with the helpers from parts.tsx:

<SettingSwitch gameSetting="bigCursor" label={t('Big cursor')} />
<SettingSelect label={t('Hints')} value={useGameSetting('hints')} onChange={putGame('hints')}
  options={[{ value: 'on', label: t('On') }, { value: 'off', label: t('Off') }]} />
<SettingSlider label={t('Brightness')} value={useGameSetting('brightness')} onChange={putGame('brightness')} />  // 0..1, shown as %

Screen ratio

The game runs in one box, #game-screen, 16:9 by default, with pure black bars around it. Players pick 16:9, 16:10, 4:3, 21:9 or "Fill screen" in Settings → General (settings.screenRatio).

The choices, default, bar colour, "short screen" height, the map zoom and the image viewer's zoom limit and speeds are set in src/content/config/screen.ts:

export default defineScreen({
  ratios: ['16:9', '16:10', '4:3', '21:9', 'fill'],
  defaultRatio: '16:9',
  barColor: '#000',
  shortHeight: 520,
  landscapeOnly: true,             // phones held upright see "turn your device" instead of the game
  cursorAutoHide: [0, 10, 5],      // seconds, 0 = never
  defaultCursorAutoHide: 0,
  map: { tilesHigh: 12, textHeight: 720, pixelPerfect: false },   // see Maps → Zoom
  imageViewer: { maxZoom: 4, zoomPerSecond: 2.5, panSpeed: 900, doubleTapZoom: 2.5, background: '#000' },
})
sx={{ maxHeight: 'calc(100cqh - 32px)', [SHORT_SCREEN]: { p: 0.5 } }}

Image viewer

<ImageViewer pictures start? caption onClose /> (src/core/ui/ImageViewer.tsx) shows pictures over the whole game screen with zoom and pan. The Extras gallery uses it. Each picture is { layers: [url, …], locked? } (layers stack, bottom first); with more than one, dots show which is on screen.