Repository navigation
API Class UIControlMapper
Defined in: src/plugins/ui/runtime/UIControlMapper.ts:172
A rebinding screen for one player: put it on any node (it draws on a screen canvas of its own, or
just above a game's canvas it's under). Rows list the actions (actions, or every defined action), one per
part for a composite binding (Move Up, Move Down…), with a keyboard and a gamepad cell. Clicking
a cell (with the mouse, or submit on it after focus navigation brought focus there) waits for
the player's next press (PlayerInput.rebind, adding a binding when the cell is empty; Escape
cancels, as does hiding or removing the screen, or changing player, while it waits) and shows
any conflict. Delete or Backspace on the focused cell, or Unbind (for the cell last
focused), removes its binding (PlayerInput.unbind). Reset to defaults drops the
player's changes; Save writes them with saveBindings.
new UIControlMapper(): UIControlMapper;UIControlMapper
accentColor: Color;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:213
The focused button's border (shown after mouse use too), and the cell waiting for a press.
actionLabels: Record<string, string> = {};Defined in: src/plugins/ui/runtime/UIControlMapper.ts:222
Display names by action name ({ jump: "Jump", "game.Vehicle:honk": "Horn" }); others are title-cased.
actions: string = "";Defined in: src/plugins/ui/runtime/UIControlMapper.ts:176
The actions to list, comma-separated ("jump, move, game.Vehicle:honk"); empty lists every action of every action set but the engine's UI actions (engine.UIActions, listed only when named here).
backgroundColor: Color;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:208
cancelControls: string = "";Defined in: src/plugins/ui/runtime/UIControlMapper.ts:191
The controls that cancel a rebind, comma-separated ("<Keyboard>/escape, <Gamepad>/start"). Empty: the engine's
default, Escape and the gamepad's back button (<Gamepad>/select, ADR 0656).
cellColor: Color;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:209
fontSize: number = 18;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:205
gamepad: boolean = true;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:182
Show the gamepad column.
glyphSize: number = 30;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:207
Glyph height in UI pixels.
holdToToggleActions: string = "";Defined in: src/plugins/ui/runtime/UIControlMapper.ts:199
Button actions with a press-to-toggle switch (hold-to-toggle), comma-separated.
hoverColor: Color;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:210
invertYActions: string = "";Defined in: src/plugins/ui/runtime/UIControlMapper.ts:195
Vector or axis actions with an Invert Y toggle, comma-separated ("look").
keyboard: boolean = true;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:180
Show the keyboard (and mouse) column.
modal: boolean = false;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:178
Keep focus in the screen (its canvas's modal) while it's shown. Only for the canvas it makes; under a game's canvas, set that canvas's modal.
mutedColor: Color;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:215
player: number = 0;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:174
The player's index.
pressedColor: Color;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:211
profile: string = "";Defined in: src/plugins/ui/runtime/UIControlMapper.ts:184
Profile name for saveBindings (empty: player<index>).
repeatActions: string = "";Defined in: src/plugins/ui/runtime/UIControlMapper.ts:201
The button actions that repeat when repeat is on, comma-separated (empty: every button action).
sensitivityActions: string = "";Defined in: src/plugins/ui/runtime/UIControlMapper.ts:197
Actions with a sensitivity stepper, comma-separated.
showAccessibility: boolean = false;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:193
Show the accessibility section below the bindings: the rows the next four fields ask for, then repeat and the stick dead zone.
text: UIControlMapperText;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:220
Words it shows (change them to translate). Display names for actions go in actionLabels.
textColor: Color = Color.white;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:214
timeout: number = 10;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:186
Seconds to wait for a press before giving up (0: wait until a press or a cancel control).
title: string = "Controls";Defined in: src/plugins/ui/runtime/UIControlMapper.ts:202
warningColor: Color;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:217
Conflicting bindings and warnings.
width: UILength = "720";Defined in: src/plugins/ui/runtime/UIControlMapper.ts:204
The panel's width in UI pixels (720), a percentage, or "auto".
get conflicts(): readonly string[];Defined in: src/plugins/ui/runtime/UIControlMapper.ts:259
The conflicts the last rebind reported, as "<context>: <action>".
readonly string[]
get enabled(): boolean;Defined in: src/engine/core/Component.ts:63
boolean
set enabled(value): void;Defined in: src/engine/core/Component.ts:67
boolean
void
get focusedCell(): UIControlMapperCell | null;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:268
The binding cell that has focus (ADR 0340), or null when focus is elsewhere (an accessibility
row, a button, another screen). Delete and Backspace unbind it. To move focus, set a cell's
button.focused.
UIControlMapperCell | null
get gameObject(): GameObject;Defined in: src/engine/core/Component.ts:43
Unity-style alias for node.
get isActiveAndEnabled(): boolean;Defined in: src/engine/core/Component.ts:74
True when enabled, the node is active in the hierarchy, and the node is in a loaded world.
boolean
get node(): GameObject;Defined in: src/engine/core/Component.ts:38
The node this component is on.
get owner(): GameObject;Defined in: src/engine/core/Component.ts:51
The node this component acts for: the node itself when attached directly, or the parent node when this component lives on a component node (ADR 0009).
get rebinding():
| {
action: string;
device: UIControlMapperDevice;
}
| null;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:249
The rebind being waited for, or null.
| {
action: string;
device: UIControlMapperDevice;
}
| null
get resetButton(): UIButton | null;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:278
UIButton | null
get rows(): readonly UIControlMapperRow[];Defined in: src/plugins/ui/runtime/UIControlMapper.ts:239
The rows as last shown (empty before the first frame).
readonly UIControlMapperRow[]
get saveButton(): UIButton | null;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:282
UIButton | null
get settings(): readonly UIControlMapperSetting[];Defined in: src/plugins/ui/runtime/UIControlMapper.ts:244
The accessibility rows as last shown (empty unless showAccessibility).
readonly UIControlMapperSetting[]
get status(): string;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:254
The status line ("Press a key… (Esc to cancel)", a conflict, "Saved.").
string
get time(): Readonly<TimeState>;Defined in: src/engine/core/Component.ts:99
This component's World's clock (ADR 0032): the same values as Time, but safe to read
outside the World's frame too (after an await, say).
Readonly<TimeState>
get transform(): Transform;Defined in: src/engine/core/Component.ts:57
The Transform of the node this component is on, if it has one.
get unbindButton(): UIButton | null;Defined in: src/plugins/ui/runtime/UIControlMapper.ts:274
The Unbind, Reset and Save buttons (null before the first frame). Unbind acts on the focused binding cell, or the one last focused.
UIButton | null
get world(): WorldHandle;Defined in: src/engine/core/Component.ts:88
A handle on this component's World (ADR 0132): the same one Engine.findWorld returns. Load
a scene into it, pause, connect or destroy it: this.world.loadScene("scenes/level2.scene.json").
Throws for a World no Engine owns.
instantiate(prefabPath, options?): GameObject;Defined in: src/engine/core/Component.ts:109
Instantiate a prefab in this component's World (ADR 0034), like GameObject.instantiate.
Use it in code that may run after an await: by then the frame is over and the current World
is the Engine's default one, which may not be this component's. A parent from another
World throws.
string
InstantiateOptions = {}
This wiki is generated from docs/wiki/ and the myco module's source on every push to master. Change pages there in a pull request: edits made here are not kept.
Basics
Gameplay
Rendering
Audio
- Playing sound
- Why is there no sound?
- Playlists
- Interactive music
- Sound generators
- Spatial audio
- Audio mixer
- Live mixing
- Loudness
- Audio profiler
- Audio takes
Reference