flutter3d_screens library
The screens a game has that are not the game.
Settings, volumes, rebinding, and where a licence's attribution goes: the parts a player uses before playing, after playing, and when something has to change. None of it draws a frame or steps a simulation.
Extracted when the second game wanted it, which is this repository's
habit rather than a new rule — CameraRig says the same thing about itself,
and flutter3d_bridge exists for the same reason. What triggered it was
accessibility: rebinding a control is the accommodation that matters most,
the platformer had grown one, and the alternative was four hundred lines of
panel copied into the crypt to give it the same.
What is deliberately not here is anything a particular game says. The credits are a widget the caller hands in, the list of rebindable actions is the caller's, and the panel has never known what a coin or a monster is.
Classes
- AutomapPainter
- The painting, public so a test can ask it what it would draw.
- AutomapView
- The automap, drawn: floor where the player has walked, walls where it stopped, an arrow where they stand.
- Credit
- One piece of work the game did not make, and what is owed for it.
- CreditsSection
- Who made the art, wherever the game is shown.
- DemoFile
- Where the last run is kept as what the player did.
- DragLook
- Looking around by dragging, where there is no pointer to lock.
- FileStorage
- Documents kept as files, one per name, in a directory this platform owns.
- LevelLoadFailed
- Shown when asset threw rather than loaded.
- LoadingScreen
- Shown between a renderer that has started and a level that has not yet.
- PadPresses
- The pad, as a screen reads it rather than as the game does.
- Rebinding
- Moving a control to somewhere the player can reach.
- RendererFailure
- Shown before the renderer exists, and if it never does.
- SaveFile
- Where a run in progress is kept between launches.
- SettingsCubit
-
The settings screen as a state machine rather than as
setState. - SettingsFile
- Where a game keeps what the player changed.
- SettingsOverlay
-
The gear, and the panel it opens. The mouse twin of
settingsKeys. - SettingsPanel
- Volume sliders and the keys, over the top of the paused game.
- SettingsState
- What the settings screen is doing.
- Storage
- Where a game keeps the small documents a player's choices live in.
- TapToRestart
- Covers the game and restarts it when tapped.
Constants
-
settableBuses
→ const List<
AudioBus> - The buses a player is offered, in the order the panel shows them.
Functions
-
applicationDirectory(
{required String appName, required TargetPlatform platform, required Map< String, String> environment, required String temporary}) → String? - Where this platform keeps a small document belonging to one application.
-
applySavedVolumes(
GameConfig config, Mixer mixer) → void -
Copies every saved volume into
mixer. -
busesIn(
Iterable< SoundDef> sounds) → List<AudioBus> -
The buses
soundsactually reaches, in the order settableBuses lists. -
clockText(
double? seconds, {bool thousandths = false, String? none}) → String - Minutes and seconds, which is how a time is read rather than how it is counted.
-
configureForTouch(
) → void - Locks to landscape and hides the system bars, on a device played by touch.
-
defaultStorage(
String appName, {IssueSink? onIssue}) → Storage - The storage a build outside the browser gets.
-
ownedBindings(
GameConfig config, Bindings defaults()) → Bindings - The one table of controls: the one the devices read and the one the file saves.
-
settingsKeys(
KeyEvent event, SettingsCubit settings, {required void opening(), bool canOpen = true}) → KeyEventResult? - The keys that belong to the settings rather than to the game.