access library
Accessibility for a game on flutter3d, past what the engine's settings already do: rings in the colour a player chose for what they mean, roles moved apart for the player's colour vision, and what happens in the game spoken to a screen reader.
- RoleRings: the high-contrast look's ring colour for a role, read from the player's settings every frame.
- RolesApart: which palette colour each colliding role should take, so the roles seen together stay apart for the player's deficiency.
- SpokenEvents: a view plugin that says the events of a table aloud through Flutter's semantics, once each, rate-limited by step.
- FlashLimit: a full-screen brightness held to three flashes in any second, the gate a fade, a hit or lightning goes through.
The correction of the whole picture (ColorVisionLook), the role table
(ColorRoles) and the settings a player picks them in are
flutter3d_game's, and this library builds on them rather than repeating
them.
Classes
- FlashLimit
- Holds a brightness that changes over time to at most Wcag.flashesPerSecond flashes in any one second.
- RoleRings
-
The colour of the ring the high-contrast look draws round something that
matters, by what it means:
'threat','pickup','key.brass'. - RolesApart
- Colour roles moved apart for the player's colour vision: the palette choice each colliding role should take so that the roles seen together stay apart for the eyes the player said they have.
-
Spoken<
T extends BusEvent> - One row of a SpokenEvents table: an event type, and what is said when one arrives.
- SpokenEvents
- Events spoken to a screen reader: what happened in the game, said aloud through the platform's own reader as it happens.
Functions
-
announceIn(
BuildContext context) → Announce -
An Announce that speaks on the view
contextis in, in the direction its text runs there — the ambient Directionality, which is the one the app already lays its words out in. -
announceTo(
FlutterView view, {TextDirection? direction}) → Announce -
An Announce that speaks on
view, as a polite announcement indirection— the platform's own when not given, see platformTextDirection. -
announceToImplicitView(
{TextDirection? direction}) → Announce - An Announce that speaks on the application's implicit view, looked up each time; with none (a multi-view embedding) it says nothing. The default of SpokenEvents, for a game with one window.
-
platformTextDirection(
) → TextDirection - The direction text runs in the platform's own language: right to left for the scripts written that way, left to right for everything else.