@origingame/engine 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/og.mjs +1 -1
- package/dist/web/origin-engine.d.ts +255 -5
- package/dist/web/origin-engine.js +1584 -125
- package/dist/web/origin-engine_bg.wasm +0 -0
- package/dist/web/origin-engine_bg.wasm.d.ts +80 -3
- package/dist/web-publish/origin-engine-lanes.js +1288 -82
- package/dist/web-publish/origin-engine-lanes_bg.wasm +0 -0
- package/dist/web-publish/origin-engine.d.ts +199 -6
- package/dist/web-publish/origin-engine.js +1285 -79
- package/dist/web-publish/origin-engine_bg.wasm +0 -0
- package/dist/web-publish/origin-engine_bg.wasm.d.ts +65 -4
- package/dist/web-publish-2d/origin-engine-lanes.js +1285 -79
- package/dist/web-publish-2d/origin-engine-lanes_bg.wasm +0 -0
- package/dist/web-publish-2d/origin-engine.d.ts +198 -5
- package/dist/web-publish-2d/origin-engine.js +1282 -76
- package/dist/web-publish-2d/origin-engine_bg.wasm +0 -0
- package/dist/web-publish-2d/origin-engine_bg.wasm.d.ts +64 -3
- package/knowledge/README.md +2 -1
- package/knowledge/guides/three-to-og.md +393 -0
- package/knowledge/knowledge.json +2 -1
- package/knowledge/looks/catalogue.json +40 -40
- package/knowledge/package.json +3 -2
- package/knowledge/scaffold/distribution.json +14 -0
- package/knowledge/scaffold/origin-engine.json +2 -2
- package/knowledge/scaffold/template/README.md +2 -1
- package/knowledge/scaffold/template/assets/audio/sting.ogt +10 -0
- package/knowledge/scaffold/template/assets/timelines/intro.ogt +101 -0
- package/knowledge/scaffold/template/assets/timelines/narration.srt +11 -0
- package/knowledge/scaffold/template/host.d.ts +46 -0
- package/knowledge/scaffold/template/package.json +1 -1
- package/knowledge/scaffold/template/project.ogt +1 -1
- package/knowledge/scaffold/template/src/main.ts +1 -1
- package/knowledge/scaffold/template/tests/frames.ts +134 -0
- package/knowledge/scaffold/template/tests/intro.og.ts +65 -0
- package/knowledge/scaffold/template/tests/smoke.og.ts +30 -36
- package/knowledge/scaffold/template/tsconfig.json +1 -1
- package/knowledge/scripts/mount.ts +2 -1
- package/knowledge/scripts/validate.ts +159 -31
- package/knowledge/skills/og-audio/SKILL.md +2 -2
- package/knowledge/skills/og-build/SKILL.md +29 -7
- package/knowledge/skills/og-core/SKILL.md +31 -5
- package/knowledge/skills/og-feel/SKILL.md +2 -2
- package/knowledge/skills/og-game/SKILL.md +1331 -16
- package/knowledge/skills/og-i18n/SKILL.md +7 -7
- package/knowledge/skills/og-model/SKILL.md +374 -0
- package/knowledge/skills/og-platform-sdk/SKILL.md +2 -1
- package/knowledge/skills/og-taste/SKILL.md +82 -73
- package/knowledge/skills/og-ui/SKILL.md +80 -58
- package/knowledge/wiki/ai.md +20 -20
- package/knowledge/wiki/anim.md +392 -41
- package/knowledge/wiki/atmosphere.md +36 -13
- package/knowledge/wiki/audio.md +18 -18
- package/knowledge/wiki/camera.md +19 -13
- package/knowledge/wiki/commands.md +19 -13
- package/knowledge/wiki/debug.md +414 -0
- package/knowledge/wiki/game.md +8 -8
- package/knowledge/wiki/i18n.md +7 -7
- package/knowledge/wiki/index.md +317 -8
- package/knowledge/wiki/input.md +47 -47
- package/knowledge/wiki/load.md +238 -70
- package/knowledge/wiki/math.md +2607 -0
- package/knowledge/wiki/nav.md +34 -34
- package/knowledge/wiki/net.md +340 -0
- package/knowledge/wiki/path.md +402 -0
- package/knowledge/wiki/physics.md +95 -95
- package/knowledge/wiki/platform.md +463 -29
- package/knowledge/wiki/probe.md +681 -67
- package/knowledge/wiki/reflect.md +29 -17
- package/knowledge/wiki/render.md +4993 -1998
- package/knowledge/wiki/rng.md +14 -14
- package/knowledge/wiki/shapes.md +727 -0
- package/knowledge/wiki/stream.md +15 -15
- package/knowledge/wiki/system.md +8 -8
- package/knowledge/wiki/systems.md +2 -2
- package/knowledge/wiki/terrain.md +24 -20
- package/knowledge/wiki/tilemap.md +13 -13
- package/knowledge/wiki/time.md +4 -4
- package/knowledge/wiki/timeline.md +396 -0
- package/knowledge/wiki/transform.md +8 -8
- package/knowledge/wiki/tween.md +17 -17
- package/knowledge/wiki/ui.md +560 -654
- package/knowledge/wiki/video.md +157 -0
- package/knowledge/wiki/world.md +36 -36
- package/package.json +4 -3
- package/schema/api.schema.json +28151 -19640
- package/shell/page.ts +26 -2
- package/shell/platform.ts +51 -0
- package/shell/player.ts +15 -2
- package/shell/transport.ts +6 -0
- package/src/depth.ts +71 -0
- package/src/e6.ts +32 -1
- package/src/env.d.ts +5 -1
- package/src/generated/abi.ts +226 -4
- package/src/geom.ts +260 -0
- package/src/index.ts +32 -4
- package/src/light.ts +18 -0
- package/src/math.ts +622 -0
- package/src/node/index.ts +17 -0
- package/src/node/playtest-run.ts +115 -18
- package/src/node/polish.ts +13 -3
- package/src/node/render.ts +291 -0
- package/src/node/run.ts +86 -5
- package/src/p2.ts +19 -1
- package/src/platform-local.ts +2 -0
- package/src/playtest.ts +65 -4
- package/src/runtime.ts +100 -9
- package/src/targets.ts +28 -0
- package/src/trace.ts +169 -0
- package/src/ui-kit/huds.ts +34 -34
- package/src/ui-kit/menus.ts +12 -12
- package/src/ui-kit/settings.ts +11 -2
- package/src/ui-kit/store.ts +18 -18
- package/src/ui-kit/story.ts +6 -4
- package/src/ui-kit/util.ts +8 -8
- package/src/web/shell.ts +59 -1
- package/src/web/worker.ts +105 -4
- package/types/bindings.json +9368 -6619
- package/types/index.d.ts +16377 -11520
package/knowledge/wiki/ui.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# The `ui` module
|
|
4
4
|
|
|
5
|
-
The engine's UI: an immediate-mode toolkit. Systems describe the tree every tick with these calls; the engine lays it out Clay-style,
|
|
5
|
+
The engine's UI: an immediate-mode toolkit. Systems describe the tree every tick with these calls; the engine lays it out Clay-style, styles it with the game's UI style (the placeholder prototype style until the game picks one), draws it over the frame and answers the probe (dump_ui, touch_move_to, move_to_text) from it.
|
|
6
6
|
|
|
7
7
|
The engine opens the frame before the game's systems (from og.Input and the play surface) and closes it after them, so calls belong inside systems; outside one they do nothing and log a warning. Interaction is decided against the previous tick's rectangles, which are also what the probe resolves, so a scripted touch_move_to and a click agree; response edges (clicked, changed, submitted) last one tick.
|
|
8
8
|
|
|
@@ -18,7 +18,7 @@ module ui {
|
|
|
18
18
|
# declarations follow, each quoted below
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
<sub>`api.ogt` line
|
|
21
|
+
<sub>`api.ogt` line 10125</sub>
|
|
22
22
|
|
|
23
23
|
## Contents
|
|
24
24
|
|
|
@@ -29,12 +29,12 @@ module ui {
|
|
|
29
29
|
| [`Cross`](#type-Cross) | enum | Where children sit across the main axis. |
|
|
30
30
|
| [`TextAlign`](#type-TextAlign) | enum | How the lines of a label align. |
|
|
31
31
|
| [`FontRole`](#type-FontRole) | enum | Which configured font text uses; display and mono fall back to body, rounded to display, then body. |
|
|
32
|
-
| [`ButtonVariant`](#type-ButtonVariant) | enum | Button
|
|
32
|
+
| [`ButtonVariant`](#type-ButtonVariant) | enum | Button roles: how the style draws each. |
|
|
33
33
|
| [`ControlSize`](#type-ControlSize) | enum | Control heights from the density (h-control-sm, -md, -lg). |
|
|
34
34
|
| [`Scheme`](#type-Scheme) | enum | The palette: games run on a stage, so dark is the default. |
|
|
35
|
-
| [`DensityMode`](#type-DensityMode) | enum | Control sizes: auto picks touch sizes on a coarse pointer or a play surface under 768 px,
|
|
36
|
-
| [`ThemeColor`](#type-ThemeColor) | enum | A
|
|
37
|
-
| [`TypeStepName`](#type-TypeStepName) | enum | A step of the type ramp
|
|
35
|
+
| [`DensityMode`](#type-DensityMode) | enum | Control sizes by the input the player holds: auto picks touch sizes on a coarse pointer or a play surface under 768 px, mouse sizes otherwise. |
|
|
36
|
+
| [`ThemeColor`](#type-ThemeColor) | enum | A colour role of the UI style in effect (the game's style, or the prototype style before it picks one). |
|
|
37
|
+
| [`TypeStepName`](#type-TypeStepName) | enum | A step of the style's type ramp. |
|
|
38
38
|
| [`SizeRange`](#type-SizeRange) | struct | The bounds of a fit or grow size. |
|
|
39
39
|
| [`FixedSize`](#type-FixedSize) | struct | A fixed size. |
|
|
40
40
|
| [`PercentSize`](#type-PercentSize) | struct | A size relative to the parent. |
|
|
@@ -44,7 +44,7 @@ module ui {
|
|
|
44
44
|
| [`ElementDesc`](#type-ElementDesc) | desc struct | A container: its layout and its look. |
|
|
45
45
|
| [`LabelDesc`](#type-LabelDesc) | desc struct | How a label draws its text. |
|
|
46
46
|
| [`ButtonDesc`](#type-ButtonDesc) | desc struct | A button's look. |
|
|
47
|
-
| [`PanelDesc`](#type-PanelDesc) | desc struct | A card:
|
|
47
|
+
| [`PanelDesc`](#type-PanelDesc) | desc struct | A card: panel, the panel radius, padded and spaced by the style. |
|
|
48
48
|
| [`ScrollAxes`](#type-ScrollAxes) | enum | Which ways a scroll container scrolls. |
|
|
49
49
|
| [`ScrollDesc`](#type-ScrollDesc) | desc struct | A scroll container: the wheel (both axes, deltaX and deltaY) or a drag scrolls it, and a released drag keeps its momentum, slowing over motion.spring.momentum's response (none under reduced motion); it clips its content; a scrollbar on each scrolling axis shows the position, and a press on one grabs and drags it. Nested containers hand off: what the innermost under the pointer cannot take (it reached its end, or does not scroll that way) goes to the one around it. |
|
|
50
50
|
| [`ImageDesc`](#type-ImageDesc) | desc struct | A texture region, or a solid rectangle without a texture. |
|
|
@@ -59,16 +59,16 @@ module ui {
|
|
|
59
59
|
| [`ToggleResult`](#type-ToggleResult) | struct | A toggle's response and its state after this tick's input. |
|
|
60
60
|
| [`FieldResult`](#type-FieldResult) | struct | A text field's response and its text after this tick's input. |
|
|
61
61
|
| [`Viewport`](#type-Viewport) | struct | The play surface the UI lays out in. |
|
|
62
|
-
| [`UiDesc`](#type-UiDesc) | desc struct | How the UI looks: the scheme, the density, its fonts, the contrast, the game's
|
|
62
|
+
| [`UiDesc`](#type-UiDesc) | desc struct | How the UI looks: the scheme, the density, its fonts, the contrast, the game's primary colour, motion, transparency, the icon atlas, the style and the sounds. og.ui.configure takes it in part: a field left out keeps the value the last call (or a look's style) gave it, null clears it. |
|
|
63
63
|
| [`UiSounds`](#type-UiSounds) | desc struct | Sounds the UI plays through og-audio (the ui bus) on its events; null is silent. |
|
|
64
|
-
| [`
|
|
64
|
+
| [`StylePart`](#type-StylePart) | enum | An element class a style dresses with a nine-slice frame. |
|
|
65
65
|
| [`TypeStep`](#type-TypeStep) | struct | One step of the type ramp. |
|
|
66
66
|
| [`ControlSizes`](#type-ControlSizes) | struct | The control, row and header heights and the gutter of the density in effect. |
|
|
67
|
-
| [`UiTheme`](#type-UiTheme) | struct | The
|
|
67
|
+
| [`UiTheme`](#type-UiTheme) | struct | The style values the UI draws with, read-only. |
|
|
68
68
|
| [`UiBuild`](#type-UiBuild) | callback | Builds a container's children: ui calls made inside it nest under the container. |
|
|
69
|
-
| [`og.ui.configure`](#fn-configure) | function | Set how the UI looks (the scheme, density, fonts,
|
|
69
|
+
| [`og.ui.configure`](#fn-configure) | function | Set how the UI looks (the scheme, density, fonts, style, sounds, motion…), typically in GameDesc.start; it takes effect from the next tick. The desc is a partial: a field left out keeps the last UiDesc's value, the one an earlier call or a look's style (og.render.applyLook) gave it, so a settings screen that configures sounds or reducedMotion keeps the style and the fonts; null clears a field to its default (`style: null` goes back to the prototype style). A UI left with no font at all (no font, no style with fonts, no fallback or locale font) warns: it would draw no text. |
|
|
70
70
|
| [`og.ui.viewport`](#fn-viewport) | function | This tick's play surface: the render target's size in CSS pixels, its DPR and safe area, as the host reports them. |
|
|
71
|
-
| [`og.ui.theme`](#fn-theme) | function | The
|
|
71
|
+
| [`og.ui.theme`](#fn-theme) | function | The style values the UI draws with. |
|
|
72
72
|
| [`og.ui.open`](#fn-open) | function | Open a container; the calls until its close() build its children. |
|
|
73
73
|
| [`og.ui.openPanel`](#fn-openPanel) | function | Open a card, closed by close(): og.ui.panel without the callback. |
|
|
74
74
|
| [`og.ui.openScroll`](#fn-openScroll) | function | Open a vertical scroll container, closed by close(): og.ui.scroll without the callback. |
|
|
@@ -79,12 +79,12 @@ module ui {
|
|
|
79
79
|
| [`og.ui.scroll`](#fn-scroll) | function | A vertical scroll container built by `build`: openScroll(id, desc), build(), close(). |
|
|
80
80
|
| [`RichTextDesc`](#type-RichTextDesc) | desc struct | How a rich text paragraph draws: its defaults, which its markup's spans override. |
|
|
81
81
|
| [`RichTextResult`](#type-RichTextResult) | struct | What a rich text's links did this tick. |
|
|
82
|
-
| [`og.ui.richText`](#fn-richText) | function | A paragraph of inline spans from markup, for a string-table message (og.i18n.t) so a translation carries its own emphasis: `[b]bold[/b]` (thickened in the distance field as far as it reaches, plus a second copy one device pixel right), `[color=danger]` or `[color=#ff8800]` (a ThemeColor follows the
|
|
82
|
+
| [`og.ui.richText`](#fn-richText) | function | A paragraph of inline spans from markup, for a string-table message (og.i18n.t) so a translation carries its own emphasis: `[b]bold[/b]` (thickened in the distance field as far as it reaches, plus a second copy one device pixel right), `[color=danger]` or `[color=#ff8800]` (a ThemeColor follows the style), `[size=xl]` (a TypeStepName), `[font=mono]`, `[icon=coin]` (a cell of the icon atlas, one em), `[link=shop]Open the shop[/link]` (accent ink, underlined, focusable by keys and pads; a child element `<id>/shop` of kind link for the probe) and per-glyph motion `[wave]`, `[shake]`, `[pulse]` (by the tick; still under reduced motion). `[[` is a literal bracket. Lines break between the spans' words (a word restyled mid-way stays whole), each as tall as its tallest span on one baseline. Markup it cannot read shows as text and logs a warning. |
|
|
83
83
|
| [`og.ui.label`](#fn-label) | function | MSDF text that wraps at its width (word breaks; between CJK characters under kinsoku, katakana words kept whole; long words between characters) unless nowrap. The probe reads its text. |
|
|
84
|
-
| [`og.ui.button`](#fn-button) | function | A
|
|
84
|
+
| [`og.ui.button`](#fn-button) | function | A button with a label; `clicked` is a press and a release inside it. The probe reads its label. |
|
|
85
85
|
| [`og.ui.image`](#fn-image) | function | A texture region, or a solid rectangle; with ImageDesc.aspect, a fitting side follows the other. |
|
|
86
86
|
| [`og.ui.zoomView`](#fn-zoomView) | function | A zoomable picture (a map, an artwork): two fingers pinch it to zoom about their centre and pan it as they move (og.Pointers), the wheel zooms about the pointer, a drag pans; Tab or a pad focuses it, and then + (= and the keypad's) and - zoom it about its centre, 0 fits it again and the arrows pan it a tenth of its size. It stays on its picture and within its zoom limits; its zoom and centre are UI state (snapshots carry them). Two fingers over a scroll container scroll it the same way, and fling it as they lift. The probe reads its zoom as its value. |
|
|
87
|
-
| [`og.ui.progress`](#fn-progress) | function | A
|
|
87
|
+
| [`og.ui.progress`](#fn-progress) | function | A track filled to a fraction. |
|
|
88
88
|
| [`og.ui.slider`](#fn-slider) | function | A track with a fill and a thumb: a press anywhere on it sets the value and dragging follows. Pass back the value it answers next tick. |
|
|
89
89
|
| [`og.ui.toggle`](#fn-toggle) | function | A switch with a label; a click flips it. Pass back the state it answers next tick. The probe reads its label. |
|
|
90
90
|
| [`og.ui.textField`](#fn-textField) | function | One line of text: a press focuses it with the caret at the press, a drag selects (and scrolls the text past the field's ends), a double click selects a word and a triple click everything; typed text (og.input's TextInput events: the page's typing, the probe's type: and commit:; until a world has had one, a printable key pressed types its US-layout character, and after it keys only edit) replaces the selection at the caret; Backspace, Delete, arrows, Home and End edit, Shift with them selects, Alt or Ctrl with them moves or deletes by words (Ctrl with Home and End: the text's ends); Ctrl or Cmd with A selects all, with C copies and with X cuts (the page's clipboard, through the shell), with Z undoes and with Shift+Z or Y redoes (a history of 100 steps per field, typing undone a word at a time; a text the game sets starts it again); an input method's composition shows underlined at the caret until it commits; Enter submits and leaves, Escape leaves. The text scrolls to keep the caret in view and the caret blinks by the tick (steady under reduced motion). Pass back the text it answers next tick. The probe reads its text, or the placeholder while empty. |
|
|
@@ -93,16 +93,15 @@ module ui {
|
|
|
93
93
|
| [`og.ui.idi`](#fn-idi) | function | The id of the index-th of several siblings of one name: `idi("Slot", 3)` is `Slot#3`. |
|
|
94
94
|
| [`Anchor`](#type-Anchor) | enum | A point of the safe area an anchored group sits at. |
|
|
95
95
|
| [`TransitionKind`](#type-TransitionKind) | enum | How a transition moves its content in and out. Under reduced motion every kind only fades. |
|
|
96
|
-
| [`Tone`](#type-Tone) | enum | A status tone
|
|
96
|
+
| [`Tone`](#type-Tone) | enum | A status tone of badges, toasts and map markers. |
|
|
97
97
|
| [`MeterKind`](#type-MeterKind) | enum | What a meter measures, which sets its colour. |
|
|
98
98
|
| [`Breakpoint`](#type-Breakpoint) | enum | The play surface's size class. |
|
|
99
|
-
| [`Contrast`](#type-Contrast) | enum | The theme variant: high contrast remaps muted inks, fills and
|
|
100
|
-
| [`HueName`](#type-HueName) | enum | One of the twelve category hues of the tokens, for a game's accent. |
|
|
99
|
+
| [`Contrast`](#type-Contrast) | enum | The theme variant: high contrast remaps muted inks, fills and lines to the style's stronger ones and outlines every control (no new colour). |
|
|
101
100
|
| [`NavIntent`](#type-NavIntent) | enum | A focus-navigation intent, as the arrow keys, Tab, Enter, Space, Escape and a gamepad's d-pad, stick, A and B give. |
|
|
102
101
|
| [`UiRect`](#type-UiRect) | struct | A rectangle of the play surface. |
|
|
103
102
|
| [`IconAtlasDesc`](#type-IconAtlasDesc) | desc struct | The icon atlas: a texture of equal cells in a grid, named in reading order, or an icon set cooked like a font (font). |
|
|
104
103
|
| [`AnchorDesc`](#type-AnchorDesc) | desc struct | An anchored group: a layer at a point of the safe area, over the tree (HUD corners, a centred title, a bar of touch controls). |
|
|
105
|
-
| [`TransitionDesc`](#type-TransitionDesc) | desc struct | How a transition moves, timed in ticks from the motion
|
|
104
|
+
| [`TransitionDesc`](#type-TransitionDesc) | desc struct | How a transition moves, timed in ticks from the style's motion. |
|
|
106
105
|
| [`Presence`](#type-Presence) | struct | Where a transition or dialog is this tick. |
|
|
107
106
|
| [`ModalDesc`](#type-ModalDesc) | desc struct | A dialog: a scrim over everything and a centred panel. Focus moves in and stays while it is the topmost; Back and the backdrop dismiss it unless locked. |
|
|
108
107
|
| [`ModalResult`](#type-ModalResult) | struct | A dialog's answer this tick. |
|
|
@@ -120,7 +119,7 @@ module ui {
|
|
|
120
119
|
| [`CheckListResult`](#type-CheckListResult) | struct | A checkbox list's response and values after this tick's input. |
|
|
121
120
|
| [`ToastDesc`](#type-ToastDesc) | desc struct | A toast's tone and time. |
|
|
122
121
|
| [`ChipDesc`](#type-ChipDesc) | desc struct | A chip's state. |
|
|
123
|
-
| [`MeterDesc`](#type-MeterDesc) | desc struct | A meter: a
|
|
122
|
+
| [`MeterDesc`](#type-MeterDesc) | desc struct | A meter: a track with a fill that animates its changes by the tick. |
|
|
124
123
|
| [`CooldownDesc`](#type-CooldownDesc) | desc struct | A cooldown ring's size and centre. |
|
|
125
124
|
| [`IconDesc`](#type-IconDesc) | desc struct | An icon's size, ink and name. |
|
|
126
125
|
| [`MapMarker`](#type-MapMarker) | desc struct | A marker on a mini-map. |
|
|
@@ -131,27 +130,27 @@ module ui {
|
|
|
131
130
|
| [`JoystickResult`](#type-JoystickResult) | struct | A joystick's vector this tick. |
|
|
132
131
|
| [`DpadDesc`](#type-DpadDesc) | desc struct | A d-pad. |
|
|
133
132
|
| [`DpadResult`](#type-DpadResult) | struct | Which arms of a d-pad are held this tick. |
|
|
134
|
-
| [`ActionButtonDesc`](#type-ActionButtonDesc) | desc struct | A
|
|
133
|
+
| [`ActionButtonDesc`](#type-ActionButtonDesc) | desc struct | A square touch action button (jump, fire), cornered by the style's control radius. |
|
|
135
134
|
| [`SkeletonDesc`](#type-SkeletonDesc) | desc struct | A skeleton: the neutral fill standing in for content that is loading. |
|
|
136
135
|
| [`UiItemBuild`](#type-UiItemBuild) | callback | Builds one row or cell of a virtualised list or grid: ui calls made inside nest under it. |
|
|
137
136
|
| [`og.ui.breakpoint`](#fn-breakpoint) | function | The size class of the play surface of the frame being built (desktop outside a frame). |
|
|
138
137
|
| [`og.ui.frameViewport`](#fn-frameViewport) | function | The play surface of the frame being built: og.ui.viewport without the world, for code that only builds UI. |
|
|
139
138
|
| [`og.ui.hasIcon`](#fn-hasIcon) | function | Whether the icon atlas has an icon of this name (templates draw a fallback otherwise). |
|
|
140
139
|
| [`og.ui.seconds`](#fn-seconds) | function | The UI's clock in seconds: frames built over the tick rate (simulation time, never the wall clock). |
|
|
141
|
-
| [`og.ui.frameTheme`](#fn-frameTheme) | function | The
|
|
140
|
+
| [`og.ui.frameTheme`](#fn-frameTheme) | function | The style values of the frame being built: og.ui.theme without the world, for code that only builds UI (the templates). |
|
|
142
141
|
| [`og.ui.openAnchor`](#fn-openAnchor) | function | Open an anchored group, closed by close(): og.ui.anchor without the callback. |
|
|
143
142
|
| [`og.ui.anchor`](#fn-anchor) | function | An anchored group built by `build`: a layer at a point of the safe area, over the tree, for HUD corners and touch controls. |
|
|
144
143
|
| [`og.ui.openTransition`](#fn-openTransition) | function | Open a transition container (a column), closed by close(); build its children only while the answer is visible: it stays visible while it leaves. Its content takes no input while it moves. |
|
|
145
|
-
| [`og.ui.transition`](#fn-transition) | function | Content that enters and leaves: fade, slide or scale by the tick from the motion
|
|
144
|
+
| [`og.ui.transition`](#fn-transition) | function | Content that enters and leaves: fade, slide or scale by the tick from the style's motion. `build` runs while it is visible. |
|
|
146
145
|
| [`og.ui.openModal`](#fn-openModal) | function | Open a dialog, closed by closeModal(); build its content only while the answer is visible. The probe sees the backdrop as `<id>` and the panel as `<id>/Panel`. |
|
|
147
146
|
| [`og.ui.closeModal`](#fn-closeModal) | function | Close a dialog opened with openModal (its panel and backdrop). |
|
|
148
147
|
| [`og.ui.modal`](#fn-modal) | function | A dialog built by `build` while visible: scrim, centred panel, focus kept inside, Back and the backdrop dismiss it unless locked. Set your open flag false on `dismissed`. |
|
|
149
|
-
| [`og.ui.spotlight`](#fn-spotlight) | function | A spotlight over everything (a tutorial step): the scrim on four sides of the hole,
|
|
148
|
+
| [`og.ui.spotlight`](#fn-spotlight) | function | A spotlight over everything (a tutorial step): the scrim on four sides of the hole, a primary edge around it. Presses on the dimmed parts stop there (clicked); presses in the hole reach what is under it. Shades are `<id>/Top`, `Left`, `Right`, `Bottom`; the hole is `<id>/Hole`. |
|
|
150
149
|
| [`og.ui.bounds`](#fn-bounds) | function | Where an element was in the last frame, by id or `Parent/Child` path (topmost first), as touch_move_to resolves it. |
|
|
151
150
|
| [`og.ui.openList`](#fn-openList) | function | Open a virtualised list (a scroll column) and learn which rows to build: listItem(i) and close() for each, then closeList(). |
|
|
152
151
|
| [`og.ui.openGrid`](#fn-openGrid) | function | Open a virtualised grid and learn which cells to build: gridItem(i) and close() for each, then closeList(). |
|
|
153
152
|
| [`og.ui.listItem`](#fn-listItem) | function | Open row `index` of the open list (`Row#index`): selectable and focusable; its content follows until close(). A press that started on one row and is released on this one answers `dropped`. |
|
|
154
|
-
| [`og.ui.gridItem`](#fn-gridItem) | function | Open cell `index` of the open grid (`Cell#index`): a slot on
|
|
153
|
+
| [`og.ui.gridItem`](#fn-gridItem) | function | Open cell `index` of the open grid (`Cell#index`): a slot on control, focusable; its content follows until close(). Drops answer `dropped` as listItem's. |
|
|
155
154
|
| [`og.ui.closeList`](#fn-closeList) | function | Close a list or grid opened with openList or openGrid. |
|
|
156
155
|
| [`og.ui.dragging`](#fn-dragging) | function | The row or cell a held press started on in the list or grid of this id (built under the same parent): a drag in progress, to draw what is dragged under the pointer. |
|
|
157
156
|
| [`og.ui.list`](#fn-list) | function | A virtualised list built by `build(index)` for the rows in view. |
|
|
@@ -159,24 +158,24 @@ module ui {
|
|
|
159
158
|
| [`og.ui.tabs`](#fn-tabs) | function | A segmented control: a neutral track, the chosen tab on the thumb. Tabs are `Tab#i` and the probe reads their labels. |
|
|
160
159
|
| [`og.ui.select`](#fn-select) | function | A select: a field-like trigger with the chosen label and a chevron; a press or Activate opens its menu `<id>.menu` (options `Option#i`) under it, a focus scope; choosing closes it with changed. Back or a press outside closes it. |
|
|
161
160
|
| [`og.ui.stepper`](#fn-stepper) | function | A number stepper: `Dec`, `Value`, `Inc`. The buttons step within the range; Left and Right step it while a button is focused; a screen reader's increment and decrement on the stepper itself (its spinbutton, which the web shell mirrors as an adjustable range) step it too. |
|
|
162
|
-
| [`og.ui.radio`](#fn-radio) | function | A radio group of `Option#i` rows: a ring, filled
|
|
161
|
+
| [`og.ui.radio`](#fn-radio) | function | A radio group of `Option#i` rows: a ring, filled primary when chosen, and a label. |
|
|
163
162
|
| [`og.ui.checkbox`](#fn-checkbox) | function | A checkbox with a label; a press flips it. |
|
|
164
163
|
| [`og.ui.checkboxList`](#fn-checkboxList) | function | Checkboxes in a column (`Option#i`). |
|
|
165
|
-
| [`og.ui.chip`](#fn-chip) | function | A chip: a
|
|
166
|
-
| [`og.ui.badge`](#fn-badge) | function | A badge: a small status
|
|
164
|
+
| [`og.ui.chip`](#fn-chip) | function | A chip: a control-filled tag; selected inverts to ink. For filters and tags. |
|
|
165
|
+
| [`og.ui.badge`](#fn-badge) | function | A badge: a small status tag in its tone. |
|
|
167
166
|
| [`og.ui.divider`](#fn-divider) | function | A hairline in the border colour across its parent. |
|
|
168
167
|
| [`og.ui.spacer`](#fn-spacer) | function | Empty space. |
|
|
169
|
-
| [`og.ui.keyValue`](#fn-keyValue) | function | A key (
|
|
168
|
+
| [`og.ui.keyValue`](#fn-keyValue) | function | A key (inkMuted) and its value (ink, at the end) on one row: stats, settings summaries, receipts. |
|
|
170
169
|
| [`og.ui.skeleton`](#fn-skeleton) | function | A skeleton: the neutral fill standing in for content that is loading, with a sheen that passes every 1.6 s (still under reduced motion). |
|
|
171
170
|
| [`og.ui.spinner`](#fn-spinner) | function | A loading spinner: eight dots around a circle, the bright one turning by the tick. |
|
|
172
171
|
| [`og.ui.icon`](#fn-icon) | function | An icon of the atlas (UiDesc.icons) by name: a texture cell, or an icon set's distance-field glyph fitted to its square; an unknown name draws an empty slot and warns. Rich text takes the same icons inline with `[icon=name]`. The probe reads the name. |
|
|
173
172
|
| [`og.ui.meter`](#fn-meter) | function | A health, mana or xp bar. A drop shows at once and leaves a pale trail that follows after a beat; a rise grows into place with a ghost of the target; both by the tick. |
|
|
174
|
-
| [`og.ui.cooldown`](#fn-cooldown) | function | A cooldown: a disc whose
|
|
175
|
-
| [`og.ui.minimap`](#fn-minimap) | function | A mini-map frame: the map in a
|
|
176
|
-
| [`og.ui.dialogue`](#fn-dialogue) | function | A dialogue box: a portrait slot, the speaker in
|
|
173
|
+
| [`og.ui.cooldown`](#fn-cooldown) | function | A cooldown: a disc whose primary ring fills clockwise from the top as it runs out, bright and full when ready, a label or icon in the middle. A press reports clicked (ready or not). |
|
|
174
|
+
| [`og.ui.minimap`](#fn-minimap) | function | A mini-map frame: the map in a lineStrong frame, markers as dots (the player primary and ringed), an N mark and a zone label. |
|
|
175
|
+
| [`og.ui.dialogue`](#fn-dialogue) | function | A dialogue box: a portrait slot, the speaker in primary ink and the line typed out by the tick. A press or Activate while typing shows the whole line; once shown it answers advanced. The line is `<id>/Body/Line` and the probe reads what is shown. |
|
|
177
176
|
| [`og.ui.joystick`](#fn-joystick) | function | A virtual joystick: a base and a knob that follows a press that started on it. It keeps the finger that grabbed it (any of og.Pointers), so another finger can hold an action button at the same time. |
|
|
178
177
|
| [`og.ui.dpad`](#fn-dpad) | function | A d-pad of four arms (`Up`, `Down`, `Left`, `Right`), each at least 44 CSS px. |
|
|
179
|
-
| [`og.ui.actionButton`](#fn-actionButton) | function | A
|
|
178
|
+
| [`og.ui.actionButton`](#fn-actionButton) | function | A square touch action button, cornered by the style's control radius: pressed while held (jump, fire), clicked on a tap; at least 44 CSS px. |
|
|
180
179
|
| [`og.ui.toast`](#fn-toast) | function | Queue a toast: it stacks at UiDesc.toastAnchor, enters, stays its time and leaves; at most three are up (older ones leave first); a press dismisses it. Callable anywhere (systems, commands, start); it is world state, so snapshots carry it. |
|
|
181
180
|
| [`og.ui.dismissToast`](#fn-dismissToast) | function | Start a toast's exit. |
|
|
182
181
|
| [`og.ui.navigate`](#fn-navigate) | function | Queue a navigation intent for the next tick: a gamepad og.Input does not read yet, a custom binding, a command. A move queued while the focus is on nothing puts the focus on the first control, whatever its direction, and no further: moves asked again before the focus lands (each tick until og.ui.focus answers a path) land on that same first control. |
|
|
@@ -191,18 +190,17 @@ module ui {
|
|
|
191
190
|
| [`og.ui.remember`](#fn-remember) | function | Set a number memory (see memory). |
|
|
192
191
|
| [`og.ui.tick`](#fn-tick) | function | Frames the UI has built: its clock, for animations by the tick. |
|
|
193
192
|
| [`CounterDesc`](#type-CounterDesc) | desc struct | A number that counts to its value. |
|
|
194
|
-
| [`og.ui.counter`](#fn-counter) | function | A number label that counts (ease-out cubic, by the tick) from where it was to the value each time the value changes, grouped with commas; a
|
|
193
|
+
| [`og.ui.counter`](#fn-counter) | function | A number label that counts (ease-out cubic, by the tick) from where it was to the value each time the value changes, grouped with commas; a style with motion.pop bumps it when it lands. Scores, currency, rewards. |
|
|
195
194
|
| [`BurstDesc`](#type-BurstDesc) | desc struct | Rays and sparks thrown from an element. |
|
|
196
195
|
| [`og.ui.burst`](#fn-burst) | function | Throw rays and sparks from the element built just before (a star landing, a reward), once, from when it first appears. Off under reduced motion. |
|
|
197
196
|
| [`ShakeDesc`](#type-ShakeDesc) | desc struct | A shake of an element: three sideways swings decaying to rest. |
|
|
198
|
-
| [`og.ui.shake`](#fn-shake) | function | Shake the element built just before, from this tick (a wrong answer, a locked door, a refused purchase): call it once, on the tick it happens; the element swings and comes to rest by itself, and snapshots carry it. Still under reduced motion. A refused press on a disabled button already shakes when the
|
|
197
|
+
| [`og.ui.shake`](#fn-shake) | function | Shake the element built just before, from this tick (a wrong answer, a locked door, a refused purchase): call it once, on the tick it happens; the element swings and comes to rest by itself, and snapshots carry it. Still under reduced motion. A refused press on a disabled button already shakes when the style's motion.shake is set. |
|
|
199
198
|
| [`ScreenWipe`](#type-ScreenWipe) | enum | How a screen transition covers the old screen and reveals the new one. |
|
|
200
199
|
| [`WipeSide`](#type-WipeSide) | enum | Where a wipe or a slide comes from. |
|
|
201
200
|
| [`ScreenTransitionDesc`](#type-ScreenTransitionDesc) | desc struct | How a screen transition looks. |
|
|
202
201
|
| [`ScreenTransitionResult`](#type-ScreenTransitionResult) | struct | Where a screen transition is this tick. |
|
|
203
202
|
| [`og.ui.screenTransition`](#fn-screenTransition) | function | A transition between game screens drawn over the whole frame (through the overlay, over every other UI layer). Pass the screen the game wants every tick and build the one it answers: when the wanted screen changes the cover closes over the old screen for half the duration, the answer switches, and the cover opens on the new one. Deterministic by the tick; snapshots carry it; under reduced motion every kind is a fade. |
|
|
204
203
|
| [`og.ui.previewViewport`](#fn-previewViewport) | function | Lay the UI out for another play surface (a phone in portrait at 3x, a notch) until cleared with null: for headless previews and playtests of responsive layouts. Render at width x dpr by height x dpr (`og run --size`). |
|
|
205
|
-
| [`GraphicsQuality`](#type-GraphicsQuality) | enum | A graphics quality preset. |
|
|
206
204
|
| [`UiAction`](#type-UiAction) | callback | A template's action, by its id (a menu item, `buy:<item>`, `share`). |
|
|
207
205
|
| [`SettingsChanged`](#type-SettingsChanged) | callback | The settings after a change: persist them (cloud save, local storage through the shell) and apply them. |
|
|
208
206
|
| [`MenuItem`](#type-MenuItem) | desc struct | An item of a menu: an id the game acts on and the label a player reads. |
|
|
@@ -275,7 +273,7 @@ module ui {
|
|
|
275
273
|
|
|
276
274
|
### `og.ui.configure`
|
|
277
275
|
|
|
278
|
-
Set how the UI looks (the scheme, density, fonts,
|
|
276
|
+
Set how the UI looks (the scheme, density, fonts, style, sounds, motion…), typically in GameDesc.start; it takes effect from the next tick. The desc is a partial: a field left out keeps the last UiDesc's value, the one an earlier call or a look's style (og.render.applyLook) gave it, so a settings screen that configures sounds or reducedMotion keeps the style and the fonts; null clears a field to its default (`style: null` goes back to the prototype style). A UI left with no font at all (no font, no style with fonts, no fallback or locale font) warns: it would draw no text.
|
|
279
277
|
|
|
280
278
|
```ts
|
|
281
279
|
og.ui.configure(world: World, desc?: UiDesc): Result<void>
|
|
@@ -286,20 +284,20 @@ og.ui.configure(world: World, desc?: UiDesc): Result<void>
|
|
|
286
284
|
| `world` | `World` | no | The world whose UI is configured. |
|
|
287
285
|
| `desc` | `UiDesc` | yes | The fields to change; the others keep their values. |
|
|
288
286
|
|
|
289
|
-
**Returns** `Result<void>`: Refused for a dead font or
|
|
287
|
+
**Returns** `Result<void>`: Refused for a dead font or style, or a desc that is not an object.
|
|
290
288
|
|
|
291
289
|
Binding symbol `og_ui_configure` · publish builds: kept
|
|
292
290
|
|
|
293
291
|
```ogt
|
|
294
292
|
fn configure {
|
|
295
|
-
doc "Set how the UI looks (the scheme, density, fonts,
|
|
293
|
+
doc "Set how the UI looks (the scheme, density, fonts, style, sounds, motion…), typically in GameDesc.start; it takes effect from the next tick. The desc is a partial: a field left out keeps the last UiDesc's value, the one an earlier call or a look's style (og.render.applyLook) gave it, so a settings screen that configures sounds or reducedMotion keeps the style and the fonts; null clears a field to its default (`style: null` goes back to the prototype style). A UI left with no font at all (no font, no style with fonts, no fallback or locale font) warns: it would draw no text."
|
|
296
294
|
param world World "The world whose UI is configured."
|
|
297
295
|
param desc UiDesc "The fields to change; the others keep their values."
|
|
298
|
-
returns Result.Void "Refused for a dead font or
|
|
296
|
+
returns Result.Void "Refused for a dead font or style, or a desc that is not an object."
|
|
299
297
|
}
|
|
300
298
|
```
|
|
301
299
|
|
|
302
|
-
<sub>`api.ogt` line
|
|
300
|
+
<sub>`api.ogt` line 10641</sub>
|
|
303
301
|
|
|
304
302
|
<a id="fn-viewport"></a>
|
|
305
303
|
|
|
@@ -327,13 +325,13 @@ fn viewport {
|
|
|
327
325
|
}
|
|
328
326
|
```
|
|
329
327
|
|
|
330
|
-
<sub>`api.ogt` line
|
|
328
|
+
<sub>`api.ogt` line 10648</sub>
|
|
331
329
|
|
|
332
330
|
<a id="fn-theme"></a>
|
|
333
331
|
|
|
334
332
|
### `og.ui.theme`
|
|
335
333
|
|
|
336
|
-
The
|
|
334
|
+
The style values the UI draws with.
|
|
337
335
|
|
|
338
336
|
```ts
|
|
339
337
|
og.ui.theme(world: World): UiTheme
|
|
@@ -349,13 +347,13 @@ Binding symbol `og_ui_theme` · publish builds: kept
|
|
|
349
347
|
|
|
350
348
|
```ogt
|
|
351
349
|
fn theme {
|
|
352
|
-
doc "The
|
|
350
|
+
doc "The style values the UI draws with."
|
|
353
351
|
param world World "The world."
|
|
354
352
|
returns UiTheme
|
|
355
353
|
}
|
|
356
354
|
```
|
|
357
355
|
|
|
358
|
-
<sub>`api.ogt` line
|
|
356
|
+
<sub>`api.ogt` line 10654</sub>
|
|
359
357
|
|
|
360
358
|
<a id="fn-open"></a>
|
|
361
359
|
|
|
@@ -385,7 +383,7 @@ fn open {
|
|
|
385
383
|
}
|
|
386
384
|
```
|
|
387
385
|
|
|
388
|
-
<sub>`api.ogt` line
|
|
386
|
+
<sub>`api.ogt` line 10660</sub>
|
|
389
387
|
|
|
390
388
|
<a id="fn-openPanel"></a>
|
|
391
389
|
|
|
@@ -415,7 +413,7 @@ fn openPanel {
|
|
|
415
413
|
}
|
|
416
414
|
```
|
|
417
415
|
|
|
418
|
-
<sub>`api.ogt` line
|
|
416
|
+
<sub>`api.ogt` line 10667</sub>
|
|
419
417
|
|
|
420
418
|
<a id="fn-openScroll"></a>
|
|
421
419
|
|
|
@@ -445,7 +443,7 @@ fn openScroll {
|
|
|
445
443
|
}
|
|
446
444
|
```
|
|
447
445
|
|
|
448
|
-
<sub>`api.ogt` line
|
|
446
|
+
<sub>`api.ogt` line 10674</sub>
|
|
449
447
|
|
|
450
448
|
<a id="fn-close"></a>
|
|
451
449
|
|
|
@@ -468,7 +466,7 @@ fn close {
|
|
|
468
466
|
}
|
|
469
467
|
```
|
|
470
468
|
|
|
471
|
-
<sub>`api.ogt` line
|
|
469
|
+
<sub>`api.ogt` line 10681</sub>
|
|
472
470
|
|
|
473
471
|
<a id="fn-row"></a>
|
|
474
472
|
|
|
@@ -501,7 +499,7 @@ fn row {
|
|
|
501
499
|
}
|
|
502
500
|
```
|
|
503
501
|
|
|
504
|
-
<sub>`api.ogt` line
|
|
502
|
+
<sub>`api.ogt` line 10686</sub>
|
|
505
503
|
|
|
506
504
|
<a id="fn-column"></a>
|
|
507
505
|
|
|
@@ -534,7 +532,7 @@ fn column {
|
|
|
534
532
|
}
|
|
535
533
|
```
|
|
536
534
|
|
|
537
|
-
<sub>`api.ogt` line
|
|
535
|
+
<sub>`api.ogt` line 10695</sub>
|
|
538
536
|
|
|
539
537
|
<a id="fn-panel"></a>
|
|
540
538
|
|
|
@@ -567,7 +565,7 @@ fn panel {
|
|
|
567
565
|
}
|
|
568
566
|
```
|
|
569
567
|
|
|
570
|
-
<sub>`api.ogt` line
|
|
568
|
+
<sub>`api.ogt` line 10704</sub>
|
|
571
569
|
|
|
572
570
|
<a id="fn-scroll"></a>
|
|
573
571
|
|
|
@@ -600,13 +598,13 @@ fn scroll {
|
|
|
600
598
|
}
|
|
601
599
|
```
|
|
602
600
|
|
|
603
|
-
<sub>`api.ogt` line
|
|
601
|
+
<sub>`api.ogt` line 10713</sub>
|
|
604
602
|
|
|
605
603
|
<a id="fn-richText"></a>
|
|
606
604
|
|
|
607
605
|
### `og.ui.richText`
|
|
608
606
|
|
|
609
|
-
A paragraph of inline spans from markup, for a string-table message (og.i18n.t) so a translation carries its own emphasis: `[b]bold[/b]` (thickened in the distance field as far as it reaches, plus a second copy one device pixel right), `[color=danger]` or `[color=#ff8800]` (a ThemeColor follows the
|
|
607
|
+
A paragraph of inline spans from markup, for a string-table message (og.i18n.t) so a translation carries its own emphasis: `[b]bold[/b]` (thickened in the distance field as far as it reaches, plus a second copy one device pixel right), `[color=danger]` or `[color=#ff8800]` (a ThemeColor follows the style), `[size=xl]` (a TypeStepName), `[font=mono]`, `[icon=coin]` (a cell of the icon atlas, one em), `[link=shop]Open the shop[/link]` (accent ink, underlined, focusable by keys and pads; a child element `<id>/shop` of kind link for the probe) and per-glyph motion `[wave]`, `[shake]`, `[pulse]` (by the tick; still under reduced motion). `[[` is a literal bracket. Lines break between the spans' words (a word restyled mid-way stays whole), each as tall as its tallest span on one baseline. Markup it cannot read shows as text and logs a warning.
|
|
610
608
|
|
|
611
609
|
```ts
|
|
612
610
|
og.ui.richText(id: string, markup: string, desc?: RichTextDesc): RichTextResult
|
|
@@ -624,7 +622,7 @@ Binding symbol `og_ui_rich_text` · publish builds: kept
|
|
|
624
622
|
|
|
625
623
|
```ogt
|
|
626
624
|
fn richText {
|
|
627
|
-
doc "A paragraph of inline spans from markup, for a string-table message (og.i18n.t) so a translation carries its own emphasis: `[b]bold[/b]` (thickened in the distance field as far as it reaches, plus a second copy one device pixel right), `[color=danger]` or `[color=#ff8800]` (a ThemeColor follows the
|
|
625
|
+
doc "A paragraph of inline spans from markup, for a string-table message (og.i18n.t) so a translation carries its own emphasis: `[b]bold[/b]` (thickened in the distance field as far as it reaches, plus a second copy one device pixel right), `[color=danger]` or `[color=#ff8800]` (a ThemeColor follows the style), `[size=xl]` (a TypeStepName), `[font=mono]`, `[icon=coin]` (a cell of the icon atlas, one em), `[link=shop]Open the shop[/link]` (accent ink, underlined, focusable by keys and pads; a child element `<id>/shop` of kind link for the probe) and per-glyph motion `[wave]`, `[shake]`, `[pulse]` (by the tick; still under reduced motion). `[[` is a literal bracket. Lines break between the spans' words (a word restyled mid-way stays whole), each as tall as its tallest span on one baseline. Markup it cannot read shows as text and logs a warning."
|
|
628
626
|
param id String "Its id."
|
|
629
627
|
param markup String "The markup."
|
|
630
628
|
param desc RichTextDesc "Defaults for its spans: type step, ink, alignment, wrapping, width and font."
|
|
@@ -632,7 +630,7 @@ fn richText {
|
|
|
632
630
|
}
|
|
633
631
|
```
|
|
634
632
|
|
|
635
|
-
<sub>`api.ogt` line
|
|
633
|
+
<sub>`api.ogt` line 10740</sub>
|
|
636
634
|
|
|
637
635
|
<a id="fn-label"></a>
|
|
638
636
|
|
|
@@ -664,13 +662,13 @@ fn label {
|
|
|
664
662
|
}
|
|
665
663
|
```
|
|
666
664
|
|
|
667
|
-
<sub>`api.ogt` line
|
|
665
|
+
<sub>`api.ogt` line 10748</sub>
|
|
668
666
|
|
|
669
667
|
<a id="fn-button"></a>
|
|
670
668
|
|
|
671
669
|
### `og.ui.button`
|
|
672
670
|
|
|
673
|
-
A
|
|
671
|
+
A button with a label; `clicked` is a press and a release inside it. The probe reads its label.
|
|
674
672
|
|
|
675
673
|
```ts
|
|
676
674
|
og.ui.button(id: string, text: string, desc?: ButtonDesc): Response
|
|
@@ -688,7 +686,7 @@ Binding symbol `og_ui_button` · publish builds: kept
|
|
|
688
686
|
|
|
689
687
|
```ogt
|
|
690
688
|
fn button {
|
|
691
|
-
doc "A
|
|
689
|
+
doc "A button with a label; `clicked` is a press and a release inside it. The probe reads its label."
|
|
692
690
|
param id String "Its id."
|
|
693
691
|
param text String "The label."
|
|
694
692
|
param desc ButtonDesc "Variant, size, disabled and width."
|
|
@@ -696,7 +694,7 @@ fn button {
|
|
|
696
694
|
}
|
|
697
695
|
```
|
|
698
696
|
|
|
699
|
-
<sub>`api.ogt` line
|
|
697
|
+
<sub>`api.ogt` line 10756</sub>
|
|
700
698
|
|
|
701
699
|
<a id="fn-image"></a>
|
|
702
700
|
|
|
@@ -726,7 +724,7 @@ fn image {
|
|
|
726
724
|
}
|
|
727
725
|
```
|
|
728
726
|
|
|
729
|
-
<sub>`api.ogt` line
|
|
727
|
+
<sub>`api.ogt` line 10764</sub>
|
|
730
728
|
|
|
731
729
|
<a id="fn-zoomView"></a>
|
|
732
730
|
|
|
@@ -756,13 +754,13 @@ fn zoomView {
|
|
|
756
754
|
}
|
|
757
755
|
```
|
|
758
756
|
|
|
759
|
-
<sub>`api.ogt` line
|
|
757
|
+
<sub>`api.ogt` line 10771</sub>
|
|
760
758
|
|
|
761
759
|
<a id="fn-progress"></a>
|
|
762
760
|
|
|
763
761
|
### `og.ui.progress`
|
|
764
762
|
|
|
765
|
-
A
|
|
763
|
+
A track filled to a fraction.
|
|
766
764
|
|
|
767
765
|
```ts
|
|
768
766
|
og.ui.progress(id: string, value: number, desc?: ProgressDesc): void
|
|
@@ -780,7 +778,7 @@ Binding symbol `og_ui_progress` · publish builds: kept
|
|
|
780
778
|
|
|
781
779
|
```ogt
|
|
782
780
|
fn progress {
|
|
783
|
-
doc "A
|
|
781
|
+
doc "A track filled to a fraction."
|
|
784
782
|
param id String "Its id."
|
|
785
783
|
param value f32 "How full it is, from 0 to 1."
|
|
786
784
|
param desc ProgressDesc "Its width."
|
|
@@ -788,7 +786,7 @@ fn progress {
|
|
|
788
786
|
}
|
|
789
787
|
```
|
|
790
788
|
|
|
791
|
-
<sub>`api.ogt` line
|
|
789
|
+
<sub>`api.ogt` line 10778</sub>
|
|
792
790
|
|
|
793
791
|
<a id="fn-slider"></a>
|
|
794
792
|
|
|
@@ -820,7 +818,7 @@ fn slider {
|
|
|
820
818
|
}
|
|
821
819
|
```
|
|
822
820
|
|
|
823
|
-
<sub>`api.ogt` line
|
|
821
|
+
<sub>`api.ogt` line 10786</sub>
|
|
824
822
|
|
|
825
823
|
<a id="fn-toggle"></a>
|
|
826
824
|
|
|
@@ -852,7 +850,7 @@ fn toggle {
|
|
|
852
850
|
}
|
|
853
851
|
```
|
|
854
852
|
|
|
855
|
-
<sub>`api.ogt` line
|
|
853
|
+
<sub>`api.ogt` line 10794</sub>
|
|
856
854
|
|
|
857
855
|
<a id="fn-textField"></a>
|
|
858
856
|
|
|
@@ -884,7 +882,7 @@ fn textField {
|
|
|
884
882
|
}
|
|
885
883
|
```
|
|
886
884
|
|
|
887
|
-
<sub>`api.ogt` line
|
|
885
|
+
<sub>`api.ogt` line 10802</sub>
|
|
888
886
|
|
|
889
887
|
<a id="fn-textArea"></a>
|
|
890
888
|
|
|
@@ -916,7 +914,7 @@ fn textArea {
|
|
|
916
914
|
}
|
|
917
915
|
```
|
|
918
916
|
|
|
919
|
-
<sub>`api.ogt` line
|
|
917
|
+
<sub>`api.ogt` line 10810</sub>
|
|
920
918
|
|
|
921
919
|
<a id="fn-tooltip"></a>
|
|
922
920
|
|
|
@@ -944,7 +942,7 @@ fn tooltip {
|
|
|
944
942
|
}
|
|
945
943
|
```
|
|
946
944
|
|
|
947
|
-
<sub>`api.ogt` line
|
|
945
|
+
<sub>`api.ogt` line 10818</sub>
|
|
948
946
|
|
|
949
947
|
<a id="fn-idi"></a>
|
|
950
948
|
|
|
@@ -975,7 +973,7 @@ fn idi {
|
|
|
975
973
|
}
|
|
976
974
|
```
|
|
977
975
|
|
|
978
|
-
<sub>`api.ogt` line
|
|
976
|
+
<sub>`api.ogt` line 10824</sub>
|
|
979
977
|
|
|
980
978
|
<a id="fn-breakpoint"></a>
|
|
981
979
|
|
|
@@ -998,7 +996,7 @@ fn breakpoint {
|
|
|
998
996
|
}
|
|
999
997
|
```
|
|
1000
998
|
|
|
1001
|
-
<sub>`api.ogt` line
|
|
999
|
+
<sub>`api.ogt` line 11289</sub>
|
|
1002
1000
|
|
|
1003
1001
|
<a id="fn-frameViewport"></a>
|
|
1004
1002
|
|
|
@@ -1021,7 +1019,7 @@ fn frameViewport {
|
|
|
1021
1019
|
}
|
|
1022
1020
|
```
|
|
1023
1021
|
|
|
1024
|
-
<sub>`api.ogt` line
|
|
1022
|
+
<sub>`api.ogt` line 11294</sub>
|
|
1025
1023
|
|
|
1026
1024
|
<a id="fn-hasIcon"></a>
|
|
1027
1025
|
|
|
@@ -1049,7 +1047,7 @@ fn hasIcon {
|
|
|
1049
1047
|
}
|
|
1050
1048
|
```
|
|
1051
1049
|
|
|
1052
|
-
<sub>`api.ogt` line
|
|
1050
|
+
<sub>`api.ogt` line 11299</sub>
|
|
1053
1051
|
|
|
1054
1052
|
<a id="fn-seconds"></a>
|
|
1055
1053
|
|
|
@@ -1072,13 +1070,13 @@ fn seconds {
|
|
|
1072
1070
|
}
|
|
1073
1071
|
```
|
|
1074
1072
|
|
|
1075
|
-
<sub>`api.ogt` line
|
|
1073
|
+
<sub>`api.ogt` line 11305</sub>
|
|
1076
1074
|
|
|
1077
1075
|
<a id="fn-frameTheme"></a>
|
|
1078
1076
|
|
|
1079
1077
|
### `og.ui.frameTheme`
|
|
1080
1078
|
|
|
1081
|
-
The
|
|
1079
|
+
The style values of the frame being built: og.ui.theme without the world, for code that only builds UI (the templates).
|
|
1082
1080
|
|
|
1083
1081
|
```ts
|
|
1084
1082
|
og.ui.frameTheme(): UiTheme
|
|
@@ -1090,12 +1088,12 @@ Binding symbol `og_ui_frame_theme` · publish builds: kept
|
|
|
1090
1088
|
|
|
1091
1089
|
```ogt
|
|
1092
1090
|
fn frameTheme {
|
|
1093
|
-
doc "The
|
|
1091
|
+
doc "The style values of the frame being built: og.ui.theme without the world, for code that only builds UI (the templates)."
|
|
1094
1092
|
returns UiTheme
|
|
1095
1093
|
}
|
|
1096
1094
|
```
|
|
1097
1095
|
|
|
1098
|
-
<sub>`api.ogt` line
|
|
1096
|
+
<sub>`api.ogt` line 11310</sub>
|
|
1099
1097
|
|
|
1100
1098
|
<a id="fn-openAnchor"></a>
|
|
1101
1099
|
|
|
@@ -1125,7 +1123,7 @@ fn openAnchor {
|
|
|
1125
1123
|
}
|
|
1126
1124
|
```
|
|
1127
1125
|
|
|
1128
|
-
<sub>`api.ogt` line
|
|
1126
|
+
<sub>`api.ogt` line 11315</sub>
|
|
1129
1127
|
|
|
1130
1128
|
<a id="fn-anchor"></a>
|
|
1131
1129
|
|
|
@@ -1158,7 +1156,7 @@ fn anchor {
|
|
|
1158
1156
|
}
|
|
1159
1157
|
```
|
|
1160
1158
|
|
|
1161
|
-
<sub>`api.ogt` line
|
|
1159
|
+
<sub>`api.ogt` line 11322</sub>
|
|
1162
1160
|
|
|
1163
1161
|
<a id="fn-openTransition"></a>
|
|
1164
1162
|
|
|
@@ -1190,13 +1188,13 @@ fn openTransition {
|
|
|
1190
1188
|
}
|
|
1191
1189
|
```
|
|
1192
1190
|
|
|
1193
|
-
<sub>`api.ogt` line
|
|
1191
|
+
<sub>`api.ogt` line 11331</sub>
|
|
1194
1192
|
|
|
1195
1193
|
<a id="fn-transition"></a>
|
|
1196
1194
|
|
|
1197
1195
|
### `og.ui.transition`
|
|
1198
1196
|
|
|
1199
|
-
Content that enters and leaves: fade, slide or scale by the tick from the motion
|
|
1197
|
+
Content that enters and leaves: fade, slide or scale by the tick from the style's motion. `build` runs while it is visible.
|
|
1200
1198
|
|
|
1201
1199
|
```ts
|
|
1202
1200
|
og.ui.transition(id: string, show: boolean, desc: TransitionDesc, build: UiBuild): Presence
|
|
@@ -1215,7 +1213,7 @@ Implemented by the TypeScript runtime over the members of this module: no bindin
|
|
|
1215
1213
|
|
|
1216
1214
|
```ogt
|
|
1217
1215
|
fn transition {
|
|
1218
|
-
doc "Content that enters and leaves: fade, slide or scale by the tick from the motion
|
|
1216
|
+
doc "Content that enters and leaves: fade, slide or scale by the tick from the style's motion. `build` runs while it is visible."
|
|
1219
1217
|
host false
|
|
1220
1218
|
param id String "Its id."
|
|
1221
1219
|
param show bool "Whether it should be shown."
|
|
@@ -1225,7 +1223,7 @@ fn transition {
|
|
|
1225
1223
|
}
|
|
1226
1224
|
```
|
|
1227
1225
|
|
|
1228
|
-
<sub>`api.ogt` line
|
|
1226
|
+
<sub>`api.ogt` line 11339</sub>
|
|
1229
1227
|
|
|
1230
1228
|
<a id="fn-openModal"></a>
|
|
1231
1229
|
|
|
@@ -1257,7 +1255,7 @@ fn openModal {
|
|
|
1257
1255
|
}
|
|
1258
1256
|
```
|
|
1259
1257
|
|
|
1260
|
-
<sub>`api.ogt` line
|
|
1258
|
+
<sub>`api.ogt` line 11349</sub>
|
|
1261
1259
|
|
|
1262
1260
|
<a id="fn-closeModal"></a>
|
|
1263
1261
|
|
|
@@ -1280,7 +1278,7 @@ fn closeModal {
|
|
|
1280
1278
|
}
|
|
1281
1279
|
```
|
|
1282
1280
|
|
|
1283
|
-
<sub>`api.ogt` line
|
|
1281
|
+
<sub>`api.ogt` line 11357</sub>
|
|
1284
1282
|
|
|
1285
1283
|
<a id="fn-modal"></a>
|
|
1286
1284
|
|
|
@@ -1315,13 +1313,13 @@ fn modal {
|
|
|
1315
1313
|
}
|
|
1316
1314
|
```
|
|
1317
1315
|
|
|
1318
|
-
<sub>`api.ogt` line
|
|
1316
|
+
<sub>`api.ogt` line 11362</sub>
|
|
1319
1317
|
|
|
1320
1318
|
<a id="fn-spotlight"></a>
|
|
1321
1319
|
|
|
1322
1320
|
### `og.ui.spotlight`
|
|
1323
1321
|
|
|
1324
|
-
A spotlight over everything (a tutorial step): the scrim on four sides of the hole,
|
|
1322
|
+
A spotlight over everything (a tutorial step): the scrim on four sides of the hole, a primary edge around it. Presses on the dimmed parts stop there (clicked); presses in the hole reach what is under it. Shades are `<id>/Top`, `Left`, `Right`, `Bottom`; the hole is `<id>/Hole`.
|
|
1325
1323
|
|
|
1326
1324
|
```ts
|
|
1327
1325
|
og.ui.spotlight(id: string, hole: UiRect | null, desc?: SpotlightDesc): Response
|
|
@@ -1339,7 +1337,7 @@ Binding symbol `og_ui_spotlight` · publish builds: kept
|
|
|
1339
1337
|
|
|
1340
1338
|
```ogt
|
|
1341
1339
|
fn spotlight {
|
|
1342
|
-
doc "A spotlight over everything (a tutorial step): the scrim on four sides of the hole,
|
|
1340
|
+
doc "A spotlight over everything (a tutorial step): the scrim on four sides of the hole, a primary edge around it. Presses on the dimmed parts stop there (clicked); presses in the hole reach what is under it. Shades are `<id>/Top`, `Left`, `Right`, `Bottom`; the hole is `<id>/Hole`."
|
|
1343
1341
|
param id String "Its id."
|
|
1344
1342
|
param hole Option.UiRect "The rectangle to leave lit, as og.ui.bounds answers; null dims everything."
|
|
1345
1343
|
param desc SpotlightDesc "Room around the hole."
|
|
@@ -1347,7 +1345,7 @@ fn spotlight {
|
|
|
1347
1345
|
}
|
|
1348
1346
|
```
|
|
1349
1347
|
|
|
1350
|
-
<sub>`api.ogt` line
|
|
1348
|
+
<sub>`api.ogt` line 11372</sub>
|
|
1351
1349
|
|
|
1352
1350
|
<a id="fn-bounds"></a>
|
|
1353
1351
|
|
|
@@ -1375,7 +1373,7 @@ fn bounds {
|
|
|
1375
1373
|
}
|
|
1376
1374
|
```
|
|
1377
1375
|
|
|
1378
|
-
<sub>`api.ogt` line
|
|
1376
|
+
<sub>`api.ogt` line 11380</sub>
|
|
1379
1377
|
|
|
1380
1378
|
<a id="fn-openList"></a>
|
|
1381
1379
|
|
|
@@ -1405,7 +1403,7 @@ fn openList {
|
|
|
1405
1403
|
}
|
|
1406
1404
|
```
|
|
1407
1405
|
|
|
1408
|
-
<sub>`api.ogt` line
|
|
1406
|
+
<sub>`api.ogt` line 11386</sub>
|
|
1409
1407
|
|
|
1410
1408
|
<a id="fn-openGrid"></a>
|
|
1411
1409
|
|
|
@@ -1435,7 +1433,7 @@ fn openGrid {
|
|
|
1435
1433
|
}
|
|
1436
1434
|
```
|
|
1437
1435
|
|
|
1438
|
-
<sub>`api.ogt` line
|
|
1436
|
+
<sub>`api.ogt` line 11393</sub>
|
|
1439
1437
|
|
|
1440
1438
|
<a id="fn-listItem"></a>
|
|
1441
1439
|
|
|
@@ -1450,7 +1448,7 @@ og.ui.listItem(index: number, selected: boolean): Response
|
|
|
1450
1448
|
| Parameter | Type | Optional | Doc |
|
|
1451
1449
|
|---|---|---|---|
|
|
1452
1450
|
| `index` | `number` | no | Its index. |
|
|
1453
|
-
| `selected` | `boolean` | no | Drawn selected (
|
|
1451
|
+
| `selected` | `boolean` | no | Drawn selected (controlStrong). |
|
|
1454
1452
|
|
|
1455
1453
|
**Returns** `Response`.
|
|
1456
1454
|
|
|
@@ -1460,18 +1458,18 @@ Binding symbol `og_ui_list_item` · publish builds: kept
|
|
|
1460
1458
|
fn listItem {
|
|
1461
1459
|
doc "Open row `index` of the open list (`Row#index`): selectable and focusable; its content follows until close(). A press that started on one row and is released on this one answers `dropped`."
|
|
1462
1460
|
param index u32 "Its index."
|
|
1463
|
-
param selected bool "Drawn selected (
|
|
1461
|
+
param selected bool "Drawn selected (controlStrong)."
|
|
1464
1462
|
returns Response
|
|
1465
1463
|
}
|
|
1466
1464
|
```
|
|
1467
1465
|
|
|
1468
|
-
<sub>`api.ogt` line
|
|
1466
|
+
<sub>`api.ogt` line 11400</sub>
|
|
1469
1467
|
|
|
1470
1468
|
<a id="fn-gridItem"></a>
|
|
1471
1469
|
|
|
1472
1470
|
### `og.ui.gridItem`
|
|
1473
1471
|
|
|
1474
|
-
Open cell `index` of the open grid (`Cell#index`): a slot on
|
|
1472
|
+
Open cell `index` of the open grid (`Cell#index`): a slot on control, focusable; its content follows until close(). Drops answer `dropped` as listItem's.
|
|
1475
1473
|
|
|
1476
1474
|
```ts
|
|
1477
1475
|
og.ui.gridItem(index: number, selected: boolean): Response
|
|
@@ -1480,7 +1478,7 @@ og.ui.gridItem(index: number, selected: boolean): Response
|
|
|
1480
1478
|
| Parameter | Type | Optional | Doc |
|
|
1481
1479
|
|---|---|---|---|
|
|
1482
1480
|
| `index` | `number` | no | Its index. |
|
|
1483
|
-
| `selected` | `boolean` | no | Drawn selected (
|
|
1481
|
+
| `selected` | `boolean` | no | Drawn selected (controlStrong with a primary bar). |
|
|
1484
1482
|
|
|
1485
1483
|
**Returns** `Response`.
|
|
1486
1484
|
|
|
@@ -1488,14 +1486,14 @@ Binding symbol `og_ui_grid_item` · publish builds: kept
|
|
|
1488
1486
|
|
|
1489
1487
|
```ogt
|
|
1490
1488
|
fn gridItem {
|
|
1491
|
-
doc "Open cell `index` of the open grid (`Cell#index`): a slot on
|
|
1489
|
+
doc "Open cell `index` of the open grid (`Cell#index`): a slot on control, focusable; its content follows until close(). Drops answer `dropped` as listItem's."
|
|
1492
1490
|
param index u32 "Its index."
|
|
1493
|
-
param selected bool "Drawn selected (
|
|
1491
|
+
param selected bool "Drawn selected (controlStrong with a primary bar)."
|
|
1494
1492
|
returns Response
|
|
1495
1493
|
}
|
|
1496
1494
|
```
|
|
1497
1495
|
|
|
1498
|
-
<sub>`api.ogt` line
|
|
1496
|
+
<sub>`api.ogt` line 11407</sub>
|
|
1499
1497
|
|
|
1500
1498
|
<a id="fn-closeList"></a>
|
|
1501
1499
|
|
|
@@ -1518,7 +1516,7 @@ fn closeList {
|
|
|
1518
1516
|
}
|
|
1519
1517
|
```
|
|
1520
1518
|
|
|
1521
|
-
<sub>`api.ogt` line
|
|
1519
|
+
<sub>`api.ogt` line 11414</sub>
|
|
1522
1520
|
|
|
1523
1521
|
<a id="fn-dragging"></a>
|
|
1524
1522
|
|
|
@@ -1546,7 +1544,7 @@ fn dragging {
|
|
|
1546
1544
|
}
|
|
1547
1545
|
```
|
|
1548
1546
|
|
|
1549
|
-
<sub>`api.ogt` line
|
|
1547
|
+
<sub>`api.ogt` line 11419</sub>
|
|
1550
1548
|
|
|
1551
1549
|
<a id="fn-list"></a>
|
|
1552
1550
|
|
|
@@ -1579,7 +1577,7 @@ fn list {
|
|
|
1579
1577
|
}
|
|
1580
1578
|
```
|
|
1581
1579
|
|
|
1582
|
-
<sub>`api.ogt` line
|
|
1580
|
+
<sub>`api.ogt` line 11425</sub>
|
|
1583
1581
|
|
|
1584
1582
|
<a id="fn-grid"></a>
|
|
1585
1583
|
|
|
@@ -1612,7 +1610,7 @@ fn grid {
|
|
|
1612
1610
|
}
|
|
1613
1611
|
```
|
|
1614
1612
|
|
|
1615
|
-
<sub>`api.ogt` line
|
|
1613
|
+
<sub>`api.ogt` line 11434</sub>
|
|
1616
1614
|
|
|
1617
1615
|
<a id="fn-tabs"></a>
|
|
1618
1616
|
|
|
@@ -1646,7 +1644,7 @@ fn tabs {
|
|
|
1646
1644
|
}
|
|
1647
1645
|
```
|
|
1648
1646
|
|
|
1649
|
-
<sub>`api.ogt` line
|
|
1647
|
+
<sub>`api.ogt` line 11443</sub>
|
|
1650
1648
|
|
|
1651
1649
|
<a id="fn-select"></a>
|
|
1652
1650
|
|
|
@@ -1680,7 +1678,7 @@ fn select {
|
|
|
1680
1678
|
}
|
|
1681
1679
|
```
|
|
1682
1680
|
|
|
1683
|
-
<sub>`api.ogt` line
|
|
1681
|
+
<sub>`api.ogt` line 11452</sub>
|
|
1684
1682
|
|
|
1685
1683
|
<a id="fn-stepper"></a>
|
|
1686
1684
|
|
|
@@ -1712,13 +1710,13 @@ fn stepper {
|
|
|
1712
1710
|
}
|
|
1713
1711
|
```
|
|
1714
1712
|
|
|
1715
|
-
<sub>`api.ogt` line
|
|
1713
|
+
<sub>`api.ogt` line 11461</sub>
|
|
1716
1714
|
|
|
1717
1715
|
<a id="fn-radio"></a>
|
|
1718
1716
|
|
|
1719
1717
|
### `og.ui.radio`
|
|
1720
1718
|
|
|
1721
|
-
A radio group of `Option#i` rows: a ring, filled
|
|
1719
|
+
A radio group of `Option#i` rows: a ring, filled primary when chosen, and a label.
|
|
1722
1720
|
|
|
1723
1721
|
```ts
|
|
1724
1722
|
og.ui.radio(id: string, options: readonly string[], selected: number, desc?: RadioDesc): ChoiceResult
|
|
@@ -1737,7 +1735,7 @@ Binding symbol `og_ui_radio` · publish builds: kept
|
|
|
1737
1735
|
|
|
1738
1736
|
```ogt
|
|
1739
1737
|
fn radio {
|
|
1740
|
-
doc "A radio group of `Option#i` rows: a ring, filled
|
|
1738
|
+
doc "A radio group of `Option#i` rows: a ring, filled primary when chosen, and a label."
|
|
1741
1739
|
param id String "Its id."
|
|
1742
1740
|
param options List.String "The option labels."
|
|
1743
1741
|
param selected u32 "The chosen index from game state."
|
|
@@ -1746,7 +1744,7 @@ fn radio {
|
|
|
1746
1744
|
}
|
|
1747
1745
|
```
|
|
1748
1746
|
|
|
1749
|
-
<sub>`api.ogt` line
|
|
1747
|
+
<sub>`api.ogt` line 11469</sub>
|
|
1750
1748
|
|
|
1751
1749
|
<a id="fn-checkbox"></a>
|
|
1752
1750
|
|
|
@@ -1778,7 +1776,7 @@ fn checkbox {
|
|
|
1778
1776
|
}
|
|
1779
1777
|
```
|
|
1780
1778
|
|
|
1781
|
-
<sub>`api.ogt` line
|
|
1779
|
+
<sub>`api.ogt` line 11478</sub>
|
|
1782
1780
|
|
|
1783
1781
|
<a id="fn-checkboxList"></a>
|
|
1784
1782
|
|
|
@@ -1810,13 +1808,13 @@ fn checkboxList {
|
|
|
1810
1808
|
}
|
|
1811
1809
|
```
|
|
1812
1810
|
|
|
1813
|
-
<sub>`api.ogt` line
|
|
1811
|
+
<sub>`api.ogt` line 11486</sub>
|
|
1814
1812
|
|
|
1815
1813
|
<a id="fn-chip"></a>
|
|
1816
1814
|
|
|
1817
1815
|
### `og.ui.chip`
|
|
1818
1816
|
|
|
1819
|
-
A chip: a
|
|
1817
|
+
A chip: a control-filled tag; selected inverts to ink. For filters and tags.
|
|
1820
1818
|
|
|
1821
1819
|
```ts
|
|
1822
1820
|
og.ui.chip(id: string, text: string, desc?: ChipDesc): Response
|
|
@@ -1834,7 +1832,7 @@ Binding symbol `og_ui_chip` · publish builds: kept
|
|
|
1834
1832
|
|
|
1835
1833
|
```ogt
|
|
1836
1834
|
fn chip {
|
|
1837
|
-
doc "A chip: a
|
|
1835
|
+
doc "A chip: a control-filled tag; selected inverts to ink. For filters and tags."
|
|
1838
1836
|
param id String "Its id."
|
|
1839
1837
|
param text String "The label."
|
|
1840
1838
|
param desc ChipDesc "Selected and disabled."
|
|
@@ -1842,13 +1840,13 @@ fn chip {
|
|
|
1842
1840
|
}
|
|
1843
1841
|
```
|
|
1844
1842
|
|
|
1845
|
-
<sub>`api.ogt` line
|
|
1843
|
+
<sub>`api.ogt` line 11494</sub>
|
|
1846
1844
|
|
|
1847
1845
|
<a id="fn-badge"></a>
|
|
1848
1846
|
|
|
1849
1847
|
### `og.ui.badge`
|
|
1850
1848
|
|
|
1851
|
-
A badge: a small status
|
|
1849
|
+
A badge: a small status tag in its tone.
|
|
1852
1850
|
|
|
1853
1851
|
```ts
|
|
1854
1852
|
og.ui.badge(id: string, text: string, tone: Tone): void
|
|
@@ -1866,7 +1864,7 @@ Binding symbol `og_ui_badge` · publish builds: kept
|
|
|
1866
1864
|
|
|
1867
1865
|
```ogt
|
|
1868
1866
|
fn badge {
|
|
1869
|
-
doc "A badge: a small status
|
|
1867
|
+
doc "A badge: a small status tag in its tone."
|
|
1870
1868
|
param id String "Its id."
|
|
1871
1869
|
param text String "The label (a count, a word)."
|
|
1872
1870
|
param tone Tone "Its tone."
|
|
@@ -1874,7 +1872,7 @@ fn badge {
|
|
|
1874
1872
|
}
|
|
1875
1873
|
```
|
|
1876
1874
|
|
|
1877
|
-
<sub>`api.ogt` line
|
|
1875
|
+
<sub>`api.ogt` line 11502</sub>
|
|
1878
1876
|
|
|
1879
1877
|
<a id="fn-divider"></a>
|
|
1880
1878
|
|
|
@@ -1904,7 +1902,7 @@ fn divider {
|
|
|
1904
1902
|
}
|
|
1905
1903
|
```
|
|
1906
1904
|
|
|
1907
|
-
<sub>`api.ogt` line
|
|
1905
|
+
<sub>`api.ogt` line 11510</sub>
|
|
1908
1906
|
|
|
1909
1907
|
<a id="fn-spacer"></a>
|
|
1910
1908
|
|
|
@@ -1934,13 +1932,13 @@ fn spacer {
|
|
|
1934
1932
|
}
|
|
1935
1933
|
```
|
|
1936
1934
|
|
|
1937
|
-
<sub>`api.ogt` line
|
|
1935
|
+
<sub>`api.ogt` line 11517</sub>
|
|
1938
1936
|
|
|
1939
1937
|
<a id="fn-keyValue"></a>
|
|
1940
1938
|
|
|
1941
1939
|
### `og.ui.keyValue`
|
|
1942
1940
|
|
|
1943
|
-
A key (
|
|
1941
|
+
A key (inkMuted) and its value (ink, at the end) on one row: stats, settings summaries, receipts.
|
|
1944
1942
|
|
|
1945
1943
|
```ts
|
|
1946
1944
|
og.ui.keyValue(id: string, key: string, value: string, mono: boolean): void
|
|
@@ -1959,7 +1957,7 @@ Binding symbol `og_ui_key_value` · publish builds: kept
|
|
|
1959
1957
|
|
|
1960
1958
|
```ogt
|
|
1961
1959
|
fn keyValue {
|
|
1962
|
-
doc "A key (
|
|
1960
|
+
doc "A key (inkMuted) and its value (ink, at the end) on one row: stats, settings summaries, receipts."
|
|
1963
1961
|
param id String "Its id."
|
|
1964
1962
|
param key String "The key."
|
|
1965
1963
|
param value String "The value."
|
|
@@ -1968,7 +1966,7 @@ fn keyValue {
|
|
|
1968
1966
|
}
|
|
1969
1967
|
```
|
|
1970
1968
|
|
|
1971
|
-
<sub>`api.ogt` line
|
|
1969
|
+
<sub>`api.ogt` line 11524</sub>
|
|
1972
1970
|
|
|
1973
1971
|
<a id="fn-skeleton"></a>
|
|
1974
1972
|
|
|
@@ -1998,7 +1996,7 @@ fn skeleton {
|
|
|
1998
1996
|
}
|
|
1999
1997
|
```
|
|
2000
1998
|
|
|
2001
|
-
<sub>`api.ogt` line
|
|
1999
|
+
<sub>`api.ogt` line 11533</sub>
|
|
2002
2000
|
|
|
2003
2001
|
<a id="fn-spinner"></a>
|
|
2004
2002
|
|
|
@@ -2028,7 +2026,7 @@ fn spinner {
|
|
|
2028
2026
|
}
|
|
2029
2027
|
```
|
|
2030
2028
|
|
|
2031
|
-
<sub>`api.ogt` line
|
|
2029
|
+
<sub>`api.ogt` line 11540</sub>
|
|
2032
2030
|
|
|
2033
2031
|
<a id="fn-icon"></a>
|
|
2034
2032
|
|
|
@@ -2060,7 +2058,7 @@ fn icon {
|
|
|
2060
2058
|
}
|
|
2061
2059
|
```
|
|
2062
2060
|
|
|
2063
|
-
<sub>`api.ogt` line
|
|
2061
|
+
<sub>`api.ogt` line 11547</sub>
|
|
2064
2062
|
|
|
2065
2063
|
<a id="fn-meter"></a>
|
|
2066
2064
|
|
|
@@ -2094,13 +2092,13 @@ fn meter {
|
|
|
2094
2092
|
}
|
|
2095
2093
|
```
|
|
2096
2094
|
|
|
2097
|
-
<sub>`api.ogt` line
|
|
2095
|
+
<sub>`api.ogt` line 11555</sub>
|
|
2098
2096
|
|
|
2099
2097
|
<a id="fn-cooldown"></a>
|
|
2100
2098
|
|
|
2101
2099
|
### `og.ui.cooldown`
|
|
2102
2100
|
|
|
2103
|
-
A cooldown: a disc whose
|
|
2101
|
+
A cooldown: a disc whose primary ring fills clockwise from the top as it runs out, bright and full when ready, a label or icon in the middle. A press reports clicked (ready or not).
|
|
2104
2102
|
|
|
2105
2103
|
```ts
|
|
2106
2104
|
og.ui.cooldown(id: string, remaining: number, desc?: CooldownDesc): Response
|
|
@@ -2118,7 +2116,7 @@ Binding symbol `og_ui_cooldown` · publish builds: kept
|
|
|
2118
2116
|
|
|
2119
2117
|
```ogt
|
|
2120
2118
|
fn cooldown {
|
|
2121
|
-
doc "A cooldown: a disc whose
|
|
2119
|
+
doc "A cooldown: a disc whose primary ring fills clockwise from the top as it runs out, bright and full when ready, a label or icon in the middle. A press reports clicked (ready or not)."
|
|
2122
2120
|
param id String "Its id."
|
|
2123
2121
|
param remaining f32 "How much of the cooldown is left, 0 to 1: 1 just used, 0 ready."
|
|
2124
2122
|
param desc CooldownDesc "Size, label and icon."
|
|
@@ -2126,13 +2124,13 @@ fn cooldown {
|
|
|
2126
2124
|
}
|
|
2127
2125
|
```
|
|
2128
2126
|
|
|
2129
|
-
<sub>`api.ogt` line
|
|
2127
|
+
<sub>`api.ogt` line 11564</sub>
|
|
2130
2128
|
|
|
2131
2129
|
<a id="fn-minimap"></a>
|
|
2132
2130
|
|
|
2133
2131
|
### `og.ui.minimap`
|
|
2134
2132
|
|
|
2135
|
-
A mini-map frame: the map in a
|
|
2133
|
+
A mini-map frame: the map in a lineStrong frame, markers as dots (the player primary and ringed), an N mark and a zone label.
|
|
2136
2134
|
|
|
2137
2135
|
```ts
|
|
2138
2136
|
og.ui.minimap(id: string, desc?: MinimapDesc): void
|
|
@@ -2149,20 +2147,20 @@ Binding symbol `og_ui_minimap` · publish builds: kept
|
|
|
2149
2147
|
|
|
2150
2148
|
```ogt
|
|
2151
2149
|
fn minimap {
|
|
2152
|
-
doc "A mini-map frame: the map in a
|
|
2150
|
+
doc "A mini-map frame: the map in a lineStrong frame, markers as dots (the player primary and ringed), an N mark and a zone label."
|
|
2153
2151
|
param id String "Its id."
|
|
2154
2152
|
param desc MinimapDesc "Map, markers and label."
|
|
2155
2153
|
returns Void
|
|
2156
2154
|
}
|
|
2157
2155
|
```
|
|
2158
2156
|
|
|
2159
|
-
<sub>`api.ogt` line
|
|
2157
|
+
<sub>`api.ogt` line 11572</sub>
|
|
2160
2158
|
|
|
2161
2159
|
<a id="fn-dialogue"></a>
|
|
2162
2160
|
|
|
2163
2161
|
### `og.ui.dialogue`
|
|
2164
2162
|
|
|
2165
|
-
A dialogue box: a portrait slot, the speaker in
|
|
2163
|
+
A dialogue box: a portrait slot, the speaker in primary ink and the line typed out by the tick. A press or Activate while typing shows the whole line; once shown it answers advanced. The line is `<id>/Body/Line` and the probe reads what is shown.
|
|
2166
2164
|
|
|
2167
2165
|
```ts
|
|
2168
2166
|
og.ui.dialogue(id: string, desc?: DialogueDesc): DialogueResult
|
|
@@ -2179,14 +2177,14 @@ Binding symbol `og_ui_dialogue` · publish builds: kept
|
|
|
2179
2177
|
|
|
2180
2178
|
```ogt
|
|
2181
2179
|
fn dialogue {
|
|
2182
|
-
doc "A dialogue box: a portrait slot, the speaker in
|
|
2180
|
+
doc "A dialogue box: a portrait slot, the speaker in primary ink and the line typed out by the tick. A press or Activate while typing shows the whole line; once shown it answers advanced. The line is `<id>/Body/Line` and the probe reads what is shown."
|
|
2183
2181
|
param id String "Its id."
|
|
2184
2182
|
param desc DialogueDesc "Speaker, text, portrait and speed."
|
|
2185
2183
|
returns DialogueResult
|
|
2186
2184
|
}
|
|
2187
2185
|
```
|
|
2188
2186
|
|
|
2189
|
-
<sub>`api.ogt` line
|
|
2187
|
+
<sub>`api.ogt` line 11579</sub>
|
|
2190
2188
|
|
|
2191
2189
|
<a id="fn-joystick"></a>
|
|
2192
2190
|
|
|
@@ -2216,7 +2214,7 @@ fn joystick {
|
|
|
2216
2214
|
}
|
|
2217
2215
|
```
|
|
2218
2216
|
|
|
2219
|
-
<sub>`api.ogt` line
|
|
2217
|
+
<sub>`api.ogt` line 11586</sub>
|
|
2220
2218
|
|
|
2221
2219
|
<a id="fn-dpad"></a>
|
|
2222
2220
|
|
|
@@ -2246,13 +2244,13 @@ fn dpad {
|
|
|
2246
2244
|
}
|
|
2247
2245
|
```
|
|
2248
2246
|
|
|
2249
|
-
<sub>`api.ogt` line
|
|
2247
|
+
<sub>`api.ogt` line 11593</sub>
|
|
2250
2248
|
|
|
2251
2249
|
<a id="fn-actionButton"></a>
|
|
2252
2250
|
|
|
2253
2251
|
### `og.ui.actionButton`
|
|
2254
2252
|
|
|
2255
|
-
A
|
|
2253
|
+
A square touch action button, cornered by the style's control radius: pressed while held (jump, fire), clicked on a tap; at least 44 CSS px.
|
|
2256
2254
|
|
|
2257
2255
|
```ts
|
|
2258
2256
|
og.ui.actionButton(id: string, text: string, desc?: ActionButtonDesc): Response
|
|
@@ -2270,7 +2268,7 @@ Binding symbol `og_ui_action_button` · publish builds: kept
|
|
|
2270
2268
|
|
|
2271
2269
|
```ogt
|
|
2272
2270
|
fn actionButton {
|
|
2273
|
-
doc "A
|
|
2271
|
+
doc "A square touch action button, cornered by the style's control radius: pressed while held (jump, fire), clicked on a tap; at least 44 CSS px."
|
|
2274
2272
|
param id String "Its id."
|
|
2275
2273
|
param text String "Its label (and what the probe reads)."
|
|
2276
2274
|
param desc ActionButtonDesc "Size, primary and icon."
|
|
@@ -2278,7 +2276,7 @@ fn actionButton {
|
|
|
2278
2276
|
}
|
|
2279
2277
|
```
|
|
2280
2278
|
|
|
2281
|
-
<sub>`api.ogt` line
|
|
2279
|
+
<sub>`api.ogt` line 11600</sub>
|
|
2282
2280
|
|
|
2283
2281
|
<a id="fn-toast"></a>
|
|
2284
2282
|
|
|
@@ -2310,7 +2308,7 @@ fn toast {
|
|
|
2310
2308
|
}
|
|
2311
2309
|
```
|
|
2312
2310
|
|
|
2313
|
-
<sub>`api.ogt` line
|
|
2311
|
+
<sub>`api.ogt` line 11608</sub>
|
|
2314
2312
|
|
|
2315
2313
|
<a id="fn-dismissToast"></a>
|
|
2316
2314
|
|
|
@@ -2340,7 +2338,7 @@ fn dismissToast {
|
|
|
2340
2338
|
}
|
|
2341
2339
|
```
|
|
2342
2340
|
|
|
2343
|
-
<sub>`api.ogt` line
|
|
2341
|
+
<sub>`api.ogt` line 11616</sub>
|
|
2344
2342
|
|
|
2345
2343
|
<a id="fn-navigate"></a>
|
|
2346
2344
|
|
|
@@ -2370,7 +2368,7 @@ fn navigate {
|
|
|
2370
2368
|
}
|
|
2371
2369
|
```
|
|
2372
2370
|
|
|
2373
|
-
<sub>`api.ogt` line
|
|
2371
|
+
<sub>`api.ogt` line 11623</sub>
|
|
2374
2372
|
|
|
2375
2373
|
<a id="fn-back"></a>
|
|
2376
2374
|
|
|
@@ -2393,7 +2391,7 @@ fn back {
|
|
|
2393
2391
|
}
|
|
2394
2392
|
```
|
|
2395
2393
|
|
|
2396
|
-
<sub>`api.ogt` line
|
|
2394
|
+
<sub>`api.ogt` line 11630</sub>
|
|
2397
2395
|
|
|
2398
2396
|
<a id="fn-setPlayers"></a>
|
|
2399
2397
|
|
|
@@ -2421,7 +2419,7 @@ fn setPlayers {
|
|
|
2421
2419
|
}
|
|
2422
2420
|
```
|
|
2423
2421
|
|
|
2424
|
-
<sub>`api.ogt` line
|
|
2422
|
+
<sub>`api.ogt` line 11635</sub>
|
|
2425
2423
|
|
|
2426
2424
|
<a id="fn-focus"></a>
|
|
2427
2425
|
|
|
@@ -2449,7 +2447,7 @@ fn focus {
|
|
|
2449
2447
|
}
|
|
2450
2448
|
```
|
|
2451
2449
|
|
|
2452
|
-
<sub>`api.ogt` line
|
|
2450
|
+
<sub>`api.ogt` line 11641</sub>
|
|
2453
2451
|
|
|
2454
2452
|
<a id="fn-a11y"></a>
|
|
2455
2453
|
|
|
@@ -2472,7 +2470,7 @@ fn a11y {
|
|
|
2472
2470
|
}
|
|
2473
2471
|
```
|
|
2474
2472
|
|
|
2475
|
-
<sub>`api.ogt` line
|
|
2473
|
+
<sub>`api.ogt` line 11680</sub>
|
|
2476
2474
|
|
|
2477
2475
|
<a id="fn-setNavigation"></a>
|
|
2478
2476
|
|
|
@@ -2500,7 +2498,7 @@ fn setNavigation {
|
|
|
2500
2498
|
}
|
|
2501
2499
|
```
|
|
2502
2500
|
|
|
2503
|
-
<sub>`api.ogt` line
|
|
2501
|
+
<sub>`api.ogt` line 11685</sub>
|
|
2504
2502
|
|
|
2505
2503
|
<a id="fn-memory"></a>
|
|
2506
2504
|
|
|
@@ -2530,7 +2528,7 @@ fn memory {
|
|
|
2530
2528
|
}
|
|
2531
2529
|
```
|
|
2532
2530
|
|
|
2533
|
-
<sub>`api.ogt` line
|
|
2531
|
+
<sub>`api.ogt` line 11691</sub>
|
|
2534
2532
|
|
|
2535
2533
|
<a id="fn-remember"></a>
|
|
2536
2534
|
|
|
@@ -2560,7 +2558,7 @@ fn remember {
|
|
|
2560
2558
|
}
|
|
2561
2559
|
```
|
|
2562
2560
|
|
|
2563
|
-
<sub>`api.ogt` line
|
|
2561
|
+
<sub>`api.ogt` line 11698</sub>
|
|
2564
2562
|
|
|
2565
2563
|
<a id="fn-tick"></a>
|
|
2566
2564
|
|
|
@@ -2583,13 +2581,13 @@ fn tick {
|
|
|
2583
2581
|
}
|
|
2584
2582
|
```
|
|
2585
2583
|
|
|
2586
|
-
<sub>`api.ogt` line
|
|
2584
|
+
<sub>`api.ogt` line 11705</sub>
|
|
2587
2585
|
|
|
2588
2586
|
<a id="fn-counter"></a>
|
|
2589
2587
|
|
|
2590
2588
|
### `og.ui.counter`
|
|
2591
2589
|
|
|
2592
|
-
A number label that counts (ease-out cubic, by the tick) from where it was to the value each time the value changes, grouped with commas; a
|
|
2590
|
+
A number label that counts (ease-out cubic, by the tick) from where it was to the value each time the value changes, grouped with commas; a style with motion.pop bumps it when it lands. Scores, currency, rewards.
|
|
2593
2591
|
|
|
2594
2592
|
```ts
|
|
2595
2593
|
og.ui.counter(id: string, value: number, desc?: CounterDesc): number
|
|
@@ -2607,7 +2605,7 @@ Binding symbol `og_ui_counter` · publish builds: kept
|
|
|
2607
2605
|
|
|
2608
2606
|
```ogt
|
|
2609
2607
|
fn counter {
|
|
2610
|
-
doc "A number label that counts (ease-out cubic, by the tick) from where it was to the value each time the value changes, grouped with commas; a
|
|
2608
|
+
doc "A number label that counts (ease-out cubic, by the tick) from where it was to the value each time the value changes, grouped with commas; a style with motion.pop bumps it when it lands. Scores, currency, rewards."
|
|
2611
2609
|
param id String "Its id."
|
|
2612
2610
|
param value f64 "The value to count to."
|
|
2613
2611
|
param desc CounterDesc "Look, duration, start and format."
|
|
@@ -2615,7 +2613,7 @@ fn counter {
|
|
|
2615
2613
|
}
|
|
2616
2614
|
```
|
|
2617
2615
|
|
|
2618
|
-
<sub>`api.ogt` line
|
|
2616
|
+
<sub>`api.ogt` line 11728</sub>
|
|
2619
2617
|
|
|
2620
2618
|
<a id="fn-burst"></a>
|
|
2621
2619
|
|
|
@@ -2643,13 +2641,13 @@ fn burst {
|
|
|
2643
2641
|
}
|
|
2644
2642
|
```
|
|
2645
2643
|
|
|
2646
|
-
<sub>`api.ogt` line
|
|
2644
|
+
<sub>`api.ogt` line 11755</sub>
|
|
2647
2645
|
|
|
2648
2646
|
<a id="fn-shake"></a>
|
|
2649
2647
|
|
|
2650
2648
|
### `og.ui.shake`
|
|
2651
2649
|
|
|
2652
|
-
Shake the element built just before, from this tick (a wrong answer, a locked door, a refused purchase): call it once, on the tick it happens; the element swings and comes to rest by itself, and snapshots carry it. Still under reduced motion. A refused press on a disabled button already shakes when the
|
|
2650
|
+
Shake the element built just before, from this tick (a wrong answer, a locked door, a refused purchase): call it once, on the tick it happens; the element swings and comes to rest by itself, and snapshots carry it. Still under reduced motion. A refused press on a disabled button already shakes when the style's motion.shake is set.
|
|
2653
2651
|
|
|
2654
2652
|
```ts
|
|
2655
2653
|
og.ui.shake(desc?: ShakeDesc): void
|
|
@@ -2665,13 +2663,13 @@ Binding symbol `og_ui_shake` · publish builds: kept
|
|
|
2665
2663
|
|
|
2666
2664
|
```ogt
|
|
2667
2665
|
fn shake {
|
|
2668
|
-
doc "Shake the element built just before, from this tick (a wrong answer, a locked door, a refused purchase): call it once, on the tick it happens; the element swings and comes to rest by itself, and snapshots carry it. Still under reduced motion. A refused press on a disabled button already shakes when the
|
|
2666
|
+
doc "Shake the element built just before, from this tick (a wrong answer, a locked door, a refused purchase): call it once, on the tick it happens; the element swings and comes to rest by itself, and snapshots carry it. Still under reduced motion. A refused press on a disabled button already shakes when the style's motion.shake is set."
|
|
2669
2667
|
param desc ShakeDesc "Amount, duration and sound."
|
|
2670
2668
|
returns Void
|
|
2671
2669
|
}
|
|
2672
2670
|
```
|
|
2673
2671
|
|
|
2674
|
-
<sub>`api.ogt` line
|
|
2672
|
+
<sub>`api.ogt` line 11775</sub>
|
|
2675
2673
|
|
|
2676
2674
|
<a id="fn-screenTransition"></a>
|
|
2677
2675
|
|
|
@@ -2703,7 +2701,7 @@ fn screenTransition {
|
|
|
2703
2701
|
}
|
|
2704
2702
|
```
|
|
2705
2703
|
|
|
2706
|
-
<sub>`api.ogt` line
|
|
2704
|
+
<sub>`api.ogt` line 11821</sub>
|
|
2707
2705
|
|
|
2708
2706
|
<a id="fn-previewViewport"></a>
|
|
2709
2707
|
|
|
@@ -2733,7 +2731,7 @@ fn previewViewport {
|
|
|
2733
2731
|
}
|
|
2734
2732
|
```
|
|
2735
2733
|
|
|
2736
|
-
<sub>`api.ogt` line
|
|
2734
|
+
<sub>`api.ogt` line 11829</sub>
|
|
2737
2735
|
|
|
2738
2736
|
<a id="fn-mainMenu"></a>
|
|
2739
2737
|
|
|
@@ -2764,7 +2762,7 @@ fn mainMenu {
|
|
|
2764
2762
|
}
|
|
2765
2763
|
```
|
|
2766
2764
|
|
|
2767
|
-
<sub>`api.ogt` line
|
|
2765
|
+
<sub>`api.ogt` line 12550</sub>
|
|
2768
2766
|
|
|
2769
2767
|
<a id="fn-pauseMenu"></a>
|
|
2770
2768
|
|
|
@@ -2795,7 +2793,7 @@ fn pauseMenu {
|
|
|
2795
2793
|
}
|
|
2796
2794
|
```
|
|
2797
2795
|
|
|
2798
|
-
<sub>`api.ogt` line
|
|
2796
|
+
<sub>`api.ogt` line 12558</sub>
|
|
2799
2797
|
|
|
2800
2798
|
<a id="fn-settingsScreen"></a>
|
|
2801
2799
|
|
|
@@ -2826,7 +2824,7 @@ fn settingsScreen {
|
|
|
2826
2824
|
}
|
|
2827
2825
|
```
|
|
2828
2826
|
|
|
2829
|
-
<sub>`api.ogt` line
|
|
2827
|
+
<sub>`api.ogt` line 12566</sub>
|
|
2830
2828
|
|
|
2831
2829
|
<a id="fn-platformerHud"></a>
|
|
2832
2830
|
|
|
@@ -2857,7 +2855,7 @@ fn platformerHud {
|
|
|
2857
2855
|
}
|
|
2858
2856
|
```
|
|
2859
2857
|
|
|
2860
|
-
<sub>`api.ogt` line
|
|
2858
|
+
<sub>`api.ogt` line 12574</sub>
|
|
2861
2859
|
|
|
2862
2860
|
<a id="fn-shooterHud"></a>
|
|
2863
2861
|
|
|
@@ -2888,7 +2886,7 @@ fn shooterHud {
|
|
|
2888
2886
|
}
|
|
2889
2887
|
```
|
|
2890
2888
|
|
|
2891
|
-
<sub>`api.ogt` line
|
|
2889
|
+
<sub>`api.ogt` line 12582</sub>
|
|
2892
2890
|
|
|
2893
2891
|
<a id="fn-puzzleHud"></a>
|
|
2894
2892
|
|
|
@@ -2919,7 +2917,7 @@ fn puzzleHud {
|
|
|
2919
2917
|
}
|
|
2920
2918
|
```
|
|
2921
2919
|
|
|
2922
|
-
<sub>`api.ogt` line
|
|
2920
|
+
<sub>`api.ogt` line 12590</sub>
|
|
2923
2921
|
|
|
2924
2922
|
<a id="fn-idleHud"></a>
|
|
2925
2923
|
|
|
@@ -2950,7 +2948,7 @@ fn idleHud {
|
|
|
2950
2948
|
}
|
|
2951
2949
|
```
|
|
2952
2950
|
|
|
2953
|
-
<sub>`api.ogt` line
|
|
2951
|
+
<sub>`api.ogt` line 12598</sub>
|
|
2954
2952
|
|
|
2955
2953
|
<a id="fn-racingHud"></a>
|
|
2956
2954
|
|
|
@@ -2981,7 +2979,7 @@ fn racingHud {
|
|
|
2981
2979
|
}
|
|
2982
2980
|
```
|
|
2983
2981
|
|
|
2984
|
-
<sub>`api.ogt` line
|
|
2982
|
+
<sub>`api.ogt` line 12606</sub>
|
|
2985
2983
|
|
|
2986
2984
|
<a id="fn-cutscene"></a>
|
|
2987
2985
|
|
|
@@ -3012,7 +3010,7 @@ fn cutscene {
|
|
|
3012
3010
|
}
|
|
3013
3011
|
```
|
|
3014
3012
|
|
|
3015
|
-
<sub>`api.ogt` line
|
|
3013
|
+
<sub>`api.ogt` line 12614</sub>
|
|
3016
3014
|
|
|
3017
3015
|
<a id="fn-shopScreen"></a>
|
|
3018
3016
|
|
|
@@ -3043,7 +3041,7 @@ fn shopScreen {
|
|
|
3043
3041
|
}
|
|
3044
3042
|
```
|
|
3045
3043
|
|
|
3046
|
-
<sub>`api.ogt` line
|
|
3044
|
+
<sub>`api.ogt` line 12622</sub>
|
|
3047
3045
|
|
|
3048
3046
|
<a id="fn-inventoryScreen"></a>
|
|
3049
3047
|
|
|
@@ -3074,7 +3072,7 @@ fn inventoryScreen {
|
|
|
3074
3072
|
}
|
|
3075
3073
|
```
|
|
3076
3074
|
|
|
3077
|
-
<sub>`api.ogt` line
|
|
3075
|
+
<sub>`api.ogt` line 12630</sub>
|
|
3078
3076
|
|
|
3079
3077
|
<a id="fn-levelSelect"></a>
|
|
3080
3078
|
|
|
@@ -3105,7 +3103,7 @@ fn levelSelect {
|
|
|
3105
3103
|
}
|
|
3106
3104
|
```
|
|
3107
3105
|
|
|
3108
|
-
<sub>`api.ogt` line
|
|
3106
|
+
<sub>`api.ogt` line 12638</sub>
|
|
3109
3107
|
|
|
3110
3108
|
<a id="fn-resultsScreen"></a>
|
|
3111
3109
|
|
|
@@ -3136,7 +3134,7 @@ fn resultsScreen {
|
|
|
3136
3134
|
}
|
|
3137
3135
|
```
|
|
3138
3136
|
|
|
3139
|
-
<sub>`api.ogt` line
|
|
3137
|
+
<sub>`api.ogt` line 12646</sub>
|
|
3140
3138
|
|
|
3141
3139
|
<a id="fn-leaderboardScreen"></a>
|
|
3142
3140
|
|
|
@@ -3167,7 +3165,7 @@ fn leaderboardScreen {
|
|
|
3167
3165
|
}
|
|
3168
3166
|
```
|
|
3169
3167
|
|
|
3170
|
-
<sub>`api.ogt` line
|
|
3168
|
+
<sub>`api.ogt` line 12654</sub>
|
|
3171
3169
|
|
|
3172
3170
|
<a id="fn-tutorialOverlay"></a>
|
|
3173
3171
|
|
|
@@ -3198,7 +3196,7 @@ fn tutorialOverlay {
|
|
|
3198
3196
|
}
|
|
3199
3197
|
```
|
|
3200
3198
|
|
|
3201
|
-
<sub>`api.ogt` line
|
|
3199
|
+
<sub>`api.ogt` line 12662</sub>
|
|
3202
3200
|
|
|
3203
3201
|
<a id="fn-loadingScreen"></a>
|
|
3204
3202
|
|
|
@@ -3229,7 +3227,7 @@ fn loadingScreen {
|
|
|
3229
3227
|
}
|
|
3230
3228
|
```
|
|
3231
3229
|
|
|
3232
|
-
<sub>`api.ogt` line
|
|
3230
|
+
<sub>`api.ogt` line 12670</sub>
|
|
3233
3231
|
|
|
3234
3232
|
<a id="fn-confirmDialog"></a>
|
|
3235
3233
|
|
|
@@ -3260,7 +3258,7 @@ fn confirmDialog {
|
|
|
3260
3258
|
}
|
|
3261
3259
|
```
|
|
3262
3260
|
|
|
3263
|
-
<sub>`api.ogt` line
|
|
3261
|
+
<sub>`api.ogt` line 12678</sub>
|
|
3264
3262
|
|
|
3265
3263
|
<a id="fn-alertDialog"></a>
|
|
3266
3264
|
|
|
@@ -3291,7 +3289,7 @@ fn alertDialog {
|
|
|
3291
3289
|
}
|
|
3292
3290
|
```
|
|
3293
3291
|
|
|
3294
|
-
<sub>`api.ogt` line
|
|
3292
|
+
<sub>`api.ogt` line 12686</sub>
|
|
3295
3293
|
|
|
3296
3294
|
## Types
|
|
3297
3295
|
|
|
@@ -3316,7 +3314,7 @@ enum Direction {
|
|
|
3316
3314
|
}
|
|
3317
3315
|
```
|
|
3318
3316
|
|
|
3319
|
-
<sub>`api.ogt` line
|
|
3317
|
+
<sub>`api.ogt` line 10131</sub>
|
|
3320
3318
|
|
|
3321
3319
|
<a id="type-Align"></a>
|
|
3322
3320
|
|
|
@@ -3343,7 +3341,7 @@ enum Align {
|
|
|
3343
3341
|
}
|
|
3344
3342
|
```
|
|
3345
3343
|
|
|
3346
|
-
<sub>`api.ogt` line
|
|
3344
|
+
<sub>`api.ogt` line 10137</sub>
|
|
3347
3345
|
|
|
3348
3346
|
<a id="type-Cross"></a>
|
|
3349
3347
|
|
|
@@ -3370,7 +3368,7 @@ enum Cross {
|
|
|
3370
3368
|
}
|
|
3371
3369
|
```
|
|
3372
3370
|
|
|
3373
|
-
<sub>`api.ogt` line
|
|
3371
|
+
<sub>`api.ogt` line 10145</sub>
|
|
3374
3372
|
|
|
3375
3373
|
<a id="type-TextAlign"></a>
|
|
3376
3374
|
|
|
@@ -3395,7 +3393,7 @@ enum TextAlign {
|
|
|
3395
3393
|
}
|
|
3396
3394
|
```
|
|
3397
3395
|
|
|
3398
|
-
<sub>`api.ogt` line
|
|
3396
|
+
<sub>`api.ogt` line 10153</sub>
|
|
3399
3397
|
|
|
3400
3398
|
<a id="type-FontRole"></a>
|
|
3401
3399
|
|
|
@@ -3410,7 +3408,7 @@ A string: one of the variants below. The zero value is `"body"`.
|
|
|
3410
3408
|
| `"body"` | The body font. |
|
|
3411
3409
|
| `"display"` | The display font. |
|
|
3412
3410
|
| `"mono"` | The monospaced font. |
|
|
3413
|
-
| `"rounded"` | The rounded font, for levels and scores
|
|
3411
|
+
| `"rounded"` | The rounded font, for levels and scores. |
|
|
3414
3412
|
|
|
3415
3413
|
```ogt
|
|
3416
3414
|
enum FontRole {
|
|
@@ -3418,38 +3416,38 @@ enum FontRole {
|
|
|
3418
3416
|
variant body "The body font."
|
|
3419
3417
|
variant display "The display font."
|
|
3420
3418
|
variant mono "The monospaced font."
|
|
3421
|
-
variant rounded "The rounded font, for levels and scores
|
|
3419
|
+
variant rounded "The rounded font, for levels and scores."
|
|
3422
3420
|
}
|
|
3423
3421
|
```
|
|
3424
3422
|
|
|
3425
|
-
<sub>`api.ogt` line
|
|
3423
|
+
<sub>`api.ogt` line 10160</sub>
|
|
3426
3424
|
|
|
3427
3425
|
<a id="type-ButtonVariant"></a>
|
|
3428
3426
|
|
|
3429
3427
|
### `ButtonVariant` (enum)
|
|
3430
3428
|
|
|
3431
|
-
Button
|
|
3429
|
+
Button roles: how the style draws each.
|
|
3432
3430
|
|
|
3433
3431
|
A string: one of the variants below. The zero value is `"secondary"`.
|
|
3434
3432
|
|
|
3435
3433
|
| Variant | Doc |
|
|
3436
3434
|
|---|---|
|
|
3437
3435
|
| `"secondary"` | A neutral fill (the default). |
|
|
3438
|
-
| `"primary"` | The
|
|
3436
|
+
| `"primary"` | The primary action: one per screen. |
|
|
3439
3437
|
| `"quiet"` | Text until hovered. |
|
|
3440
3438
|
| `"danger"` | A destructive action: danger ink on the danger tint. |
|
|
3441
3439
|
|
|
3442
3440
|
```ogt
|
|
3443
3441
|
enum ButtonVariant {
|
|
3444
|
-
doc "Button
|
|
3442
|
+
doc "Button roles: how the style draws each."
|
|
3445
3443
|
variant secondary "A neutral fill (the default)."
|
|
3446
|
-
variant primary "The
|
|
3444
|
+
variant primary "The primary action: one per screen."
|
|
3447
3445
|
variant quiet "Text until hovered."
|
|
3448
3446
|
variant danger "A destructive action: danger ink on the danger tint."
|
|
3449
3447
|
}
|
|
3450
3448
|
```
|
|
3451
3449
|
|
|
3452
|
-
<sub>`api.ogt` line
|
|
3450
|
+
<sub>`api.ogt` line 10168</sub>
|
|
3453
3451
|
|
|
3454
3452
|
<a id="type-ControlSize"></a>
|
|
3455
3453
|
|
|
@@ -3474,7 +3472,7 @@ enum ControlSize {
|
|
|
3474
3472
|
}
|
|
3475
3473
|
```
|
|
3476
3474
|
|
|
3477
|
-
<sub>`api.ogt` line
|
|
3475
|
+
<sub>`api.ogt` line 10176</sub>
|
|
3478
3476
|
|
|
3479
3477
|
<a id="type-Scheme"></a>
|
|
3480
3478
|
|
|
@@ -3497,204 +3495,180 @@ enum Scheme {
|
|
|
3497
3495
|
}
|
|
3498
3496
|
```
|
|
3499
3497
|
|
|
3500
|
-
<sub>`api.ogt` line
|
|
3498
|
+
<sub>`api.ogt` line 10183</sub>
|
|
3501
3499
|
|
|
3502
3500
|
<a id="type-DensityMode"></a>
|
|
3503
3501
|
|
|
3504
3502
|
### `DensityMode` (enum)
|
|
3505
3503
|
|
|
3506
|
-
Control sizes: auto picks touch sizes on a coarse pointer or a play surface under 768 px,
|
|
3504
|
+
Control sizes by the input the player holds: auto picks touch sizes on a coarse pointer or a play surface under 768 px, mouse sizes otherwise.
|
|
3507
3505
|
|
|
3508
3506
|
A string: one of the variants below. The zero value is `"auto"`.
|
|
3509
3507
|
|
|
3510
3508
|
| Variant | Doc |
|
|
3511
3509
|
|---|---|
|
|
3512
|
-
| `"auto"` | Touch sizes on a coarse pointer or a narrow surface,
|
|
3513
|
-
| `"
|
|
3514
|
-
| `"
|
|
3515
|
-
| `"touch"` |
|
|
3510
|
+
| `"auto"` | Touch sizes on a coarse pointer or a narrow surface, mouse sizes otherwise. |
|
|
3511
|
+
| `"mouse"` | A mouse and keyboard: the tightest controls. |
|
|
3512
|
+
| `"pad"` | A gamepad across a room: larger controls, rows and gutters that read from a couch. |
|
|
3513
|
+
| `"touch"` | A finger: every control at least 44 CSS px. |
|
|
3516
3514
|
|
|
3517
3515
|
```ogt
|
|
3518
3516
|
enum DensityMode {
|
|
3519
|
-
doc "Control sizes: auto picks touch sizes on a coarse pointer or a play surface under 768 px,
|
|
3520
|
-
variant auto "Touch sizes on a coarse pointer or a narrow surface,
|
|
3521
|
-
variant
|
|
3522
|
-
variant
|
|
3523
|
-
variant touch "
|
|
3517
|
+
doc "Control sizes by the input the player holds: auto picks touch sizes on a coarse pointer or a play surface under 768 px, mouse sizes otherwise."
|
|
3518
|
+
variant auto "Touch sizes on a coarse pointer or a narrow surface, mouse sizes otherwise."
|
|
3519
|
+
variant mouse "A mouse and keyboard: the tightest controls."
|
|
3520
|
+
variant pad "A gamepad across a room: larger controls, rows and gutters that read from a couch."
|
|
3521
|
+
variant touch "A finger: every control at least 44 CSS px."
|
|
3524
3522
|
}
|
|
3525
3523
|
```
|
|
3526
3524
|
|
|
3527
|
-
<sub>`api.ogt` line
|
|
3525
|
+
<sub>`api.ogt` line 10189</sub>
|
|
3528
3526
|
|
|
3529
3527
|
<a id="type-ThemeColor"></a>
|
|
3530
3528
|
|
|
3531
3529
|
### `ThemeColor` (enum)
|
|
3532
3530
|
|
|
3533
|
-
A
|
|
3531
|
+
A colour role of the UI style in effect (the game's style, or the prototype style before it picks one).
|
|
3534
3532
|
|
|
3535
|
-
A string: one of the variants below. The zero value is `"
|
|
3533
|
+
A string: one of the variants below. The zero value is `"backdrop"`.
|
|
3536
3534
|
|
|
3537
3535
|
| Variant | Doc |
|
|
3538
3536
|
|---|---|
|
|
3539
|
-
| `"
|
|
3540
|
-
| `"
|
|
3541
|
-
| `"
|
|
3542
|
-
| `"
|
|
3543
|
-
| `"
|
|
3544
|
-
| `"
|
|
3545
|
-
| `"
|
|
3546
|
-
| `"
|
|
3547
|
-
| `"
|
|
3548
|
-
| `"
|
|
3549
|
-
| `"
|
|
3550
|
-
| `"
|
|
3551
|
-
| `"
|
|
3552
|
-
| `"
|
|
3553
|
-
| `"
|
|
3554
|
-
| `"
|
|
3555
|
-
| `"
|
|
3556
|
-
| `"
|
|
3557
|
-
| `"
|
|
3558
|
-
| `"
|
|
3559
|
-
| `"
|
|
3560
|
-
| `"
|
|
3561
|
-
| `"
|
|
3562
|
-
| `"
|
|
3563
|
-
| `"
|
|
3564
|
-
| `"
|
|
3565
|
-
| `"
|
|
3566
|
-
| `"
|
|
3567
|
-
| `"
|
|
3568
|
-
| `"
|
|
3569
|
-
| `"
|
|
3570
|
-
| `"
|
|
3571
|
-
| `"
|
|
3572
|
-
| `"stageBorder"` | stage-border. |
|
|
3573
|
-
| `"stageDanger"` | stage-danger. |
|
|
3574
|
-
| `"stageFg"` | stage-fg. |
|
|
3575
|
-
| `"stageMuted"` | stage-muted. |
|
|
3576
|
-
| `"stageRaised"` | stage-raised. |
|
|
3577
|
-
| `"stageSurface"` | stage-surface. |
|
|
3578
|
-
| `"success"` | success. |
|
|
3579
|
-
| `"surface"` | surface: cards and panels. |
|
|
3580
|
-
| `"surfaceHover"` | surface-hover. |
|
|
3581
|
-
| `"surfaceRaised"` | surface-raised: tooltips. |
|
|
3582
|
-
| `"thumb"` | thumb: slider and switch thumbs. |
|
|
3583
|
-
| `"warn"` | warn. |
|
|
3537
|
+
| `"backdrop"` | The screen behind the UI where nothing else is. |
|
|
3538
|
+
| `"well"` | A recessed ground inside a panel: wells, map frames, empty slots. |
|
|
3539
|
+
| `"panel"` | Panels and cards. |
|
|
3540
|
+
| `"panelHover"` | A panel under the pointer. |
|
|
3541
|
+
| `"panelRaised"` | Dialogs, menus and tooltips. |
|
|
3542
|
+
| `"line"` | Hairlines and frames. |
|
|
3543
|
+
| `"lineStrong"` | Stronger frames: high contrast, map borders, scrollbars. |
|
|
3544
|
+
| `"ink"` | The main ink. |
|
|
3545
|
+
| `"inkMuted"` | Secondary ink: captions, keys, inactive tabs. |
|
|
3546
|
+
| `"inkFaint"` | The faintest ink that still reads: placeholders, hints. |
|
|
3547
|
+
| `"inkInverse"` | Ink on a ground of ink (a selected chip). |
|
|
3548
|
+
| `"control"` | Neutral control fills: secondary buttons, tracks, fields. |
|
|
3549
|
+
| `"controlStrong"` | A neutral control hovered or pressed; selection. |
|
|
3550
|
+
| `"primary"` | The one directed action: primary buttons, a slider's fill, a switch that is on, the caret. |
|
|
3551
|
+
| `"primaryHover"` | primary hovered. |
|
|
3552
|
+
| `"primaryActive"` | primary pressed. |
|
|
3553
|
+
| `"onPrimary"` | Ink on primary. |
|
|
3554
|
+
| `"primarySoft"` | A translucent wash of primary. |
|
|
3555
|
+
| `"highlight"` | Emphasised ink: a speaker's name, a price, a link, the player's map dot. |
|
|
3556
|
+
| `"focus"` | The focus ring of key and pad navigation. |
|
|
3557
|
+
| `"knob"` | Slider and switch knobs. |
|
|
3558
|
+
| `"hud"` | HUD capsules over the game (scores, timers, toasts). |
|
|
3559
|
+
| `"scrim"` | Behind a dialog. |
|
|
3560
|
+
| `"shadow"` | Drop shadows. |
|
|
3561
|
+
| `"sheen"` | A skeleton's passing sheen. |
|
|
3562
|
+
| `"success"` | Success. |
|
|
3563
|
+
| `"warn"` | Warnings. |
|
|
3564
|
+
| `"danger"` | Danger and errors. |
|
|
3565
|
+
| `"info"` | Information. |
|
|
3566
|
+
| `"health"` | A health meter. |
|
|
3567
|
+
| `"mana"` | A mana meter. |
|
|
3568
|
+
| `"xp"` | An experience meter. |
|
|
3569
|
+
| `"gold"` | Currency: coins, gold, prices that can be paid. |
|
|
3584
3570
|
|
|
3585
3571
|
```ogt
|
|
3586
3572
|
enum ThemeColor {
|
|
3587
|
-
doc "A
|
|
3588
|
-
variant
|
|
3589
|
-
variant
|
|
3590
|
-
variant
|
|
3591
|
-
variant
|
|
3592
|
-
variant
|
|
3593
|
-
variant
|
|
3594
|
-
variant
|
|
3595
|
-
variant
|
|
3596
|
-
variant
|
|
3597
|
-
variant
|
|
3598
|
-
variant
|
|
3599
|
-
variant
|
|
3600
|
-
variant
|
|
3601
|
-
variant
|
|
3602
|
-
variant
|
|
3603
|
-
variant
|
|
3604
|
-
variant
|
|
3605
|
-
variant
|
|
3606
|
-
variant
|
|
3607
|
-
variant
|
|
3608
|
-
variant
|
|
3609
|
-
variant
|
|
3610
|
-
variant
|
|
3611
|
-
variant
|
|
3612
|
-
variant
|
|
3613
|
-
variant
|
|
3614
|
-
variant
|
|
3615
|
-
variant
|
|
3616
|
-
variant
|
|
3617
|
-
variant
|
|
3618
|
-
variant
|
|
3619
|
-
variant
|
|
3620
|
-
variant
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
variant stageRaised "stage-raised."
|
|
3626
|
-
variant stageSurface "stage-surface."
|
|
3627
|
-
variant success "success."
|
|
3628
|
-
variant surface "surface: cards and panels."
|
|
3629
|
-
variant surfaceHover "surface-hover."
|
|
3630
|
-
variant surfaceRaised "surface-raised: tooltips."
|
|
3631
|
-
variant thumb "thumb: slider and switch thumbs."
|
|
3632
|
-
variant warn "warn."
|
|
3633
|
-
}
|
|
3634
|
-
```
|
|
3635
|
-
|
|
3636
|
-
<sub>`api.ogt` line 7876</sub>
|
|
3573
|
+
doc "A colour role of the UI style in effect (the game's style, or the prototype style before it picks one)."
|
|
3574
|
+
variant backdrop "The screen behind the UI where nothing else is."
|
|
3575
|
+
variant well "A recessed ground inside a panel: wells, map frames, empty slots."
|
|
3576
|
+
variant panel "Panels and cards."
|
|
3577
|
+
variant panelHover "A panel under the pointer."
|
|
3578
|
+
variant panelRaised "Dialogs, menus and tooltips."
|
|
3579
|
+
variant line "Hairlines and frames."
|
|
3580
|
+
variant lineStrong "Stronger frames: high contrast, map borders, scrollbars."
|
|
3581
|
+
variant ink "The main ink."
|
|
3582
|
+
variant inkMuted "Secondary ink: captions, keys, inactive tabs."
|
|
3583
|
+
variant inkFaint "The faintest ink that still reads: placeholders, hints."
|
|
3584
|
+
variant inkInverse "Ink on a ground of ink (a selected chip)."
|
|
3585
|
+
variant control "Neutral control fills: secondary buttons, tracks, fields."
|
|
3586
|
+
variant controlStrong "A neutral control hovered or pressed; selection."
|
|
3587
|
+
variant primary "The one directed action: primary buttons, a slider's fill, a switch that is on, the caret."
|
|
3588
|
+
variant primaryHover "primary hovered."
|
|
3589
|
+
variant primaryActive "primary pressed."
|
|
3590
|
+
variant onPrimary "Ink on primary."
|
|
3591
|
+
variant primarySoft "A translucent wash of primary."
|
|
3592
|
+
variant highlight "Emphasised ink: a speaker's name, a price, a link, the player's map dot."
|
|
3593
|
+
variant focus "The focus ring of key and pad navigation."
|
|
3594
|
+
variant knob "Slider and switch knobs."
|
|
3595
|
+
variant hud "HUD capsules over the game (scores, timers, toasts)."
|
|
3596
|
+
variant scrim "Behind a dialog."
|
|
3597
|
+
variant shadow "Drop shadows."
|
|
3598
|
+
variant sheen "A skeleton's passing sheen."
|
|
3599
|
+
variant success "Success."
|
|
3600
|
+
variant warn "Warnings."
|
|
3601
|
+
variant danger "Danger and errors."
|
|
3602
|
+
variant info "Information."
|
|
3603
|
+
variant health "A health meter."
|
|
3604
|
+
variant mana "A mana meter."
|
|
3605
|
+
variant xp "An experience meter."
|
|
3606
|
+
variant gold "Currency: coins, gold, prices that can be paid."
|
|
3607
|
+
}
|
|
3608
|
+
```
|
|
3609
|
+
|
|
3610
|
+
<sub>`api.ogt` line 10197</sub>
|
|
3637
3611
|
|
|
3638
3612
|
<a id="type-TypeStepName"></a>
|
|
3639
3613
|
|
|
3640
3614
|
### `TypeStepName` (enum)
|
|
3641
3615
|
|
|
3642
|
-
A step of the type ramp
|
|
3616
|
+
A step of the style's type ramp.
|
|
3643
3617
|
|
|
3644
3618
|
A string: one of the variants below. The zero value is `"body"`.
|
|
3645
3619
|
|
|
3646
3620
|
| Variant | Doc |
|
|
3647
3621
|
|---|---|
|
|
3648
|
-
| `"body"` |
|
|
3649
|
-
| `"xs"` |
|
|
3650
|
-
| `"meta"` |
|
|
3651
|
-
| `"caption"` |
|
|
3652
|
-
| `"sm"` |
|
|
3653
|
-
| `"reading"` |
|
|
3654
|
-
| `"base"` |
|
|
3655
|
-
| `"lg"` |
|
|
3656
|
-
| `"xl"` |
|
|
3657
|
-
| `"xl2"` |
|
|
3658
|
-
| `"xl3"` |
|
|
3659
|
-
| `"xl4"` |
|
|
3660
|
-
| `"xl5"` |
|
|
3661
|
-
| `"xl6"` |
|
|
3662
|
-
| `"xl7"` |
|
|
3663
|
-
| `"xl8"` |
|
|
3664
|
-
| `"displaySm"` |
|
|
3665
|
-
| `"displayMd"` |
|
|
3666
|
-
| `"displayLg"` |
|
|
3667
|
-
| `"displayXl"` |
|
|
3668
|
-
| `"displayXl2"` |
|
|
3622
|
+
| `"body"` | The default step. |
|
|
3623
|
+
| `"xs"` | A step of the ramp. |
|
|
3624
|
+
| `"meta"` | A step of the ramp. |
|
|
3625
|
+
| `"caption"` | A step of the ramp. |
|
|
3626
|
+
| `"sm"` | A step of the ramp. |
|
|
3627
|
+
| `"reading"` | A step of the ramp. |
|
|
3628
|
+
| `"base"` | A step of the ramp. |
|
|
3629
|
+
| `"lg"` | A step of the ramp. |
|
|
3630
|
+
| `"xl"` | A step of the ramp. |
|
|
3631
|
+
| `"xl2"` | A step of the ramp. |
|
|
3632
|
+
| `"xl3"` | A step of the ramp. |
|
|
3633
|
+
| `"xl4"` | A step of the ramp. |
|
|
3634
|
+
| `"xl5"` | A step of the ramp. |
|
|
3635
|
+
| `"xl6"` | A step of the ramp. |
|
|
3636
|
+
| `"xl7"` | A step of the ramp. |
|
|
3637
|
+
| `"xl8"` | A step of the ramp. |
|
|
3638
|
+
| `"displaySm"` | A step of the ramp. |
|
|
3639
|
+
| `"displayMd"` | A step of the ramp. |
|
|
3640
|
+
| `"displayLg"` | A step of the ramp. |
|
|
3641
|
+
| `"displayXl"` | A step of the ramp. |
|
|
3642
|
+
| `"displayXl2"` | A step of the ramp. |
|
|
3669
3643
|
|
|
3670
3644
|
```ogt
|
|
3671
3645
|
enum TypeStepName {
|
|
3672
|
-
doc "A step of the type ramp
|
|
3673
|
-
variant body "
|
|
3674
|
-
variant xs "
|
|
3675
|
-
variant meta "
|
|
3676
|
-
variant caption "
|
|
3677
|
-
variant sm "
|
|
3678
|
-
variant reading "
|
|
3679
|
-
variant base "
|
|
3680
|
-
variant lg "
|
|
3681
|
-
variant xl "
|
|
3682
|
-
variant xl2 "
|
|
3683
|
-
variant xl3 "
|
|
3684
|
-
variant xl4 "
|
|
3685
|
-
variant xl5 "
|
|
3686
|
-
variant xl6 "
|
|
3687
|
-
variant xl7 "
|
|
3688
|
-
variant xl8 "
|
|
3689
|
-
variant displaySm "
|
|
3690
|
-
variant displayMd "
|
|
3691
|
-
variant displayLg "
|
|
3692
|
-
variant displayXl "
|
|
3693
|
-
variant displayXl2 "
|
|
3694
|
-
}
|
|
3695
|
-
```
|
|
3696
|
-
|
|
3697
|
-
<sub>`api.ogt` line
|
|
3646
|
+
doc "A step of the style's type ramp."
|
|
3647
|
+
variant body "The default step."
|
|
3648
|
+
variant xs "A step of the ramp."
|
|
3649
|
+
variant meta "A step of the ramp."
|
|
3650
|
+
variant caption "A step of the ramp."
|
|
3651
|
+
variant sm "A step of the ramp."
|
|
3652
|
+
variant reading "A step of the ramp."
|
|
3653
|
+
variant base "A step of the ramp."
|
|
3654
|
+
variant lg "A step of the ramp."
|
|
3655
|
+
variant xl "A step of the ramp."
|
|
3656
|
+
variant xl2 "A step of the ramp."
|
|
3657
|
+
variant xl3 "A step of the ramp."
|
|
3658
|
+
variant xl4 "A step of the ramp."
|
|
3659
|
+
variant xl5 "A step of the ramp."
|
|
3660
|
+
variant xl6 "A step of the ramp."
|
|
3661
|
+
variant xl7 "A step of the ramp."
|
|
3662
|
+
variant xl8 "A step of the ramp."
|
|
3663
|
+
variant displaySm "A step of the ramp."
|
|
3664
|
+
variant displayMd "A step of the ramp."
|
|
3665
|
+
variant displayLg "A step of the ramp."
|
|
3666
|
+
variant displayXl "A step of the ramp."
|
|
3667
|
+
variant displayXl2 "A step of the ramp."
|
|
3668
|
+
}
|
|
3669
|
+
```
|
|
3670
|
+
|
|
3671
|
+
<sub>`api.ogt` line 10234</sub>
|
|
3698
3672
|
|
|
3699
3673
|
<a id="type-SizeRange"></a>
|
|
3700
3674
|
|
|
@@ -3721,7 +3695,7 @@ struct SizeRange {
|
|
|
3721
3695
|
}
|
|
3722
3696
|
```
|
|
3723
3697
|
|
|
3724
|
-
<sub>`api.ogt` line
|
|
3698
|
+
<sub>`api.ogt` line 10259</sub>
|
|
3725
3699
|
|
|
3726
3700
|
<a id="type-FixedSize"></a>
|
|
3727
3701
|
|
|
@@ -3742,7 +3716,7 @@ struct FixedSize {
|
|
|
3742
3716
|
}
|
|
3743
3717
|
```
|
|
3744
3718
|
|
|
3745
|
-
<sub>`api.ogt` line
|
|
3719
|
+
<sub>`api.ogt` line 10271</sub>
|
|
3746
3720
|
|
|
3747
3721
|
<a id="type-PercentSize"></a>
|
|
3748
3722
|
|
|
@@ -3763,7 +3737,7 @@ struct PercentSize {
|
|
|
3763
3737
|
}
|
|
3764
3738
|
```
|
|
3765
3739
|
|
|
3766
|
-
<sub>`api.ogt` line
|
|
3740
|
+
<sub>`api.ogt` line 10278</sub>
|
|
3767
3741
|
|
|
3768
3742
|
<a id="type-Size"></a>
|
|
3769
3743
|
|
|
@@ -3791,7 +3765,7 @@ union Size {
|
|
|
3791
3765
|
}
|
|
3792
3766
|
```
|
|
3793
3767
|
|
|
3794
|
-
<sub>`api.ogt` line
|
|
3768
|
+
<sub>`api.ogt` line 10285</sub>
|
|
3795
3769
|
|
|
3796
3770
|
<a id="type-Insets"></a>
|
|
3797
3771
|
|
|
@@ -3824,7 +3798,7 @@ struct Insets {
|
|
|
3824
3798
|
}
|
|
3825
3799
|
```
|
|
3826
3800
|
|
|
3827
|
-
<sub>`api.ogt` line
|
|
3801
|
+
<sub>`api.ogt` line 10294</sub>
|
|
3828
3802
|
|
|
3829
3803
|
<a id="type-Paint"></a>
|
|
3830
3804
|
|
|
@@ -3854,7 +3828,7 @@ struct Paint {
|
|
|
3854
3828
|
}
|
|
3855
3829
|
```
|
|
3856
3830
|
|
|
3857
|
-
<sub>`api.ogt` line
|
|
3831
|
+
<sub>`api.ogt` line 10310</sub>
|
|
3858
3832
|
|
|
3859
3833
|
<a id="type-ElementDesc"></a>
|
|
3860
3834
|
|
|
@@ -3879,7 +3853,7 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
|
3879
3853
|
| `interactive` | `boolean` | `false` | — | — | — | Report a Response from close(), as a button does. |
|
|
3880
3854
|
| `background` | `Paint \| null` | `null` | — | — | — | Its fill; null draws none. |
|
|
3881
3855
|
| `radius` | `number` | `0` | — | `cssPx` | — | Corner radius. |
|
|
3882
|
-
| `frame` | `
|
|
3856
|
+
| `frame` | `StylePart \| null` | `null` | — | — | — | The style frame its background takes (a HUD element, a card); null is a plain fill. Without a style the fill is drawn either way. |
|
|
3883
3857
|
| `aspect` | `number` | `0` | ≥ 0 | — | — | Width over height (0: none): with the height left to fit, it is as tall as its laid-out width over this; with a fixed height and the width left to fit, as wide as the height times it. |
|
|
3884
3858
|
|
|
3885
3859
|
```ogt
|
|
@@ -3903,14 +3877,14 @@ struct ElementDesc {
|
|
|
3903
3877
|
field radius f32 "Corner radius." {
|
|
3904
3878
|
unit cssPx
|
|
3905
3879
|
}
|
|
3906
|
-
field frame Option.
|
|
3880
|
+
field frame Option.StylePart "The style frame its background takes (a HUD element, a card); null is a plain fill. Without a style the fill is drawn either way."
|
|
3907
3881
|
field aspect f32 "Width over height (0: none): with the height left to fit, it is as tall as its laid-out width over this; with a fixed height and the width left to fit, as wide as the height times it." {
|
|
3908
3882
|
min 0
|
|
3909
3883
|
}
|
|
3910
3884
|
}
|
|
3911
3885
|
```
|
|
3912
3886
|
|
|
3913
|
-
<sub>`api.ogt` line
|
|
3887
|
+
<sub>`api.ogt` line 10322</sub>
|
|
3914
3888
|
|
|
3915
3889
|
<a id="type-LabelDesc"></a>
|
|
3916
3890
|
|
|
@@ -3923,12 +3897,12 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
|
3923
3897
|
| Field | Type | Default | Range | Unit | Notes | Doc |
|
|
3924
3898
|
|---|---|---|---|---|---|---|
|
|
3925
3899
|
| `step` | `TypeStepName \| null` | `null` | — | — | — | The type step; null is body. |
|
|
3926
|
-
| `color` | `Paint \| null` | `null` | — | — | — | The ink; null is
|
|
3900
|
+
| `color` | `Paint \| null` | `null` | — | — | — | The ink; null is ink. |
|
|
3927
3901
|
| `align` | `TextAlign` | `"start"` | — | — | — | How the lines align. |
|
|
3928
3902
|
| `nowrap` | `boolean` | `false` | — | — | — | Keep to one line (breaking only at `\n`). |
|
|
3929
3903
|
| `width` | `Size \| null` | `null` | — | — | — | Its width; null fits the text. |
|
|
3930
3904
|
| `font` | `FontRole` | `"body"` | — | — | — | Which font. |
|
|
3931
|
-
| `heading` | `boolean` | `false` | — | — | — | A heading: a
|
|
3905
|
+
| `heading` | `boolean` | `false` | — | — | — | A heading: a style with a flourish frames it. |
|
|
3932
3906
|
| `ellipsis` | `boolean` | `false` | — | — | — | Cut with an ellipsis where the text does not fit its width: on its one line (with nowrap; the label can then shrink in a row) or on its last line (maxLines). The probe still reads the whole text. |
|
|
3933
3907
|
| `maxLines` | `number` | `0` | — | — | — | The most lines a wrapping label shows; 0 is no limit. With ellipsis the last ends in an ellipsis when text is left out. |
|
|
3934
3908
|
|
|
@@ -3937,18 +3911,18 @@ struct LabelDesc {
|
|
|
3937
3911
|
doc "How a label draws its text."
|
|
3938
3912
|
desc true
|
|
3939
3913
|
field step Option.TypeStepName "The type step; null is body."
|
|
3940
|
-
field color Option.Paint "The ink; null is
|
|
3914
|
+
field color Option.Paint "The ink; null is ink."
|
|
3941
3915
|
field align TextAlign "How the lines align."
|
|
3942
3916
|
field nowrap bool "Keep to one line (breaking only at `\\n`)."
|
|
3943
3917
|
field width Option.Size "Its width; null fits the text."
|
|
3944
3918
|
field font FontRole "Which font."
|
|
3945
|
-
field heading bool "A heading: a
|
|
3919
|
+
field heading bool "A heading: a style with a flourish frames it."
|
|
3946
3920
|
field ellipsis bool "Cut with an ellipsis where the text does not fit its width: on its one line (with nowrap; the label can then shrink in a row) or on its last line (maxLines). The probe still reads the whole text."
|
|
3947
3921
|
field maxLines u32 "The most lines a wrapping label shows; 0 is no limit. With ellipsis the last ends in an ellipsis when text is left out."
|
|
3948
3922
|
}
|
|
3949
3923
|
```
|
|
3950
3924
|
|
|
3951
|
-
<sub>`api.ogt` line
|
|
3925
|
+
<sub>`api.ogt` line 10348</sub>
|
|
3952
3926
|
|
|
3953
3927
|
<a id="type-ButtonDesc"></a>
|
|
3954
3928
|
|
|
@@ -3978,13 +3952,13 @@ struct ButtonDesc {
|
|
|
3978
3952
|
}
|
|
3979
3953
|
```
|
|
3980
3954
|
|
|
3981
|
-
<sub>`api.ogt` line
|
|
3955
|
+
<sub>`api.ogt` line 10362</sub>
|
|
3982
3956
|
|
|
3983
3957
|
<a id="type-PanelDesc"></a>
|
|
3984
3958
|
|
|
3985
3959
|
### `PanelDesc` (desc struct)
|
|
3986
3960
|
|
|
3987
|
-
A card:
|
|
3961
|
+
A card: panel, the panel radius, padded and spaced by the style.
|
|
3988
3962
|
|
|
3989
3963
|
A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
3990
3964
|
|
|
@@ -3997,11 +3971,11 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
|
3997
3971
|
| `gap` | `number \| null` | `null` | — | — | — | Space between children; null is space.md. |
|
|
3998
3972
|
| `align` | `Align` | `"start"` | — | — | — | Where children sit along the main axis. |
|
|
3999
3973
|
| `cross` | `Cross` | `"start"` | — | — | — | Where children sit across it. |
|
|
4000
|
-
| `background` | `Paint \| null` | `null` | — | — | — | Its fill; null is
|
|
3974
|
+
| `background` | `Paint \| null` | `null` | — | — | — | Its fill; null is panel. |
|
|
4001
3975
|
|
|
4002
3976
|
```ogt
|
|
4003
3977
|
struct PanelDesc {
|
|
4004
|
-
doc "A card:
|
|
3978
|
+
doc "A card: panel, the panel radius, padded and spaced by the style."
|
|
4005
3979
|
desc true
|
|
4006
3980
|
field row bool "Lay children left to right (the default is top to bottom)."
|
|
4007
3981
|
field width Option.Size "Its width; null fits the content."
|
|
@@ -4010,11 +3984,11 @@ struct PanelDesc {
|
|
|
4010
3984
|
field gap Option.f32 "Space between children; null is space.md."
|
|
4011
3985
|
field align Align "Where children sit along the main axis."
|
|
4012
3986
|
field cross Cross "Where children sit across it."
|
|
4013
|
-
field background Option.Paint "Its fill; null is
|
|
3987
|
+
field background Option.Paint "Its fill; null is panel."
|
|
4014
3988
|
}
|
|
4015
3989
|
```
|
|
4016
3990
|
|
|
4017
|
-
<sub>`api.ogt` line
|
|
3991
|
+
<sub>`api.ogt` line 10372</sub>
|
|
4018
3992
|
|
|
4019
3993
|
<a id="type-ScrollAxes"></a>
|
|
4020
3994
|
|
|
@@ -4039,7 +4013,7 @@ enum ScrollAxes {
|
|
|
4039
4013
|
}
|
|
4040
4014
|
```
|
|
4041
4015
|
|
|
4042
|
-
<sub>`api.ogt` line
|
|
4016
|
+
<sub>`api.ogt` line 10385</sub>
|
|
4043
4017
|
|
|
4044
4018
|
<a id="type-ScrollDesc"></a>
|
|
4045
4019
|
|
|
@@ -4071,7 +4045,7 @@ struct ScrollDesc {
|
|
|
4071
4045
|
}
|
|
4072
4046
|
```
|
|
4073
4047
|
|
|
4074
|
-
<sub>`api.ogt` line
|
|
4048
|
+
<sub>`api.ogt` line 10392</sub>
|
|
4075
4049
|
|
|
4076
4050
|
<a id="type-ImageDesc"></a>
|
|
4077
4051
|
|
|
@@ -4107,7 +4081,7 @@ struct ImageDesc {
|
|
|
4107
4081
|
}
|
|
4108
4082
|
```
|
|
4109
4083
|
|
|
4110
|
-
<sub>`api.ogt` line
|
|
4084
|
+
<sub>`api.ogt` line 10404</sub>
|
|
4111
4085
|
|
|
4112
4086
|
<a id="type-ZoomViewDesc"></a>
|
|
4113
4087
|
|
|
@@ -4149,7 +4123,7 @@ struct ZoomViewDesc {
|
|
|
4149
4123
|
}
|
|
4150
4124
|
```
|
|
4151
4125
|
|
|
4152
|
-
<sub>`api.ogt` line
|
|
4126
|
+
<sub>`api.ogt` line 10418</sub>
|
|
4153
4127
|
|
|
4154
4128
|
<a id="type-ZoomResult"></a>
|
|
4155
4129
|
|
|
@@ -4172,7 +4146,7 @@ struct ZoomResult {
|
|
|
4172
4146
|
}
|
|
4173
4147
|
```
|
|
4174
4148
|
|
|
4175
|
-
<sub>`api.ogt` line
|
|
4149
|
+
<sub>`api.ogt` line 10437</sub>
|
|
4176
4150
|
|
|
4177
4151
|
<a id="type-ProgressDesc"></a>
|
|
4178
4152
|
|
|
@@ -4194,7 +4168,7 @@ struct ProgressDesc {
|
|
|
4194
4168
|
}
|
|
4195
4169
|
```
|
|
4196
4170
|
|
|
4197
|
-
<sub>`api.ogt` line
|
|
4171
|
+
<sub>`api.ogt` line 10444</sub>
|
|
4198
4172
|
|
|
4199
4173
|
<a id="type-SliderDesc"></a>
|
|
4200
4174
|
|
|
@@ -4224,7 +4198,7 @@ struct SliderDesc {
|
|
|
4224
4198
|
}
|
|
4225
4199
|
```
|
|
4226
4200
|
|
|
4227
|
-
<sub>`api.ogt` line
|
|
4201
|
+
<sub>`api.ogt` line 10450</sub>
|
|
4228
4202
|
|
|
4229
4203
|
<a id="type-FieldDesc"></a>
|
|
4230
4204
|
|
|
@@ -4250,7 +4224,7 @@ struct FieldDesc {
|
|
|
4250
4224
|
}
|
|
4251
4225
|
```
|
|
4252
4226
|
|
|
4253
|
-
<sub>`api.ogt` line
|
|
4227
|
+
<sub>`api.ogt` line 10461</sub>
|
|
4254
4228
|
|
|
4255
4229
|
<a id="type-TextAreaDesc"></a>
|
|
4256
4230
|
|
|
@@ -4278,7 +4252,7 @@ struct TextAreaDesc {
|
|
|
4278
4252
|
}
|
|
4279
4253
|
```
|
|
4280
4254
|
|
|
4281
|
-
<sub>`api.ogt` line
|
|
4255
|
+
<sub>`api.ogt` line 10469</sub>
|
|
4282
4256
|
|
|
4283
4257
|
<a id="type-Response"></a>
|
|
4284
4258
|
|
|
@@ -4313,7 +4287,7 @@ struct Response {
|
|
|
4313
4287
|
}
|
|
4314
4288
|
```
|
|
4315
4289
|
|
|
4316
|
-
<sub>`api.ogt` line
|
|
4290
|
+
<sub>`api.ogt` line 10478</sub>
|
|
4317
4291
|
|
|
4318
4292
|
<a id="type-SliderResult"></a>
|
|
4319
4293
|
|
|
@@ -4334,7 +4308,7 @@ struct SliderResult {
|
|
|
4334
4308
|
}
|
|
4335
4309
|
```
|
|
4336
4310
|
|
|
4337
|
-
<sub>`api.ogt` line
|
|
4311
|
+
<sub>`api.ogt` line 10491</sub>
|
|
4338
4312
|
|
|
4339
4313
|
<a id="type-ToggleResult"></a>
|
|
4340
4314
|
|
|
@@ -4355,7 +4329,7 @@ struct ToggleResult {
|
|
|
4355
4329
|
}
|
|
4356
4330
|
```
|
|
4357
4331
|
|
|
4358
|
-
<sub>`api.ogt` line
|
|
4332
|
+
<sub>`api.ogt` line 10497</sub>
|
|
4359
4333
|
|
|
4360
4334
|
<a id="type-FieldResult"></a>
|
|
4361
4335
|
|
|
@@ -4376,7 +4350,7 @@ struct FieldResult {
|
|
|
4376
4350
|
}
|
|
4377
4351
|
```
|
|
4378
4352
|
|
|
4379
|
-
<sub>`api.ogt` line
|
|
4353
|
+
<sub>`api.ogt` line 10503</sub>
|
|
4380
4354
|
|
|
4381
4355
|
<a id="type-Viewport"></a>
|
|
4382
4356
|
|
|
@@ -4431,13 +4405,13 @@ struct Viewport {
|
|
|
4431
4405
|
}
|
|
4432
4406
|
```
|
|
4433
4407
|
|
|
4434
|
-
<sub>`api.ogt` line
|
|
4408
|
+
<sub>`api.ogt` line 10509</sub>
|
|
4435
4409
|
|
|
4436
4410
|
<a id="type-UiDesc"></a>
|
|
4437
4411
|
|
|
4438
4412
|
### `UiDesc` (desc struct)
|
|
4439
4413
|
|
|
4440
|
-
How the UI looks: the scheme, the density, its fonts, the contrast, the game's
|
|
4414
|
+
How the UI looks: the scheme, the density, its fonts, the contrast, the game's primary colour, motion, transparency, the icon atlas, the style and the sounds. og.ui.configure takes it in part: a field left out keeps the value the last call (or a look's style) gave it, null clears it.
|
|
4441
4415
|
|
|
4442
4416
|
A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
4443
4417
|
|
|
@@ -4451,18 +4425,17 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
|
4451
4425
|
| `roundedFont` | `Font \| null` | `null` | — | — | — | The rounded font (levels and scores); null uses the display font, then the body font. |
|
|
4452
4426
|
| `fallbackFonts` | `readonly Font[]` | `[]` | — | — | — | Fonts for other scripts (Hebrew, Devanagari, a CJK face with `font { runtime true }`), tried in order after the locale's (og.i18n) for a text the role's font cannot draw whole. A text mixing scripts takes each run from the first font that has it (the role's for its Latin, a fallback for its CJK or Arabic), one label in several fonts. |
|
|
4453
4427
|
| `contrast` | `Contrast` | `"standard"` | — | — | — | Standard or high contrast. The page's prefers-contrast: more takes high contrast too (Viewport.highContrast). |
|
|
4454
|
-
| `
|
|
4455
|
-
| `accentColor` | `Color \| null` | `null` | — | — | — | An sRGB colour as the game's accent, when no hue is given. |
|
|
4428
|
+
| `primaryColor` | `Color \| null` | `null` | — | — | — | An sRGB colour as the game's primary (its hover, pressed and soft tones derived from it, the ink on it whichever of ink and inkInverse reads better); null keeps the style's. |
|
|
4456
4429
|
| `reducedMotion` | `boolean` | `false` | — | — | — | Transitions only fade; sheens stop. The page's prefers-reduced-motion turns it on too (Viewport.reducedMotion). |
|
|
4457
|
-
| `reducedTransparency` | `boolean` | `false` | — | — | — | Nothing is see-through: glass parts (a
|
|
4458
|
-
| `icons` | `IconAtlasDesc \| null` | `null` | — | — | — | The icon atlas og.ui.icon draws from; null takes the
|
|
4430
|
+
| `reducedTransparency` | `boolean` | `false` | — | — | — | Nothing is see-through: glass parts (a style's glass line) are opaque surfaces (no blur of the frame under them, their frame whole), the scrim is the opaque colour it makes over backdrop and the translucent fills (control, controlStrong, primarySoft, hud) the opaque colours they make over panel. The page's prefers-reduced-transparency turns it on too (Viewport.reducedTransparency); UiTheme.reducedTransparency says it is on. |
|
|
4431
|
+
| `icons` | `IconAtlasDesc \| null` | `null` | — | — | — | The icon atlas og.ui.icon draws from; null takes the style's. |
|
|
4459
4432
|
| `toastAnchor` | `Anchor \| null` | `null` | — | — | — | Where toasts stack; null is the bottom centre. |
|
|
4460
|
-
| `
|
|
4461
|
-
| `sounds` | `UiSounds \| null` | `null` | — | — | — | Sounds for UI events (they win over the
|
|
4433
|
+
| `style` | `Style \| null` | `null` | — | — | — | A UI style from og.load.style: its palette, radii, type ramp, fonts, icons, frames, ornaments, motion and sounds replace the prototype style (fonts, icons and a primary colour given here still win); null is the prototype style, the engine's placeholder. |
|
|
4434
|
+
| `sounds` | `UiSounds \| null` | `null` | — | — | — | Sounds for UI events (they win over the style's). |
|
|
4462
4435
|
|
|
4463
4436
|
```ogt
|
|
4464
4437
|
struct UiDesc {
|
|
4465
|
-
doc "How the UI looks: the scheme, the density, its fonts, the contrast, the game's
|
|
4438
|
+
doc "How the UI looks: the scheme, the density, its fonts, the contrast, the game's primary colour, motion, transparency, the icon atlas, the style and the sounds. og.ui.configure takes it in part: a field left out keeps the value the last call (or a look's style) gave it, null clears it."
|
|
4466
4439
|
desc true
|
|
4467
4440
|
field scheme Scheme "The palette."
|
|
4468
4441
|
field density DensityMode "The control sizes."
|
|
@@ -4472,18 +4445,17 @@ struct UiDesc {
|
|
|
4472
4445
|
field roundedFont Option.Font "The rounded font (levels and scores); null uses the display font, then the body font."
|
|
4473
4446
|
field fallbackFonts List.Font "Fonts for other scripts (Hebrew, Devanagari, a CJK face with `font { runtime true }`), tried in order after the locale's (og.i18n) for a text the role's font cannot draw whole. A text mixing scripts takes each run from the first font that has it (the role's for its Latin, a fallback for its CJK or Arabic), one label in several fonts."
|
|
4474
4447
|
field contrast Contrast "Standard or high contrast. The page's prefers-contrast: more takes high contrast too (Viewport.highContrast)."
|
|
4475
|
-
field
|
|
4476
|
-
field accentColor Option.Color "An sRGB colour as the game's accent, when no hue is given."
|
|
4448
|
+
field primaryColor Option.Color "An sRGB colour as the game's primary (its hover, pressed and soft tones derived from it, the ink on it whichever of ink and inkInverse reads better); null keeps the style's."
|
|
4477
4449
|
field reducedMotion bool "Transitions only fade; sheens stop. The page's prefers-reduced-motion turns it on too (Viewport.reducedMotion)."
|
|
4478
|
-
field reducedTransparency bool "Nothing is see-through: glass parts (a
|
|
4479
|
-
field icons Option.IconAtlasDesc "The icon atlas og.ui.icon draws from; null takes the
|
|
4450
|
+
field reducedTransparency bool "Nothing is see-through: glass parts (a style's glass line) are opaque surfaces (no blur of the frame under them, their frame whole), the scrim is the opaque colour it makes over backdrop and the translucent fills (control, controlStrong, primarySoft, hud) the opaque colours they make over panel. The page's prefers-reduced-transparency turns it on too (Viewport.reducedTransparency); UiTheme.reducedTransparency says it is on."
|
|
4451
|
+
field icons Option.IconAtlasDesc "The icon atlas og.ui.icon draws from; null takes the style's."
|
|
4480
4452
|
field toastAnchor Option.Anchor "Where toasts stack; null is the bottom centre."
|
|
4481
|
-
field
|
|
4482
|
-
field sounds Option.UiSounds "Sounds for UI events (they win over the
|
|
4453
|
+
field style Option.Style "A UI style from og.load.style: its palette, radii, type ramp, fonts, icons, frames, ornaments, motion and sounds replace the prototype style (fonts, icons and a primary colour given here still win); null is the prototype style, the engine's placeholder."
|
|
4454
|
+
field sounds Option.UiSounds "Sounds for UI events (they win over the style's)."
|
|
4483
4455
|
}
|
|
4484
4456
|
```
|
|
4485
4457
|
|
|
4486
|
-
<sub>`api.ogt` line
|
|
4458
|
+
<sub>`api.ogt` line 10540</sub>
|
|
4487
4459
|
|
|
4488
4460
|
<a id="type-UiSounds"></a>
|
|
4489
4461
|
|
|
@@ -4515,13 +4487,13 @@ struct UiSounds {
|
|
|
4515
4487
|
}
|
|
4516
4488
|
```
|
|
4517
4489
|
|
|
4518
|
-
<sub>`api.ogt` line
|
|
4490
|
+
<sub>`api.ogt` line 10560</sub>
|
|
4519
4491
|
|
|
4520
|
-
<a id="type-
|
|
4492
|
+
<a id="type-StylePart"></a>
|
|
4521
4493
|
|
|
4522
|
-
### `
|
|
4494
|
+
### `StylePart` (enum)
|
|
4523
4495
|
|
|
4524
|
-
An element class a
|
|
4496
|
+
An element class a style dresses with a nine-slice frame.
|
|
4525
4497
|
|
|
4526
4498
|
A string: one of the variants below. The zero value is `"panel"`.
|
|
4527
4499
|
|
|
@@ -4533,24 +4505,24 @@ A string: one of the variants below. The zero value is `"panel"`.
|
|
|
4533
4505
|
| `"field"` | Text fields. |
|
|
4534
4506
|
| `"slot"` | Inventory and grid cells. |
|
|
4535
4507
|
| `"tooltip"` | Tooltips. |
|
|
4536
|
-
| `"
|
|
4508
|
+
| `"hud"` | HUD elements over the game (counters, timers) and toasts. |
|
|
4537
4509
|
| `"track"` | A progress bar's track. |
|
|
4538
4510
|
|
|
4539
4511
|
```ogt
|
|
4540
|
-
enum
|
|
4541
|
-
doc "An element class a
|
|
4512
|
+
enum StylePart {
|
|
4513
|
+
doc "An element class a style dresses with a nine-slice frame."
|
|
4542
4514
|
variant panel "Dialogs and screen panels."
|
|
4543
4515
|
variant card "Cards."
|
|
4544
4516
|
variant button "Buttons (with hover, pressed and disabled states)."
|
|
4545
4517
|
variant field "Text fields."
|
|
4546
4518
|
variant slot "Inventory and grid cells."
|
|
4547
4519
|
variant tooltip "Tooltips."
|
|
4548
|
-
variant
|
|
4520
|
+
variant hud "HUD elements over the game (counters, timers) and toasts."
|
|
4549
4521
|
variant track "A progress bar's track."
|
|
4550
4522
|
}
|
|
4551
4523
|
```
|
|
4552
4524
|
|
|
4553
|
-
<sub>`api.ogt` line
|
|
4525
|
+
<sub>`api.ogt` line 10571</sub>
|
|
4554
4526
|
|
|
4555
4527
|
<a id="type-TypeStep"></a>
|
|
4556
4528
|
|
|
@@ -4581,7 +4553,7 @@ struct TypeStep {
|
|
|
4581
4553
|
}
|
|
4582
4554
|
```
|
|
4583
4555
|
|
|
4584
|
-
<sub>`api.ogt` line
|
|
4556
|
+
<sub>`api.ogt` line 10583</sub>
|
|
4585
4557
|
|
|
4586
4558
|
<a id="type-ControlSizes"></a>
|
|
4587
4559
|
|
|
@@ -4591,9 +4563,9 @@ The control, row and header heights and the gutter of the density in effect.
|
|
|
4591
4563
|
|
|
4592
4564
|
| Field | Type | Default | Range | Unit | Notes | Doc |
|
|
4593
4565
|
|---|---|---|---|---|---|---|
|
|
4594
|
-
| `controlSm` | `number` | `0` | — | `cssPx` | — |
|
|
4595
|
-
| `controlMd` | `number` | `0` | — | `cssPx` | — |
|
|
4596
|
-
| `controlLg` | `number` | `0` | — | `cssPx` | — |
|
|
4566
|
+
| `controlSm` | `number` | `0` | — | `cssPx` | — | A small control's height. |
|
|
4567
|
+
| `controlMd` | `number` | `0` | — | `cssPx` | — | A control's height. |
|
|
4568
|
+
| `controlLg` | `number` | `0` | — | `cssPx` | — | A large control's height. |
|
|
4597
4569
|
| `gutter` | `number` | `0` | — | `cssPx` | — | The gutter. |
|
|
4598
4570
|
| `header` | `number` | `0` | — | `cssPx` | — | The header height. |
|
|
4599
4571
|
| `row` | `number` | `0` | — | `cssPx` | — | The row height. |
|
|
@@ -4602,13 +4574,13 @@ The control, row and header heights and the gutter of the density in effect.
|
|
|
4602
4574
|
```ogt
|
|
4603
4575
|
struct ControlSizes {
|
|
4604
4576
|
doc "The control, row and header heights and the gutter of the density in effect."
|
|
4605
|
-
field controlSm f32 "
|
|
4577
|
+
field controlSm f32 "A small control's height." {
|
|
4606
4578
|
unit cssPx
|
|
4607
4579
|
}
|
|
4608
|
-
field controlMd f32 "
|
|
4580
|
+
field controlMd f32 "A control's height." {
|
|
4609
4581
|
unit cssPx
|
|
4610
4582
|
}
|
|
4611
|
-
field controlLg f32 "
|
|
4583
|
+
field controlLg f32 "A large control's height." {
|
|
4612
4584
|
unit cssPx
|
|
4613
4585
|
}
|
|
4614
4586
|
field gutter f32 "The gutter." {
|
|
@@ -4626,46 +4598,46 @@ struct ControlSizes {
|
|
|
4626
4598
|
}
|
|
4627
4599
|
```
|
|
4628
4600
|
|
|
4629
|
-
<sub>`api.ogt` line
|
|
4601
|
+
<sub>`api.ogt` line 10597</sub>
|
|
4630
4602
|
|
|
4631
4603
|
<a id="type-UiTheme"></a>
|
|
4632
4604
|
|
|
4633
4605
|
### `UiTheme` (struct)
|
|
4634
4606
|
|
|
4635
|
-
The
|
|
4607
|
+
The style values the UI draws with, read-only.
|
|
4636
4608
|
|
|
4637
4609
|
| Field | Type | Default | Range | Unit | Notes | Doc |
|
|
4638
4610
|
|---|---|---|---|---|---|---|
|
|
4639
4611
|
| `scheme` | `Scheme` | `"dark"` | — | — | — | The palette in use. |
|
|
4640
4612
|
| `palette` | `Readonly<Record<string, string>>` | `{}` | — | — | — | Each ThemeColor as `#rrggbb` or `#rrggbbaa` (sRGB as authored). |
|
|
4641
4613
|
| `space` | `Readonly<Record<string, number>>` | `{}` | — | — | — | The spacing scale by name (xxs, xs, sm, md, lg, xl, xxl, xl3), in CSS pixels. |
|
|
4642
|
-
| `radius` | `Readonly<Record<string, number>>` | `{}` | — | — | — | The
|
|
4614
|
+
| `radius` | `Readonly<Record<string, number>>` | `{}` | — | — | — | The corner radii by name (small, control, bar, panel), in CSS pixels. |
|
|
4643
4615
|
| `typeRamp` | `Readonly<Record<string, TypeStep>>` | `{}` | — | — | — | Each TypeStepName's step. |
|
|
4644
4616
|
| `sizes` | `ControlSizes` | `{ controlSm: 0, controlMd: 0, controlLg: 0, gutter: 0, header: 0, row: 0, section: 0 }` | — | — | — | The control sizes of the density in effect. |
|
|
4645
4617
|
| `durationsMs` | `Readonly<Record<string, number>>` | `{}` | — | — | — | The motion durations by name (instant, fast, base, slow, spring, bounce), in milliseconds. |
|
|
4646
|
-
| `
|
|
4618
|
+
| `style` | `string` | `""` | — | — | — | The configured style's name; empty for the prototype style. |
|
|
4647
4619
|
| `contrast` | `Contrast` | `"standard"` | — | — | — | The variant in effect: high when the game asked for it or the page prefers more contrast. |
|
|
4648
4620
|
| `reducedMotion` | `boolean` | `false` | — | — | — | Transitions only fade and sheens stop: the game asked for it or the page prefers reduced motion. A game's own animations read it to keep their state changes and drop their movement. |
|
|
4649
|
-
| `reducedTransparency` | `boolean` | `false` | — | — | — | Nothing is see-through: the scrim and the translucent fills of `palette` are already the opaque colours they make over
|
|
4621
|
+
| `reducedTransparency` | `boolean` | `false` | — | — | — | Nothing is see-through: the scrim and the translucent fills of `palette` are already the opaque colours they make over panel (the scrim over backdrop) and glass is an opaque surface; the game asked for it or the page prefers reduced transparency. A game's own translucent overlays read it to draw opaque too. |
|
|
4650
4622
|
|
|
4651
4623
|
```ogt
|
|
4652
4624
|
struct UiTheme {
|
|
4653
|
-
doc "The
|
|
4625
|
+
doc "The style values the UI draws with, read-only."
|
|
4654
4626
|
field scheme Scheme "The palette in use."
|
|
4655
4627
|
field palette Map.String "Each ThemeColor as `#rrggbb` or `#rrggbbaa` (sRGB as authored)."
|
|
4656
4628
|
field space Map.f32 "The spacing scale by name (xxs, xs, sm, md, lg, xl, xxl, xl3), in CSS pixels."
|
|
4657
|
-
field radius Map.f32 "The
|
|
4629
|
+
field radius Map.f32 "The corner radii by name (small, control, bar, panel), in CSS pixels."
|
|
4658
4630
|
field typeRamp Map.TypeStep "Each TypeStepName's step."
|
|
4659
4631
|
field sizes ControlSizes "The control sizes of the density in effect."
|
|
4660
4632
|
field durationsMs Map.f32 "The motion durations by name (instant, fast, base, slow, spring, bounce), in milliseconds."
|
|
4661
|
-
field
|
|
4633
|
+
field style String "The configured style's name; empty for the prototype style."
|
|
4662
4634
|
field contrast Contrast "The variant in effect: high when the game asked for it or the page prefers more contrast."
|
|
4663
4635
|
field reducedMotion bool "Transitions only fade and sheens stop: the game asked for it or the page prefers reduced motion. A game's own animations read it to keep their state changes and drop their movement."
|
|
4664
|
-
field reducedTransparency bool "Nothing is see-through: the scrim and the translucent fills of `palette` are already the opaque colours they make over
|
|
4636
|
+
field reducedTransparency bool "Nothing is see-through: the scrim and the translucent fills of `palette` are already the opaque colours they make over panel (the scrim over backdrop) and glass is an opaque surface; the game asked for it or the page prefers reduced transparency. A game's own translucent overlays read it to draw opaque too."
|
|
4665
4637
|
}
|
|
4666
4638
|
```
|
|
4667
4639
|
|
|
4668
|
-
<sub>`api.ogt` line
|
|
4640
|
+
<sub>`api.ogt` line 10622</sub>
|
|
4669
4641
|
|
|
4670
4642
|
<a id="type-UiBuild"></a>
|
|
4671
4643
|
|
|
@@ -4685,7 +4657,7 @@ callback UiBuild {
|
|
|
4685
4657
|
}
|
|
4686
4658
|
```
|
|
4687
4659
|
|
|
4688
|
-
<sub>`api.ogt` line
|
|
4660
|
+
<sub>`api.ogt` line 10637</sub>
|
|
4689
4661
|
|
|
4690
4662
|
<a id="type-RichTextDesc"></a>
|
|
4691
4663
|
|
|
@@ -4698,7 +4670,7 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
|
4698
4670
|
| Field | Type | Default | Range | Unit | Notes | Doc |
|
|
4699
4671
|
|---|---|---|---|---|---|---|
|
|
4700
4672
|
| `step` | `TypeStepName \| null` | `null` | — | — | — | The type step; null is body. |
|
|
4701
|
-
| `color` | `Paint \| null` | `null` | — | — | — | The ink; null is
|
|
4673
|
+
| `color` | `Paint \| null` | `null` | — | — | — | The ink; null is ink. |
|
|
4702
4674
|
| `align` | `TextAlign` | `"start"` | — | — | — | How the lines align. |
|
|
4703
4675
|
| `nowrap` | `boolean` | `false` | — | — | — | Keep to one line (breaking only at `\n`). |
|
|
4704
4676
|
| `width` | `Size \| null` | `null` | — | — | — | Its width; null fits the text. |
|
|
@@ -4709,7 +4681,7 @@ struct RichTextDesc {
|
|
|
4709
4681
|
doc "How a rich text paragraph draws: its defaults, which its markup's spans override."
|
|
4710
4682
|
desc true
|
|
4711
4683
|
field step Option.TypeStepName "The type step; null is body."
|
|
4712
|
-
field color Option.Paint "The ink; null is
|
|
4684
|
+
field color Option.Paint "The ink; null is ink."
|
|
4713
4685
|
field align TextAlign "How the lines align."
|
|
4714
4686
|
field nowrap bool "Keep to one line (breaking only at `\\n`)."
|
|
4715
4687
|
field width Option.Size "Its width; null fits the text."
|
|
@@ -4717,7 +4689,7 @@ struct RichTextDesc {
|
|
|
4717
4689
|
}
|
|
4718
4690
|
```
|
|
4719
4691
|
|
|
4720
|
-
<sub>`api.ogt` line
|
|
4692
|
+
<sub>`api.ogt` line 10722</sub>
|
|
4721
4693
|
|
|
4722
4694
|
<a id="type-RichTextResult"></a>
|
|
4723
4695
|
|
|
@@ -4740,7 +4712,7 @@ struct RichTextResult {
|
|
|
4740
4712
|
}
|
|
4741
4713
|
```
|
|
4742
4714
|
|
|
4743
|
-
<sub>`api.ogt` line
|
|
4715
|
+
<sub>`api.ogt` line 10733</sub>
|
|
4744
4716
|
|
|
4745
4717
|
<a id="type-Anchor"></a>
|
|
4746
4718
|
|
|
@@ -4777,7 +4749,7 @@ enum Anchor {
|
|
|
4777
4749
|
}
|
|
4778
4750
|
```
|
|
4779
4751
|
|
|
4780
|
-
<sub>`api.ogt` line
|
|
4752
|
+
<sub>`api.ogt` line 10834</sub>
|
|
4781
4753
|
|
|
4782
4754
|
<a id="type-TransitionKind"></a>
|
|
4783
4755
|
|
|
@@ -4810,40 +4782,40 @@ enum TransitionKind {
|
|
|
4810
4782
|
}
|
|
4811
4783
|
```
|
|
4812
4784
|
|
|
4813
|
-
<sub>`api.ogt` line
|
|
4785
|
+
<sub>`api.ogt` line 10847</sub>
|
|
4814
4786
|
|
|
4815
4787
|
<a id="type-Tone"></a>
|
|
4816
4788
|
|
|
4817
4789
|
### `Tone` (enum)
|
|
4818
4790
|
|
|
4819
|
-
A status tone
|
|
4791
|
+
A status tone of badges, toasts and map markers.
|
|
4820
4792
|
|
|
4821
4793
|
A string: one of the variants below. The zero value is `"neutral"`.
|
|
4822
4794
|
|
|
4823
4795
|
| Variant | Doc |
|
|
4824
4796
|
|---|---|
|
|
4825
|
-
| `"neutral"` | Neutral: fill and muted ink. |
|
|
4797
|
+
| `"neutral"` | Neutral: control fill and muted ink. |
|
|
4826
4798
|
| `"success"` | Success. |
|
|
4827
4799
|
| `"warn"` | Warning (orange). |
|
|
4828
4800
|
| `"danger"` | Danger. |
|
|
4829
4801
|
| `"info"` | Information. |
|
|
4830
|
-
| `"
|
|
4831
|
-
| `"inverse"` | Neutral emphasis:
|
|
4802
|
+
| `"primary"` | The game's identity: the primary's soft wash and highlight ink. |
|
|
4803
|
+
| `"inverse"` | Neutral emphasis: ink fill, inverse ink. |
|
|
4832
4804
|
|
|
4833
4805
|
```ogt
|
|
4834
4806
|
enum Tone {
|
|
4835
|
-
doc "A status tone
|
|
4836
|
-
variant neutral "Neutral: fill and muted ink."
|
|
4807
|
+
doc "A status tone of badges, toasts and map markers."
|
|
4808
|
+
variant neutral "Neutral: control fill and muted ink."
|
|
4837
4809
|
variant success "Success."
|
|
4838
4810
|
variant warn "Warning (orange)."
|
|
4839
4811
|
variant danger "Danger."
|
|
4840
4812
|
variant info "Information."
|
|
4841
|
-
variant
|
|
4842
|
-
variant inverse "Neutral emphasis:
|
|
4813
|
+
variant primary "The game's identity: the primary's soft wash and highlight ink."
|
|
4814
|
+
variant inverse "Neutral emphasis: ink fill, inverse ink."
|
|
4843
4815
|
}
|
|
4844
4816
|
```
|
|
4845
4817
|
|
|
4846
|
-
<sub>`api.ogt` line
|
|
4818
|
+
<sub>`api.ogt` line 10858</sub>
|
|
4847
4819
|
|
|
4848
4820
|
<a id="type-MeterKind"></a>
|
|
4849
4821
|
|
|
@@ -4855,22 +4827,22 @@ A string: one of the variants below. The zero value is `"health"`.
|
|
|
4855
4827
|
|
|
4856
4828
|
| Variant | Doc |
|
|
4857
4829
|
|---|---|
|
|
4858
|
-
| `"health"` |
|
|
4859
|
-
| `"mana"` |
|
|
4860
|
-
| `"xp"` |
|
|
4861
|
-
| `"
|
|
4830
|
+
| `"health"` | health; warn under 30 %, danger under 15 %. |
|
|
4831
|
+
| `"mana"` | mana. |
|
|
4832
|
+
| `"xp"` | xp. |
|
|
4833
|
+
| `"primary"` | primary. |
|
|
4862
4834
|
|
|
4863
4835
|
```ogt
|
|
4864
4836
|
enum MeterKind {
|
|
4865
4837
|
doc "What a meter measures, which sets its colour."
|
|
4866
|
-
variant health "
|
|
4867
|
-
variant mana "
|
|
4868
|
-
variant xp "
|
|
4869
|
-
variant
|
|
4838
|
+
variant health "health; warn under 30 %, danger under 15 %."
|
|
4839
|
+
variant mana "mana."
|
|
4840
|
+
variant xp "xp."
|
|
4841
|
+
variant primary "primary."
|
|
4870
4842
|
}
|
|
4871
4843
|
```
|
|
4872
4844
|
|
|
4873
|
-
<sub>`api.ogt` line
|
|
4845
|
+
<sub>`api.ogt` line 10869</sub>
|
|
4874
4846
|
|
|
4875
4847
|
<a id="type-Breakpoint"></a>
|
|
4876
4848
|
|
|
@@ -4897,73 +4869,30 @@ enum Breakpoint {
|
|
|
4897
4869
|
}
|
|
4898
4870
|
```
|
|
4899
4871
|
|
|
4900
|
-
<sub>`api.ogt` line
|
|
4872
|
+
<sub>`api.ogt` line 10877</sub>
|
|
4901
4873
|
|
|
4902
4874
|
<a id="type-Contrast"></a>
|
|
4903
4875
|
|
|
4904
4876
|
### `Contrast` (enum)
|
|
4905
4877
|
|
|
4906
|
-
The theme variant: high contrast remaps muted inks, fills and
|
|
4878
|
+
The theme variant: high contrast remaps muted inks, fills and lines to the style's stronger ones and outlines every control (no new colour).
|
|
4907
4879
|
|
|
4908
4880
|
A string: one of the variants below. The zero value is `"standard"`.
|
|
4909
4881
|
|
|
4910
4882
|
| Variant | Doc |
|
|
4911
4883
|
|---|---|
|
|
4912
|
-
| `"standard"` | The
|
|
4884
|
+
| `"standard"` | The style's palette as it is. |
|
|
4913
4885
|
| `"high"` | Stronger inks, fills and edges. |
|
|
4914
4886
|
|
|
4915
4887
|
```ogt
|
|
4916
4888
|
enum Contrast {
|
|
4917
|
-
doc "The theme variant: high contrast remaps muted inks, fills and
|
|
4918
|
-
variant standard "The
|
|
4889
|
+
doc "The theme variant: high contrast remaps muted inks, fills and lines to the style's stronger ones and outlines every control (no new colour)."
|
|
4890
|
+
variant standard "The style's palette as it is."
|
|
4919
4891
|
variant high "Stronger inks, fills and edges."
|
|
4920
4892
|
}
|
|
4921
4893
|
```
|
|
4922
4894
|
|
|
4923
|
-
<sub>`api.ogt` line
|
|
4924
|
-
|
|
4925
|
-
<a id="type-HueName"></a>
|
|
4926
|
-
|
|
4927
|
-
### `HueName` (enum)
|
|
4928
|
-
|
|
4929
|
-
One of the twelve category hues of the tokens, for a game's accent.
|
|
4930
|
-
|
|
4931
|
-
A string: one of the variants below. The zero value is `"red"`.
|
|
4932
|
-
|
|
4933
|
-
| Variant | Doc |
|
|
4934
|
-
|---|---|
|
|
4935
|
-
| `"red"` | hue-red. |
|
|
4936
|
-
| `"orange"` | hue-orange. |
|
|
4937
|
-
| `"yellow"` | hue-yellow. |
|
|
4938
|
-
| `"green"` | hue-green. |
|
|
4939
|
-
| `"mint"` | hue-mint. |
|
|
4940
|
-
| `"teal"` | hue-teal. |
|
|
4941
|
-
| `"cyan"` | hue-cyan. |
|
|
4942
|
-
| `"blue"` | hue-blue. |
|
|
4943
|
-
| `"indigo"` | hue-indigo. |
|
|
4944
|
-
| `"purple"` | hue-purple. |
|
|
4945
|
-
| `"pink"` | hue-pink. |
|
|
4946
|
-
| `"brown"` | hue-brown. |
|
|
4947
|
-
|
|
4948
|
-
```ogt
|
|
4949
|
-
enum HueName {
|
|
4950
|
-
doc "One of the twelve category hues of the tokens, for a game's accent."
|
|
4951
|
-
variant red "hue-red."
|
|
4952
|
-
variant orange "hue-orange."
|
|
4953
|
-
variant yellow "hue-yellow."
|
|
4954
|
-
variant green "hue-green."
|
|
4955
|
-
variant mint "hue-mint."
|
|
4956
|
-
variant teal "hue-teal."
|
|
4957
|
-
variant cyan "hue-cyan."
|
|
4958
|
-
variant blue "hue-blue."
|
|
4959
|
-
variant indigo "hue-indigo."
|
|
4960
|
-
variant purple "hue-purple."
|
|
4961
|
-
variant pink "hue-pink."
|
|
4962
|
-
variant brown "hue-brown."
|
|
4963
|
-
}
|
|
4964
|
-
```
|
|
4965
|
-
|
|
4966
|
-
<sub>`api.ogt` line 8583</sub>
|
|
4895
|
+
<sub>`api.ogt` line 10885</sub>
|
|
4967
4896
|
|
|
4968
4897
|
<a id="type-NavIntent"></a>
|
|
4969
4898
|
|
|
@@ -4998,7 +4927,7 @@ enum NavIntent {
|
|
|
4998
4927
|
}
|
|
4999
4928
|
```
|
|
5000
4929
|
|
|
5001
|
-
<sub>`api.ogt` line
|
|
4930
|
+
<sub>`api.ogt` line 10891</sub>
|
|
5002
4931
|
|
|
5003
4932
|
<a id="type-UiRect"></a>
|
|
5004
4933
|
|
|
@@ -5031,7 +4960,7 @@ struct UiRect {
|
|
|
5031
4960
|
}
|
|
5032
4961
|
```
|
|
5033
4962
|
|
|
5034
|
-
<sub>`api.ogt` line
|
|
4963
|
+
<sub>`api.ogt` line 10903</sub>
|
|
5035
4964
|
|
|
5036
4965
|
<a id="type-IconAtlasDesc"></a>
|
|
5037
4966
|
|
|
@@ -5067,7 +4996,7 @@ struct IconAtlasDesc {
|
|
|
5067
4996
|
}
|
|
5068
4997
|
```
|
|
5069
4998
|
|
|
5070
|
-
<sub>`api.ogt` line
|
|
4999
|
+
<sub>`api.ogt` line 10919</sub>
|
|
5071
5000
|
|
|
5072
5001
|
<a id="type-AnchorDesc"></a>
|
|
5073
5002
|
|
|
@@ -5093,8 +5022,8 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
|
5093
5022
|
| `width` | `Size \| null` | `null` | — | — | — | Its width; null fits the content. |
|
|
5094
5023
|
| `height` | `Size \| null` | `null` | — | — | — | Its height; null fits the content. |
|
|
5095
5024
|
| `over` | `boolean` | `false` | — | — | — | Draw over dialogs and spotlights (a tutorial callout, a dragged item); the default draws under them. |
|
|
5096
|
-
| `frame` | `
|
|
5097
|
-
| `instant` | `boolean` | `false` | — | — | — | Shown settled the first time it is built: no
|
|
5025
|
+
| `frame` | `StylePart \| null` | `null` | — | — | — | The style frame its background takes; null is the panel's. |
|
|
5026
|
+
| `instant` | `boolean` | `false` | — | — | — | Shown settled the first time it is built: no style entrance or stagger, its controls answering at once. For the screen a game opens on while it is that: the web draws it behind the play gate, where an entrance would stay part-way until the tap. |
|
|
5098
5027
|
|
|
5099
5028
|
```ogt
|
|
5100
5029
|
struct AnchorDesc {
|
|
@@ -5122,18 +5051,18 @@ struct AnchorDesc {
|
|
|
5122
5051
|
field width Option.Size "Its width; null fits the content."
|
|
5123
5052
|
field height Option.Size "Its height; null fits the content."
|
|
5124
5053
|
field over bool "Draw over dialogs and spotlights (a tutorial callout, a dragged item); the default draws under them."
|
|
5125
|
-
field frame Option.
|
|
5126
|
-
field instant bool "Shown settled the first time it is built: no
|
|
5054
|
+
field frame Option.StylePart "The style frame its background takes; null is the panel's."
|
|
5055
|
+
field instant bool "Shown settled the first time it is built: no style entrance or stagger, its controls answering at once. For the screen a game opens on while it is that: the web draws it behind the play gate, where an entrance would stay part-way until the tap."
|
|
5127
5056
|
}
|
|
5128
5057
|
```
|
|
5129
5058
|
|
|
5130
|
-
<sub>`api.ogt` line
|
|
5059
|
+
<sub>`api.ogt` line 10935</sub>
|
|
5131
5060
|
|
|
5132
5061
|
<a id="type-TransitionDesc"></a>
|
|
5133
5062
|
|
|
5134
5063
|
### `TransitionDesc` (desc struct)
|
|
5135
5064
|
|
|
5136
|
-
How a transition moves, timed in ticks from the motion
|
|
5065
|
+
How a transition moves, timed in ticks from the style's motion.
|
|
5137
5066
|
|
|
5138
5067
|
A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
5139
5068
|
|
|
@@ -5146,7 +5075,7 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
|
5146
5075
|
|
|
5147
5076
|
```ogt
|
|
5148
5077
|
struct TransitionDesc {
|
|
5149
|
-
doc "How a transition moves, timed in ticks from the motion
|
|
5078
|
+
doc "How a transition moves, timed in ticks from the style's motion."
|
|
5150
5079
|
desc true
|
|
5151
5080
|
field kind TransitionKind "The movement."
|
|
5152
5081
|
field durationMs f32 "How long entering and leaving take; 0 is motion.duration.base (240 ms)." {
|
|
@@ -5161,7 +5090,7 @@ struct TransitionDesc {
|
|
|
5161
5090
|
}
|
|
5162
5091
|
```
|
|
5163
5092
|
|
|
5164
|
-
<sub>`api.ogt` line
|
|
5093
|
+
<sub>`api.ogt` line 10964</sub>
|
|
5165
5094
|
|
|
5166
5095
|
<a id="type-Presence"></a>
|
|
5167
5096
|
|
|
@@ -5188,7 +5117,7 @@ struct Presence {
|
|
|
5188
5117
|
}
|
|
5189
5118
|
```
|
|
5190
5119
|
|
|
5191
|
-
<sub>`api.ogt` line
|
|
5120
|
+
<sub>`api.ogt` line 10979</sub>
|
|
5192
5121
|
|
|
5193
5122
|
<a id="type-ModalDesc"></a>
|
|
5194
5123
|
|
|
@@ -5222,7 +5151,7 @@ struct ModalDesc {
|
|
|
5222
5151
|
}
|
|
5223
5152
|
```
|
|
5224
5153
|
|
|
5225
|
-
<sub>`api.ogt` line
|
|
5154
|
+
<sub>`api.ogt` line 10989</sub>
|
|
5226
5155
|
|
|
5227
5156
|
<a id="type-ModalResult"></a>
|
|
5228
5157
|
|
|
@@ -5243,7 +5172,7 @@ struct ModalResult {
|
|
|
5243
5172
|
}
|
|
5244
5173
|
```
|
|
5245
5174
|
|
|
5246
|
-
<sub>`api.ogt` line
|
|
5175
|
+
<sub>`api.ogt` line 11001</sub>
|
|
5247
5176
|
|
|
5248
5177
|
<a id="type-SpotlightDesc"></a>
|
|
5249
5178
|
|
|
@@ -5268,7 +5197,7 @@ struct SpotlightDesc {
|
|
|
5268
5197
|
}
|
|
5269
5198
|
```
|
|
5270
5199
|
|
|
5271
|
-
<sub>`api.ogt` line
|
|
5200
|
+
<sub>`api.ogt` line 11007</sub>
|
|
5272
5201
|
|
|
5273
5202
|
<a id="type-ListDesc"></a>
|
|
5274
5203
|
|
|
@@ -5286,7 +5215,7 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
|
5286
5215
|
| `width` | `Size \| null` | `null` | — | — | — | Its width; null fits. |
|
|
5287
5216
|
| `height` | `Size \| null` | `null` | — | — | — | Its height (it scrolls inside); null grows. |
|
|
5288
5217
|
| `padding` | `Insets` | `{ left: 0, top: 0, right: 0, bottom: 0 }` | — | — | — | Space inside. |
|
|
5289
|
-
| `selected` | `number \| null` | `null` | — | — | — | The selected row (
|
|
5218
|
+
| `selected` | `number \| null` | `null` | — | — | — | The selected row (controlStrong), for og.ui.list. |
|
|
5290
5219
|
|
|
5291
5220
|
```ogt
|
|
5292
5221
|
struct ListDesc {
|
|
@@ -5303,11 +5232,11 @@ struct ListDesc {
|
|
|
5303
5232
|
field width Option.Size "Its width; null fits."
|
|
5304
5233
|
field height Option.Size "Its height (it scrolls inside); null grows."
|
|
5305
5234
|
field padding Insets "Space inside."
|
|
5306
|
-
field selected Option.u32 "The selected row (
|
|
5235
|
+
field selected Option.u32 "The selected row (controlStrong), for og.ui.list."
|
|
5307
5236
|
}
|
|
5308
5237
|
```
|
|
5309
5238
|
|
|
5310
|
-
<sub>`api.ogt` line
|
|
5239
|
+
<sub>`api.ogt` line 11016</sub>
|
|
5311
5240
|
|
|
5312
5241
|
<a id="type-ListRange"></a>
|
|
5313
5242
|
|
|
@@ -5328,7 +5257,7 @@ struct ListRange {
|
|
|
5328
5257
|
}
|
|
5329
5258
|
```
|
|
5330
5259
|
|
|
5331
|
-
<sub>`api.ogt` line
|
|
5260
|
+
<sub>`api.ogt` line 11033</sub>
|
|
5332
5261
|
|
|
5333
5262
|
<a id="type-ListResult"></a>
|
|
5334
5263
|
|
|
@@ -5351,7 +5280,7 @@ struct ListResult {
|
|
|
5351
5280
|
}
|
|
5352
5281
|
```
|
|
5353
5282
|
|
|
5354
|
-
<sub>`api.ogt` line
|
|
5283
|
+
<sub>`api.ogt` line 11039</sub>
|
|
5355
5284
|
|
|
5356
5285
|
<a id="type-GridDesc"></a>
|
|
5357
5286
|
|
|
@@ -5398,7 +5327,7 @@ struct GridDesc {
|
|
|
5398
5327
|
}
|
|
5399
5328
|
```
|
|
5400
5329
|
|
|
5401
|
-
<sub>`api.ogt` line
|
|
5330
|
+
<sub>`api.ogt` line 11046</sub>
|
|
5402
5331
|
|
|
5403
5332
|
<a id="type-TabsDesc"></a>
|
|
5404
5333
|
|
|
@@ -5424,7 +5353,7 @@ struct TabsDesc {
|
|
|
5424
5353
|
}
|
|
5425
5354
|
```
|
|
5426
5355
|
|
|
5427
|
-
<sub>`api.ogt` line
|
|
5356
|
+
<sub>`api.ogt` line 11069</sub>
|
|
5428
5357
|
|
|
5429
5358
|
<a id="type-ChoiceResult"></a>
|
|
5430
5359
|
|
|
@@ -5445,7 +5374,7 @@ struct ChoiceResult {
|
|
|
5445
5374
|
}
|
|
5446
5375
|
```
|
|
5447
5376
|
|
|
5448
|
-
<sub>`api.ogt` line
|
|
5377
|
+
<sub>`api.ogt` line 11077</sub>
|
|
5449
5378
|
|
|
5450
5379
|
<a id="type-SelectDesc"></a>
|
|
5451
5380
|
|
|
@@ -5473,7 +5402,7 @@ struct SelectDesc {
|
|
|
5473
5402
|
}
|
|
5474
5403
|
```
|
|
5475
5404
|
|
|
5476
|
-
<sub>`api.ogt` line
|
|
5405
|
+
<sub>`api.ogt` line 11083</sub>
|
|
5477
5406
|
|
|
5478
5407
|
<a id="type-StepperDesc"></a>
|
|
5479
5408
|
|
|
@@ -5505,7 +5434,7 @@ struct StepperDesc {
|
|
|
5505
5434
|
}
|
|
5506
5435
|
```
|
|
5507
5436
|
|
|
5508
|
-
<sub>`api.ogt` line
|
|
5437
|
+
<sub>`api.ogt` line 11092</sub>
|
|
5509
5438
|
|
|
5510
5439
|
<a id="type-StepperResult"></a>
|
|
5511
5440
|
|
|
@@ -5526,7 +5455,7 @@ struct StepperResult {
|
|
|
5526
5455
|
}
|
|
5527
5456
|
```
|
|
5528
5457
|
|
|
5529
|
-
<sub>`api.ogt` line
|
|
5458
|
+
<sub>`api.ogt` line 11105</sub>
|
|
5530
5459
|
|
|
5531
5460
|
<a id="type-RadioDesc"></a>
|
|
5532
5461
|
|
|
@@ -5550,7 +5479,7 @@ struct RadioDesc {
|
|
|
5550
5479
|
}
|
|
5551
5480
|
```
|
|
5552
5481
|
|
|
5553
|
-
<sub>`api.ogt` line
|
|
5482
|
+
<sub>`api.ogt` line 11111</sub>
|
|
5554
5483
|
|
|
5555
5484
|
<a id="type-CheckListResult"></a>
|
|
5556
5485
|
|
|
@@ -5571,7 +5500,7 @@ struct CheckListResult {
|
|
|
5571
5500
|
}
|
|
5572
5501
|
```
|
|
5573
5502
|
|
|
5574
|
-
<sub>`api.ogt` line
|
|
5503
|
+
<sub>`api.ogt` line 11118</sub>
|
|
5575
5504
|
|
|
5576
5505
|
<a id="type-ToastDesc"></a>
|
|
5577
5506
|
|
|
@@ -5598,7 +5527,7 @@ struct ToastDesc {
|
|
|
5598
5527
|
}
|
|
5599
5528
|
```
|
|
5600
5529
|
|
|
5601
|
-
<sub>`api.ogt` line
|
|
5530
|
+
<sub>`api.ogt` line 11124</sub>
|
|
5602
5531
|
|
|
5603
5532
|
<a id="type-ChipDesc"></a>
|
|
5604
5533
|
|
|
@@ -5610,25 +5539,25 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
|
5610
5539
|
|
|
5611
5540
|
| Field | Type | Default | Range | Unit | Notes | Doc |
|
|
5612
5541
|
|---|---|---|---|---|---|---|
|
|
5613
|
-
| `selected` | `boolean` | `false` | — | — | — | Selected: inverted to
|
|
5542
|
+
| `selected` | `boolean` | `false` | — | — | — | Selected: inverted to ink. |
|
|
5614
5543
|
| `disabled` | `boolean` | `false` | — | — | — | Neutral and inert. |
|
|
5615
5544
|
|
|
5616
5545
|
```ogt
|
|
5617
5546
|
struct ChipDesc {
|
|
5618
5547
|
doc "A chip's state."
|
|
5619
5548
|
desc true
|
|
5620
|
-
field selected bool "Selected: inverted to
|
|
5549
|
+
field selected bool "Selected: inverted to ink."
|
|
5621
5550
|
field disabled bool "Neutral and inert."
|
|
5622
5551
|
}
|
|
5623
5552
|
```
|
|
5624
5553
|
|
|
5625
|
-
<sub>`api.ogt` line
|
|
5554
|
+
<sub>`api.ogt` line 11134</sub>
|
|
5626
5555
|
|
|
5627
5556
|
<a id="type-MeterDesc"></a>
|
|
5628
5557
|
|
|
5629
5558
|
### `MeterDesc` (desc struct)
|
|
5630
5559
|
|
|
5631
|
-
A meter: a
|
|
5560
|
+
A meter: a track with a fill that animates its changes by the tick.
|
|
5632
5561
|
|
|
5633
5562
|
A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
5634
5563
|
|
|
@@ -5643,7 +5572,7 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
|
5643
5572
|
|
|
5644
5573
|
```ogt
|
|
5645
5574
|
struct MeterDesc {
|
|
5646
|
-
doc "A meter: a
|
|
5575
|
+
doc "A meter: a track with a fill that animates its changes by the tick."
|
|
5647
5576
|
desc true
|
|
5648
5577
|
field kind MeterKind "What it measures, which sets its colour."
|
|
5649
5578
|
field color Option.Paint "A colour of your own instead of the kind's."
|
|
@@ -5657,7 +5586,7 @@ struct MeterDesc {
|
|
|
5657
5586
|
}
|
|
5658
5587
|
```
|
|
5659
5588
|
|
|
5660
|
-
<sub>`api.ogt` line
|
|
5589
|
+
<sub>`api.ogt` line 11141</sub>
|
|
5661
5590
|
|
|
5662
5591
|
<a id="type-CooldownDesc"></a>
|
|
5663
5592
|
|
|
@@ -5686,7 +5615,7 @@ struct CooldownDesc {
|
|
|
5686
5615
|
}
|
|
5687
5616
|
```
|
|
5688
5617
|
|
|
5689
|
-
<sub>`api.ogt` line
|
|
5618
|
+
<sub>`api.ogt` line 11155</sub>
|
|
5690
5619
|
|
|
5691
5620
|
<a id="type-IconDesc"></a>
|
|
5692
5621
|
|
|
@@ -5699,7 +5628,7 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
|
5699
5628
|
| Field | Type | Default | Range | Unit | Notes | Doc |
|
|
5700
5629
|
|---|---|---|---|---|---|---|
|
|
5701
5630
|
| `size` | `number` | `0` | ≥ 0 | `cssPx` | — | Its size; 0 is 24. |
|
|
5702
|
-
| `tint` | `Paint \| null` | `null` | — | — | — | Its ink; null is
|
|
5631
|
+
| `tint` | `Paint \| null` | `null` | — | — | — | Its ink; null is ink. |
|
|
5703
5632
|
| `label` | `string \| null` | `null` | — | — | — | What a screen reader calls it (and the probe's text): null is the icon's name in the atlas (an English word: `star`); empty is decoration, named by nothing, so a card or button it sits on is named by its other text. A localised game names a meaningful icon from its string table. |
|
|
5704
5633
|
|
|
5705
5634
|
```ogt
|
|
@@ -5710,12 +5639,12 @@ struct IconDesc {
|
|
|
5710
5639
|
unit cssPx
|
|
5711
5640
|
min 0
|
|
5712
5641
|
}
|
|
5713
|
-
field tint Option.Paint "Its ink; null is
|
|
5642
|
+
field tint Option.Paint "Its ink; null is ink."
|
|
5714
5643
|
field label Option.String "What a screen reader calls it (and the probe's text): null is the icon's name in the atlas (an English word: `star`); empty is decoration, named by nothing, so a card or button it sits on is named by its other text. A localised game names a meaningful icon from its string table."
|
|
5715
5644
|
}
|
|
5716
5645
|
```
|
|
5717
5646
|
|
|
5718
|
-
<sub>`api.ogt` line
|
|
5647
|
+
<sub>`api.ogt` line 11166</sub>
|
|
5719
5648
|
|
|
5720
5649
|
<a id="type-MapMarker"></a>
|
|
5721
5650
|
|
|
@@ -5730,7 +5659,7 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
|
5730
5659
|
| `x` | `number` | `0` | — | `ratio` | — | Across the map, 0 to 1. |
|
|
5731
5660
|
| `y` | `number` | `0` | — | `ratio` | — | Down the map, 0 to 1. |
|
|
5732
5661
|
| `tone` | `Tone` | `"neutral"` | — | — | — | Its colour; neutral is the stage ink. |
|
|
5733
|
-
| `player` | `boolean` | `false` | — | — | — | The player: the
|
|
5662
|
+
| `player` | `boolean` | `false` | — | — | — | The player: the primary, larger, ringed. |
|
|
5734
5663
|
|
|
5735
5664
|
```ogt
|
|
5736
5665
|
struct MapMarker {
|
|
@@ -5743,11 +5672,11 @@ struct MapMarker {
|
|
|
5743
5672
|
unit ratio
|
|
5744
5673
|
}
|
|
5745
5674
|
field tone Tone "Its colour; neutral is the stage ink."
|
|
5746
|
-
field player bool "The player: the
|
|
5675
|
+
field player bool "The player: the primary, larger, ringed."
|
|
5747
5676
|
}
|
|
5748
5677
|
```
|
|
5749
5678
|
|
|
5750
|
-
<sub>`api.ogt` line
|
|
5679
|
+
<sub>`api.ogt` line 11177</sub>
|
|
5751
5680
|
|
|
5752
5681
|
<a id="type-MinimapDesc"></a>
|
|
5753
5682
|
|
|
@@ -5780,7 +5709,7 @@ struct MinimapDesc {
|
|
|
5780
5709
|
}
|
|
5781
5710
|
```
|
|
5782
5711
|
|
|
5783
|
-
<sub>`api.ogt` line
|
|
5712
|
+
<sub>`api.ogt` line 11190</sub>
|
|
5784
5713
|
|
|
5785
5714
|
<a id="type-DialogueDesc"></a>
|
|
5786
5715
|
|
|
@@ -5792,7 +5721,7 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
|
5792
5721
|
|
|
5793
5722
|
| Field | Type | Default | Range | Unit | Notes | Doc |
|
|
5794
5723
|
|---|---|---|---|---|---|---|
|
|
5795
|
-
| `speaker` | `string` | `""` | — | — | — | Who speaks (
|
|
5724
|
+
| `speaker` | `string` | `""` | — | — | — | Who speaks (primary ink). |
|
|
5796
5725
|
| `text` | `string` | `""` | — | — | — | The line. A new text starts typing again. |
|
|
5797
5726
|
| `portrait` | `Texture \| null` | `null` | — | — | — | A portrait texture; null is the speaker's initial. |
|
|
5798
5727
|
| `portraitUv` | `[number, number, number, number] \| null` | `null` | — | — | — | The portrait's region of the texture; null is the whole texture. |
|
|
@@ -5804,7 +5733,7 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
|
5804
5733
|
struct DialogueDesc {
|
|
5805
5734
|
doc "A dialogue box: a portrait slot, the speaker and the line typed out by the tick."
|
|
5806
5735
|
desc true
|
|
5807
|
-
field speaker String "Who speaks (
|
|
5736
|
+
field speaker String "Who speaks (primary ink)."
|
|
5808
5737
|
field text String "The line. A new text starts typing again."
|
|
5809
5738
|
field portrait Option.Texture "A portrait texture; null is the speaker's initial."
|
|
5810
5739
|
field portraitUv Option.Array.f32.4 "The portrait's region of the texture; null is the whole texture."
|
|
@@ -5816,7 +5745,7 @@ struct DialogueDesc {
|
|
|
5816
5745
|
}
|
|
5817
5746
|
```
|
|
5818
5747
|
|
|
5819
|
-
<sub>`api.ogt` line
|
|
5748
|
+
<sub>`api.ogt` line 11203</sub>
|
|
5820
5749
|
|
|
5821
5750
|
<a id="type-DialogueResult"></a>
|
|
5822
5751
|
|
|
@@ -5839,7 +5768,7 @@ struct DialogueResult {
|
|
|
5839
5768
|
}
|
|
5840
5769
|
```
|
|
5841
5770
|
|
|
5842
|
-
<sub>`api.ogt` line
|
|
5771
|
+
<sub>`api.ogt` line 11217</sub>
|
|
5843
5772
|
|
|
5844
5773
|
<a id="type-JoystickDesc"></a>
|
|
5845
5774
|
|
|
@@ -5870,7 +5799,7 @@ struct JoystickDesc {
|
|
|
5870
5799
|
}
|
|
5871
5800
|
```
|
|
5872
5801
|
|
|
5873
|
-
<sub>`api.ogt` line
|
|
5802
|
+
<sub>`api.ogt` line 11224</sub>
|
|
5874
5803
|
|
|
5875
5804
|
<a id="type-JoystickResult"></a>
|
|
5876
5805
|
|
|
@@ -5893,7 +5822,7 @@ struct JoystickResult {
|
|
|
5893
5822
|
}
|
|
5894
5823
|
```
|
|
5895
5824
|
|
|
5896
|
-
<sub>`api.ogt` line
|
|
5825
|
+
<sub>`api.ogt` line 11238</sub>
|
|
5897
5826
|
|
|
5898
5827
|
<a id="type-DpadDesc"></a>
|
|
5899
5828
|
|
|
@@ -5918,7 +5847,7 @@ struct DpadDesc {
|
|
|
5918
5847
|
}
|
|
5919
5848
|
```
|
|
5920
5849
|
|
|
5921
|
-
<sub>`api.ogt` line
|
|
5850
|
+
<sub>`api.ogt` line 11245</sub>
|
|
5922
5851
|
|
|
5923
5852
|
<a id="type-DpadResult"></a>
|
|
5924
5853
|
|
|
@@ -5943,36 +5872,36 @@ struct DpadResult {
|
|
|
5943
5872
|
}
|
|
5944
5873
|
```
|
|
5945
5874
|
|
|
5946
|
-
<sub>`api.ogt` line
|
|
5875
|
+
<sub>`api.ogt` line 11254</sub>
|
|
5947
5876
|
|
|
5948
5877
|
<a id="type-ActionButtonDesc"></a>
|
|
5949
5878
|
|
|
5950
5879
|
### `ActionButtonDesc` (desc struct)
|
|
5951
5880
|
|
|
5952
|
-
A
|
|
5881
|
+
A square touch action button (jump, fire), cornered by the style's control radius.
|
|
5953
5882
|
|
|
5954
5883
|
A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
5955
5884
|
|
|
5956
5885
|
| Field | Type | Default | Range | Unit | Notes | Doc |
|
|
5957
5886
|
|---|---|---|---|---|---|---|
|
|
5958
|
-
| `size` | `number` | `0` | ≥ 0 | `cssPx` | — | Its
|
|
5959
|
-
| `primary` | `boolean` | `false` | — | — | — | The
|
|
5887
|
+
| `size` | `number` | `0` | ≥ 0 | `cssPx` | — | Its side; 0 is 64 (never under 44). |
|
|
5888
|
+
| `primary` | `boolean` | `false` | — | — | — | The primary button (one per screen). |
|
|
5960
5889
|
| `icon` | `string` | `""` | — | — | — | An icon of the atlas by name, instead of the label; empty is the label. |
|
|
5961
5890
|
|
|
5962
5891
|
```ogt
|
|
5963
5892
|
struct ActionButtonDesc {
|
|
5964
|
-
doc "A
|
|
5893
|
+
doc "A square touch action button (jump, fire), cornered by the style's control radius."
|
|
5965
5894
|
desc true
|
|
5966
|
-
field size f32 "Its
|
|
5895
|
+
field size f32 "Its side; 0 is 64 (never under 44)." {
|
|
5967
5896
|
unit cssPx
|
|
5968
5897
|
min 0
|
|
5969
5898
|
}
|
|
5970
|
-
field primary bool "The
|
|
5899
|
+
field primary bool "The primary button (one per screen)."
|
|
5971
5900
|
field icon String "An icon of the atlas by name, instead of the label; empty is the label."
|
|
5972
5901
|
}
|
|
5973
5902
|
```
|
|
5974
5903
|
|
|
5975
|
-
<sub>`api.ogt` line
|
|
5904
|
+
<sub>`api.ogt` line 11262</sub>
|
|
5976
5905
|
|
|
5977
5906
|
<a id="type-SkeletonDesc"></a>
|
|
5978
5907
|
|
|
@@ -6001,7 +5930,7 @@ struct SkeletonDesc {
|
|
|
6001
5930
|
}
|
|
6002
5931
|
```
|
|
6003
5932
|
|
|
6004
|
-
<sub>`api.ogt` line
|
|
5933
|
+
<sub>`api.ogt` line 11273</sub>
|
|
6005
5934
|
|
|
6006
5935
|
<a id="type-UiItemBuild"></a>
|
|
6007
5936
|
|
|
@@ -6026,7 +5955,7 @@ callback UiItemBuild {
|
|
|
6026
5955
|
}
|
|
6027
5956
|
```
|
|
6028
5957
|
|
|
6029
|
-
<sub>`api.ogt` line
|
|
5958
|
+
<sub>`api.ogt` line 11284</sub>
|
|
6030
5959
|
|
|
6031
5960
|
<a id="type-A11yNode"></a>
|
|
6032
5961
|
|
|
@@ -6079,7 +6008,7 @@ struct A11yNode {
|
|
|
6079
6008
|
}
|
|
6080
6009
|
```
|
|
6081
6010
|
|
|
6082
|
-
<sub>`api.ogt` line
|
|
6011
|
+
<sub>`api.ogt` line 11647</sub>
|
|
6083
6012
|
|
|
6084
6013
|
<a id="type-A11yTree"></a>
|
|
6085
6014
|
|
|
@@ -6102,7 +6031,7 @@ struct A11yTree {
|
|
|
6102
6031
|
}
|
|
6103
6032
|
```
|
|
6104
6033
|
|
|
6105
|
-
<sub>`api.ogt` line
|
|
6034
|
+
<sub>`api.ogt` line 11673</sub>
|
|
6106
6035
|
|
|
6107
6036
|
<a id="type-CounterDesc"></a>
|
|
6108
6037
|
|
|
@@ -6116,7 +6045,7 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
|
6116
6045
|
|---|---|---|---|---|---|---|
|
|
6117
6046
|
| `step` | `TypeStepName \| null` | `null` | — | — | — | The type step; null is body. |
|
|
6118
6047
|
| `font` | `FontRole` | `"body"` | — | — | — | Which font: mono (the numeric role) for counts in a row, display for a big score. |
|
|
6119
|
-
| `color` | `Paint \| null` | `null` | — | — | — | The ink; null is
|
|
6048
|
+
| `color` | `Paint \| null` | `null` | — | — | — | The ink; null is ink. |
|
|
6120
6049
|
| `align` | `TextAlign` | `"start"` | — | — | — | How it aligns in its width. |
|
|
6121
6050
|
| `width` | `Size \| null` | `null` | — | — | — | Its width; null fits the text. |
|
|
6122
6051
|
| `durationMs` | `number` | `0` | ≥ 0 | `ms` | — | How long a change takes to count; 0 is 900 ms. |
|
|
@@ -6131,7 +6060,7 @@ struct CounterDesc {
|
|
|
6131
6060
|
desc true
|
|
6132
6061
|
field step Option.TypeStepName "The type step; null is body."
|
|
6133
6062
|
field font FontRole "Which font: mono (the numeric role) for counts in a row, display for a big score."
|
|
6134
|
-
field color Option.Paint "The ink; null is
|
|
6063
|
+
field color Option.Paint "The ink; null is ink."
|
|
6135
6064
|
field align TextAlign "How it aligns in its width."
|
|
6136
6065
|
field width Option.Size "Its width; null fits the text."
|
|
6137
6066
|
field durationMs f32 "How long a change takes to count; 0 is 900 ms." {
|
|
@@ -6145,7 +6074,7 @@ struct CounterDesc {
|
|
|
6145
6074
|
}
|
|
6146
6075
|
```
|
|
6147
6076
|
|
|
6148
|
-
<sub>`api.ogt` line
|
|
6077
|
+
<sub>`api.ogt` line 11710</sub>
|
|
6149
6078
|
|
|
6150
6079
|
<a id="type-BurstDesc"></a>
|
|
6151
6080
|
|
|
@@ -6158,7 +6087,7 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
|
6158
6087
|
| Field | Type | Default | Range | Unit | Notes | Doc |
|
|
6159
6088
|
|---|---|---|---|---|---|---|
|
|
6160
6089
|
| `count` | `number` | `0` | — | — | — | Rays; 0 is 8. |
|
|
6161
|
-
| `color` | `Paint \| null` | `null` | — | — | — | Their ink; null is the
|
|
6090
|
+
| `color` | `Paint \| null` | `null` | — | — | — | Their ink; null is the primary. |
|
|
6162
6091
|
| `radius` | `number` | `0` | ≥ 0 | `cssPx` | — | How far they fly from the element's centre; 0 is 1.4 times its size. |
|
|
6163
6092
|
| `durationMs` | `number` | `0` | ≥ 0 | `ms` | — | How long they fly; 0 is motion.duration.slow plus base. |
|
|
6164
6093
|
| `delayMs` | `number` | `0` | ≥ 0 | `ms` | — | Wait this long after the element first appears. |
|
|
@@ -6168,7 +6097,7 @@ struct BurstDesc {
|
|
|
6168
6097
|
doc "Rays and sparks thrown from an element."
|
|
6169
6098
|
desc true
|
|
6170
6099
|
field count u32 "Rays; 0 is 8."
|
|
6171
|
-
field color Option.Paint "Their ink; null is the
|
|
6100
|
+
field color Option.Paint "Their ink; null is the primary."
|
|
6172
6101
|
field radius f32 "How far they fly from the element's centre; 0 is 1.4 times its size." {
|
|
6173
6102
|
unit cssPx
|
|
6174
6103
|
min 0
|
|
@@ -6184,7 +6113,7 @@ struct BurstDesc {
|
|
|
6184
6113
|
}
|
|
6185
6114
|
```
|
|
6186
6115
|
|
|
6187
|
-
<sub>`api.ogt` line
|
|
6116
|
+
<sub>`api.ogt` line 11736</sub>
|
|
6188
6117
|
|
|
6189
6118
|
<a id="type-ShakeDesc"></a>
|
|
6190
6119
|
|
|
@@ -6196,15 +6125,15 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
|
6196
6125
|
|
|
6197
6126
|
| Field | Type | Default | Range | Unit | Notes | Doc |
|
|
6198
6127
|
|---|---|---|---|---|---|---|
|
|
6199
|
-
| `amount` | `number` | `0` | ≥ 0 | `cssPx` | — | The first swing; 0 is the
|
|
6128
|
+
| `amount` | `number` | `0` | ≥ 0 | `cssPx` | — | The first swing; 0 is the style's motion.shake, else 6. |
|
|
6200
6129
|
| `durationMs` | `number` | `0` | ≥ 0 | `ms` | — | How long it takes to come to rest; 0 is motion.duration.slow. |
|
|
6201
|
-
| `sound` | `boolean` | `false` | — | — | — | Also play the
|
|
6130
|
+
| `sound` | `boolean` | `false` | — | — | — | Also play the style's error sound, as a refused press does. |
|
|
6202
6131
|
|
|
6203
6132
|
```ogt
|
|
6204
6133
|
struct ShakeDesc {
|
|
6205
6134
|
doc "A shake of an element: three sideways swings decaying to rest."
|
|
6206
6135
|
desc true
|
|
6207
|
-
field amount f32 "The first swing; 0 is the
|
|
6136
|
+
field amount f32 "The first swing; 0 is the style's motion.shake, else 6." {
|
|
6208
6137
|
unit cssPx
|
|
6209
6138
|
min 0
|
|
6210
6139
|
}
|
|
@@ -6212,11 +6141,11 @@ struct ShakeDesc {
|
|
|
6212
6141
|
unit ms
|
|
6213
6142
|
min 0
|
|
6214
6143
|
}
|
|
6215
|
-
field sound bool "Also play the
|
|
6144
|
+
field sound bool "Also play the style's error sound, as a refused press does."
|
|
6216
6145
|
}
|
|
6217
6146
|
```
|
|
6218
6147
|
|
|
6219
|
-
<sub>`api.ogt` line
|
|
6148
|
+
<sub>`api.ogt` line 11761</sub>
|
|
6220
6149
|
|
|
6221
6150
|
<a id="type-ScreenWipe"></a>
|
|
6222
6151
|
|
|
@@ -6245,7 +6174,7 @@ enum ScreenWipe {
|
|
|
6245
6174
|
}
|
|
6246
6175
|
```
|
|
6247
6176
|
|
|
6248
|
-
<sub>`api.ogt` line
|
|
6177
|
+
<sub>`api.ogt` line 11781</sub>
|
|
6249
6178
|
|
|
6250
6179
|
<a id="type-WipeSide"></a>
|
|
6251
6180
|
|
|
@@ -6272,7 +6201,7 @@ enum WipeSide {
|
|
|
6272
6201
|
}
|
|
6273
6202
|
```
|
|
6274
6203
|
|
|
6275
|
-
<sub>`api.ogt` line
|
|
6204
|
+
<sub>`api.ogt` line 11790</sub>
|
|
6276
6205
|
|
|
6277
6206
|
<a id="type-ScreenTransitionDesc"></a>
|
|
6278
6207
|
|
|
@@ -6286,7 +6215,7 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
|
6286
6215
|
|---|---|---|---|---|---|---|
|
|
6287
6216
|
| `kind` | `ScreenWipe` | `"fade"` | — | — | — | The movement. |
|
|
6288
6217
|
| `durationMs` | `number` | `0` | ≥ 0 | `ms` | — | Cover and reveal together; 0 is twice motion.duration.slow. |
|
|
6289
|
-
| `color` | `Paint \| null` | `null` | — | — | — | The cover's colour (the texture's tint); null is
|
|
6218
|
+
| `color` | `Paint \| null` | `null` | — | — | — | The cover's colour (the texture's tint); null is backdrop. |
|
|
6290
6219
|
| `texture` | `Texture \| null` | `null` | — | — | — | A texture stretched over the surface as the cover; null is the flat colour. |
|
|
6291
6220
|
| `from` | `WipeSide` | `"left"` | — | — | — | Where a wipe or a slide comes from. |
|
|
6292
6221
|
|
|
@@ -6299,13 +6228,13 @@ struct ScreenTransitionDesc {
|
|
|
6299
6228
|
unit ms
|
|
6300
6229
|
min 0
|
|
6301
6230
|
}
|
|
6302
|
-
field color Option.Paint "The cover's colour (the texture's tint); null is
|
|
6231
|
+
field color Option.Paint "The cover's colour (the texture's tint); null is backdrop."
|
|
6303
6232
|
field texture Option.Texture "A texture stretched over the surface as the cover; null is the flat colour."
|
|
6304
6233
|
field from WipeSide "Where a wipe or a slide comes from."
|
|
6305
6234
|
}
|
|
6306
6235
|
```
|
|
6307
6236
|
|
|
6308
|
-
<sub>`api.ogt` line
|
|
6237
|
+
<sub>`api.ogt` line 11798</sub>
|
|
6309
6238
|
|
|
6310
6239
|
<a id="type-ScreenTransitionResult"></a>
|
|
6311
6240
|
|
|
@@ -6332,32 +6261,7 @@ struct ScreenTransitionResult {
|
|
|
6332
6261
|
}
|
|
6333
6262
|
```
|
|
6334
6263
|
|
|
6335
|
-
<sub>`api.ogt` line
|
|
6336
|
-
|
|
6337
|
-
<a id="type-GraphicsQuality"></a>
|
|
6338
|
-
|
|
6339
|
-
### `GraphicsQuality` (enum)
|
|
6340
|
-
|
|
6341
|
-
A graphics quality preset.
|
|
6342
|
-
|
|
6343
|
-
A string: one of the variants below. The zero value is `"medium"`.
|
|
6344
|
-
|
|
6345
|
-
| Variant | Doc |
|
|
6346
|
-
|---|---|
|
|
6347
|
-
| `"medium"` | Medium. |
|
|
6348
|
-
| `"low"` | Low: the fewest effects. |
|
|
6349
|
-
| `"high"` | High: every effect. |
|
|
6350
|
-
|
|
6351
|
-
```ogt
|
|
6352
|
-
enum GraphicsQuality {
|
|
6353
|
-
doc "A graphics quality preset."
|
|
6354
|
-
variant medium "Medium."
|
|
6355
|
-
variant low "Low: the fewest effects."
|
|
6356
|
-
variant high "High: every effect."
|
|
6357
|
-
}
|
|
6358
|
-
```
|
|
6359
|
-
|
|
6360
|
-
<sub>`api.ogt` line 9546</sub>
|
|
6264
|
+
<sub>`api.ogt` line 11811</sub>
|
|
6361
6265
|
|
|
6362
6266
|
<a id="type-UiAction"></a>
|
|
6363
6267
|
|
|
@@ -6382,7 +6286,7 @@ callback UiAction {
|
|
|
6382
6286
|
}
|
|
6383
6287
|
```
|
|
6384
6288
|
|
|
6385
|
-
<sub>`api.ogt` line
|
|
6289
|
+
<sub>`api.ogt` line 11838</sub>
|
|
6386
6290
|
|
|
6387
6291
|
<a id="type-SettingsChanged"></a>
|
|
6388
6292
|
|
|
@@ -6407,7 +6311,7 @@ callback SettingsChanged {
|
|
|
6407
6311
|
}
|
|
6408
6312
|
```
|
|
6409
6313
|
|
|
6410
|
-
<sub>`api.ogt` line
|
|
6314
|
+
<sub>`api.ogt` line 11843</sub>
|
|
6411
6315
|
|
|
6412
6316
|
<a id="type-MenuItem"></a>
|
|
6413
6317
|
|
|
@@ -6422,7 +6326,7 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
|
6422
6326
|
| `id` | `string` | `""` | — | — | — | The id answered when it is chosen; also its probe id. |
|
|
6423
6327
|
| `label` | `string` | `""` | — | — | — | What it says. |
|
|
6424
6328
|
| `disabled` | `boolean` | `false` | — | — | — | Shown but inert. |
|
|
6425
|
-
| `primary` | `boolean` | `false` | — | — | — | The
|
|
6329
|
+
| `primary` | `boolean` | `false` | — | — | — | The primary action (one per screen). |
|
|
6426
6330
|
|
|
6427
6331
|
```ogt
|
|
6428
6332
|
struct MenuItem {
|
|
@@ -6431,11 +6335,11 @@ struct MenuItem {
|
|
|
6431
6335
|
field id String "The id answered when it is chosen; also its probe id."
|
|
6432
6336
|
field label String "What it says."
|
|
6433
6337
|
field disabled bool "Shown but inert."
|
|
6434
|
-
field primary bool "The
|
|
6338
|
+
field primary bool "The primary action (one per screen)."
|
|
6435
6339
|
}
|
|
6436
6340
|
```
|
|
6437
6341
|
|
|
6438
|
-
<sub>`api.ogt` line
|
|
6342
|
+
<sub>`api.ogt` line 11848</sub>
|
|
6439
6343
|
|
|
6440
6344
|
<a id="type-MenuResult"></a>
|
|
6441
6345
|
|
|
@@ -6454,7 +6358,7 @@ struct MenuResult {
|
|
|
6454
6358
|
}
|
|
6455
6359
|
```
|
|
6456
6360
|
|
|
6457
|
-
<sub>`api.ogt` line
|
|
6361
|
+
<sub>`api.ogt` line 11857</sub>
|
|
6458
6362
|
|
|
6459
6363
|
<a id="type-MainMenuDesc"></a>
|
|
6460
6364
|
|
|
@@ -6471,7 +6375,7 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
|
6471
6375
|
| `items` | `readonly MenuItem[]` | `[]` | — | — | — | The items, such as Play, Continue, Settings, Quit. |
|
|
6472
6376
|
| `footer` | `string` | `""` | — | — | — | A line at the bottom (a version, credits); empty is none. |
|
|
6473
6377
|
| `onSelect` | `UiAction \| null` | `null` | — | — | — | Called with the chosen item's id. |
|
|
6474
|
-
| `instant` | `boolean` | `false` | — | — | — | Shown settled the first time it is built (AnchorDesc.instant): pass it while the title is the screen the game opens on, so the frame behind the web's play gate is the whole title; a title the player comes back to enters with the
|
|
6378
|
+
| `instant` | `boolean` | `false` | — | — | — | Shown settled the first time it is built (AnchorDesc.instant): pass it while the title is the screen the game opens on, so the frame behind the web's play gate is the whole title; a title the player comes back to enters with the style. |
|
|
6475
6379
|
|
|
6476
6380
|
```ogt
|
|
6477
6381
|
struct MainMenuDesc {
|
|
@@ -6482,11 +6386,11 @@ struct MainMenuDesc {
|
|
|
6482
6386
|
field items List.MenuItem "The items, such as Play, Continue, Settings, Quit."
|
|
6483
6387
|
field footer String "A line at the bottom (a version, credits); empty is none."
|
|
6484
6388
|
field onSelect Option.UiAction "Called with the chosen item's id."
|
|
6485
|
-
field instant bool "Shown settled the first time it is built (AnchorDesc.instant): pass it while the title is the screen the game opens on, so the frame behind the web's play gate is the whole title; a title the player comes back to enters with the
|
|
6389
|
+
field instant bool "Shown settled the first time it is built (AnchorDesc.instant): pass it while the title is the screen the game opens on, so the frame behind the web's play gate is the whole title; a title the player comes back to enters with the style."
|
|
6486
6390
|
}
|
|
6487
6391
|
```
|
|
6488
6392
|
|
|
6489
|
-
<sub>`api.ogt` line
|
|
6393
|
+
<sub>`api.ogt` line 11862</sub>
|
|
6490
6394
|
|
|
6491
6395
|
<a id="type-PauseMenuDesc"></a>
|
|
6492
6396
|
|
|
@@ -6516,7 +6420,7 @@ struct PauseMenuDesc {
|
|
|
6516
6420
|
}
|
|
6517
6421
|
```
|
|
6518
6422
|
|
|
6519
|
-
<sub>`api.ogt` line
|
|
6423
|
+
<sub>`api.ogt` line 11873</sub>
|
|
6520
6424
|
|
|
6521
6425
|
<a id="type-KeyBinding"></a>
|
|
6522
6426
|
|
|
@@ -6542,7 +6446,7 @@ struct KeyBinding {
|
|
|
6542
6446
|
}
|
|
6543
6447
|
```
|
|
6544
6448
|
|
|
6545
|
-
<sub>`api.ogt` line
|
|
6449
|
+
<sub>`api.ogt` line 11884</sub>
|
|
6546
6450
|
|
|
6547
6451
|
<a id="type-LanguageOption"></a>
|
|
6548
6452
|
|
|
@@ -6566,7 +6470,7 @@ struct LanguageOption {
|
|
|
6566
6470
|
}
|
|
6567
6471
|
```
|
|
6568
6472
|
|
|
6569
|
-
<sub>`api.ogt` line
|
|
6473
|
+
<sub>`api.ogt` line 11892</sub>
|
|
6570
6474
|
|
|
6571
6475
|
<a id="type-GameSettings"></a>
|
|
6572
6476
|
|
|
@@ -6635,7 +6539,7 @@ struct GameSettings {
|
|
|
6635
6539
|
}
|
|
6636
6540
|
```
|
|
6637
6541
|
|
|
6638
|
-
<sub>`api.ogt` line
|
|
6542
|
+
<sub>`api.ogt` line 11899</sub>
|
|
6639
6543
|
|
|
6640
6544
|
<a id="type-SettingsDesc"></a>
|
|
6641
6545
|
|
|
@@ -6652,6 +6556,7 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
|
|
|
6652
6556
|
| `languages` | `readonly LanguageOption[]` | `[]` | — | — | — | The languages offered; empty hides the Language tab. |
|
|
6653
6557
|
| `onChange` | `SettingsChanged \| null` | `null` | — | — | — | Called on every change (apply it at once: volume, contrast). |
|
|
6654
6558
|
| `onSave` | `SettingsChanged \| null` | `null` | — | — | — | Called when the screen closes after changes (persist here). |
|
|
6559
|
+
| `world` | `World \| null` | `null` | — | — | — | The world the graphics preset is drawn in: when the player picks another preset the screen calls og.render.applyQuality(world, preset) before onChange. Null leaves applying it to the game. Inside a system, the system declares RenderSettings among its writes. |
|
|
6655
6560
|
| `title` | `string` | `"Settings"` | — | — | — | The dialog's title. Every word of the screen is a field with its English default: a localised game passes its string table's (og.i18n.t). |
|
|
6656
6561
|
| `audioLabel` | `string` | `"Audio"` | — | — | — | The Audio tab. |
|
|
6657
6562
|
| `graphicsLabel` | `string` | `"Graphics"` | — | — | — | The Graphics tab. |
|
|
@@ -6684,6 +6589,7 @@ struct SettingsDesc {
|
|
|
6684
6589
|
field languages List.LanguageOption "The languages offered; empty hides the Language tab."
|
|
6685
6590
|
field onChange Option.SettingsChanged "Called on every change (apply it at once: volume, contrast)."
|
|
6686
6591
|
field onSave Option.SettingsChanged "Called when the screen closes after changes (persist here)."
|
|
6592
|
+
field world Option.World "The world the graphics preset is drawn in: when the player picks another preset the screen calls og.render.applyQuality(world, preset) before onChange. Null leaves applying it to the game. Inside a system, the system declares RenderSettings among its writes."
|
|
6687
6593
|
field title String "The dialog's title. Every word of the screen is a field with its English default: a localised game passes its string table's (og.i18n.t)." {
|
|
6688
6594
|
default "Settings"
|
|
6689
6595
|
}
|
|
@@ -6753,7 +6659,7 @@ struct SettingsDesc {
|
|
|
6753
6659
|
}
|
|
6754
6660
|
```
|
|
6755
6661
|
|
|
6756
|
-
<sub>`api.ogt` line
|
|
6662
|
+
<sub>`api.ogt` line 11940</sub>
|
|
6757
6663
|
|
|
6758
6664
|
<a id="type-SettingsResult"></a>
|
|
6759
6665
|
|
|
@@ -6776,7 +6682,7 @@ struct SettingsResult {
|
|
|
6776
6682
|
}
|
|
6777
6683
|
```
|
|
6778
6684
|
|
|
6779
|
-
<sub>`api.ogt` line
|
|
6685
|
+
<sub>`api.ogt` line 12017</sub>
|
|
6780
6686
|
|
|
6781
6687
|
<a id="type-Ability"></a>
|
|
6782
6688
|
|
|
@@ -6806,7 +6712,7 @@ struct Ability {
|
|
|
6806
6712
|
}
|
|
6807
6713
|
```
|
|
6808
6714
|
|
|
6809
|
-
<sub>`api.ogt` line
|
|
6715
|
+
<sub>`api.ogt` line 12024</sub>
|
|
6810
6716
|
|
|
6811
6717
|
<a id="type-PlatformerHudDesc"></a>
|
|
6812
6718
|
|
|
@@ -6852,7 +6758,7 @@ struct PlatformerHudDesc {
|
|
|
6852
6758
|
}
|
|
6853
6759
|
```
|
|
6854
6760
|
|
|
6855
|
-
<sub>`api.ogt` line
|
|
6761
|
+
<sub>`api.ogt` line 12035</sub>
|
|
6856
6762
|
|
|
6857
6763
|
<a id="type-HudResult"></a>
|
|
6858
6764
|
|
|
@@ -6879,7 +6785,7 @@ struct HudResult {
|
|
|
6879
6785
|
}
|
|
6880
6786
|
```
|
|
6881
6787
|
|
|
6882
|
-
<sub>`api.ogt` line
|
|
6788
|
+
<sub>`api.ogt` line 12056</sub>
|
|
6883
6789
|
|
|
6884
6790
|
<a id="type-ShooterHudDesc"></a>
|
|
6885
6791
|
|
|
@@ -6941,7 +6847,7 @@ struct ShooterHudDesc {
|
|
|
6941
6847
|
}
|
|
6942
6848
|
```
|
|
6943
6849
|
|
|
6944
|
-
<sub>`api.ogt` line
|
|
6850
|
+
<sub>`api.ogt` line 12065</sub>
|
|
6945
6851
|
|
|
6946
6852
|
<a id="type-PuzzleHudDesc"></a>
|
|
6947
6853
|
|
|
@@ -6987,7 +6893,7 @@ struct PuzzleHudDesc {
|
|
|
6987
6893
|
}
|
|
6988
6894
|
```
|
|
6989
6895
|
|
|
6990
|
-
<sub>`api.ogt` line
|
|
6896
|
+
<sub>`api.ogt` line 12096</sub>
|
|
6991
6897
|
|
|
6992
6898
|
<a id="type-Currency"></a>
|
|
6993
6899
|
|
|
@@ -7017,7 +6923,7 @@ struct Currency {
|
|
|
7017
6923
|
}
|
|
7018
6924
|
```
|
|
7019
6925
|
|
|
7020
|
-
<sub>`api.ogt` line
|
|
6926
|
+
<sub>`api.ogt` line 12118</sub>
|
|
7021
6927
|
|
|
7022
6928
|
<a id="type-Generator"></a>
|
|
7023
6929
|
|
|
@@ -7053,7 +6959,7 @@ struct Generator {
|
|
|
7053
6959
|
}
|
|
7054
6960
|
```
|
|
7055
6961
|
|
|
7056
|
-
<sub>`api.ogt` line
|
|
6962
|
+
<sub>`api.ogt` line 12128</sub>
|
|
7057
6963
|
|
|
7058
6964
|
<a id="type-IdleHudDesc"></a>
|
|
7059
6965
|
|
|
@@ -7093,7 +6999,7 @@ struct IdleHudDesc {
|
|
|
7093
6999
|
}
|
|
7094
7000
|
```
|
|
7095
7001
|
|
|
7096
|
-
<sub>`api.ogt` line
|
|
7002
|
+
<sub>`api.ogt` line 12142</sub>
|
|
7097
7003
|
|
|
7098
7004
|
<a id="type-RaceSplit"></a>
|
|
7099
7005
|
|
|
@@ -7119,7 +7025,7 @@ struct RaceSplit {
|
|
|
7119
7025
|
}
|
|
7120
7026
|
```
|
|
7121
7027
|
|
|
7122
|
-
<sub>`api.ogt` line
|
|
7028
|
+
<sub>`api.ogt` line 12161</sub>
|
|
7123
7029
|
|
|
7124
7030
|
<a id="type-RacingHudDesc"></a>
|
|
7125
7031
|
|
|
@@ -7215,7 +7121,7 @@ struct RacingHudDesc {
|
|
|
7215
7121
|
}
|
|
7216
7122
|
```
|
|
7217
7123
|
|
|
7218
|
-
<sub>`api.ogt` line
|
|
7124
|
+
<sub>`api.ogt` line 12169</sub>
|
|
7219
7125
|
|
|
7220
7126
|
<a id="type-DialogueLine"></a>
|
|
7221
7127
|
|
|
@@ -7241,7 +7147,7 @@ struct DialogueLine {
|
|
|
7241
7147
|
}
|
|
7242
7148
|
```
|
|
7243
7149
|
|
|
7244
|
-
<sub>`api.ogt` line
|
|
7150
|
+
<sub>`api.ogt` line 12227</sub>
|
|
7245
7151
|
|
|
7246
7152
|
<a id="type-CutsceneDesc"></a>
|
|
7247
7153
|
|
|
@@ -7279,7 +7185,7 @@ struct CutsceneDesc {
|
|
|
7279
7185
|
}
|
|
7280
7186
|
```
|
|
7281
7187
|
|
|
7282
|
-
<sub>`api.ogt` line
|
|
7188
|
+
<sub>`api.ogt` line 12235</sub>
|
|
7283
7189
|
|
|
7284
7190
|
<a id="type-CutsceneResult"></a>
|
|
7285
7191
|
|
|
@@ -7302,7 +7208,7 @@ struct CutsceneResult {
|
|
|
7302
7208
|
}
|
|
7303
7209
|
```
|
|
7304
7210
|
|
|
7305
|
-
<sub>`api.ogt` line
|
|
7211
|
+
<sub>`api.ogt` line 12252</sub>
|
|
7306
7212
|
|
|
7307
7213
|
<a id="type-ShopItem"></a>
|
|
7308
7214
|
|
|
@@ -7336,7 +7242,7 @@ struct ShopItem {
|
|
|
7336
7242
|
}
|
|
7337
7243
|
```
|
|
7338
7244
|
|
|
7339
|
-
<sub>`api.ogt` line
|
|
7245
|
+
<sub>`api.ogt` line 12259</sub>
|
|
7340
7246
|
|
|
7341
7247
|
<a id="type-ShopDesc"></a>
|
|
7342
7248
|
|
|
@@ -7394,7 +7300,7 @@ struct ShopDesc {
|
|
|
7394
7300
|
}
|
|
7395
7301
|
```
|
|
7396
7302
|
|
|
7397
|
-
<sub>`api.ogt` line
|
|
7303
|
+
<sub>`api.ogt` line 12271</sub>
|
|
7398
7304
|
|
|
7399
7305
|
<a id="type-ShopResult"></a>
|
|
7400
7306
|
|
|
@@ -7417,7 +7323,7 @@ struct ShopResult {
|
|
|
7417
7323
|
}
|
|
7418
7324
|
```
|
|
7419
7325
|
|
|
7420
|
-
<sub>`api.ogt` line
|
|
7326
|
+
<sub>`api.ogt` line 12302</sub>
|
|
7421
7327
|
|
|
7422
7328
|
<a id="type-InventoryItem"></a>
|
|
7423
7329
|
|
|
@@ -7449,7 +7355,7 @@ struct InventoryItem {
|
|
|
7449
7355
|
}
|
|
7450
7356
|
```
|
|
7451
7357
|
|
|
7452
|
-
<sub>`api.ogt` line
|
|
7358
|
+
<sub>`api.ogt` line 12309</sub>
|
|
7453
7359
|
|
|
7454
7360
|
<a id="type-InventoryDesc"></a>
|
|
7455
7361
|
|
|
@@ -7493,7 +7399,7 @@ struct InventoryDesc {
|
|
|
7493
7399
|
}
|
|
7494
7400
|
```
|
|
7495
7401
|
|
|
7496
|
-
<sub>`api.ogt` line
|
|
7402
|
+
<sub>`api.ogt` line 12320</sub>
|
|
7497
7403
|
|
|
7498
7404
|
<a id="type-SlotMove"></a>
|
|
7499
7405
|
|
|
@@ -7514,7 +7420,7 @@ struct SlotMove {
|
|
|
7514
7420
|
}
|
|
7515
7421
|
```
|
|
7516
7422
|
|
|
7517
|
-
<sub>`api.ogt` line
|
|
7423
|
+
<sub>`api.ogt` line 12342</sub>
|
|
7518
7424
|
|
|
7519
7425
|
<a id="type-InventoryResult"></a>
|
|
7520
7426
|
|
|
@@ -7539,7 +7445,7 @@ struct InventoryResult {
|
|
|
7539
7445
|
}
|
|
7540
7446
|
```
|
|
7541
7447
|
|
|
7542
|
-
<sub>`api.ogt` line
|
|
7448
|
+
<sub>`api.ogt` line 12348</sub>
|
|
7543
7449
|
|
|
7544
7450
|
<a id="type-LevelInfo"></a>
|
|
7545
7451
|
|
|
@@ -7567,7 +7473,7 @@ struct LevelInfo {
|
|
|
7567
7473
|
}
|
|
7568
7474
|
```
|
|
7569
7475
|
|
|
7570
|
-
<sub>`api.ogt` line
|
|
7476
|
+
<sub>`api.ogt` line 12356</sub>
|
|
7571
7477
|
|
|
7572
7478
|
<a id="type-LevelSelectDesc"></a>
|
|
7573
7479
|
|
|
@@ -7607,7 +7513,7 @@ struct LevelSelectDesc {
|
|
|
7607
7513
|
}
|
|
7608
7514
|
```
|
|
7609
7515
|
|
|
7610
|
-
<sub>`api.ogt` line
|
|
7516
|
+
<sub>`api.ogt` line 12365</sub>
|
|
7611
7517
|
|
|
7612
7518
|
<a id="type-LevelSelectResult"></a>
|
|
7613
7519
|
|
|
@@ -7628,7 +7534,7 @@ struct LevelSelectResult {
|
|
|
7628
7534
|
}
|
|
7629
7535
|
```
|
|
7630
7536
|
|
|
7631
|
-
<sub>`api.ogt` line
|
|
7537
|
+
<sub>`api.ogt` line 12384</sub>
|
|
7632
7538
|
|
|
7633
7539
|
<a id="type-StatRow"></a>
|
|
7634
7540
|
|
|
@@ -7652,7 +7558,7 @@ struct StatRow {
|
|
|
7652
7558
|
}
|
|
7653
7559
|
```
|
|
7654
7560
|
|
|
7655
|
-
<sub>`api.ogt` line
|
|
7561
|
+
<sub>`api.ogt` line 12390</sub>
|
|
7656
7562
|
|
|
7657
7563
|
<a id="type-ScoreFormat"></a>
|
|
7658
7564
|
|
|
@@ -7675,7 +7581,7 @@ enum ScoreFormat {
|
|
|
7675
7581
|
}
|
|
7676
7582
|
```
|
|
7677
7583
|
|
|
7678
|
-
<sub>`api.ogt` line
|
|
7584
|
+
<sub>`api.ogt` line 12397</sub>
|
|
7679
7585
|
|
|
7680
7586
|
<a id="type-ResultsDesc"></a>
|
|
7681
7587
|
|
|
@@ -7737,7 +7643,7 @@ struct ResultsDesc {
|
|
|
7737
7643
|
}
|
|
7738
7644
|
```
|
|
7739
7645
|
|
|
7740
|
-
<sub>`api.ogt` line
|
|
7646
|
+
<sub>`api.ogt` line 12403</sub>
|
|
7741
7647
|
|
|
7742
7648
|
<a id="type-LeaderboardEntry"></a>
|
|
7743
7649
|
|
|
@@ -7765,7 +7671,7 @@ struct LeaderboardEntry {
|
|
|
7765
7671
|
}
|
|
7766
7672
|
```
|
|
7767
7673
|
|
|
7768
|
-
<sub>`api.ogt` line
|
|
7674
|
+
<sub>`api.ogt` line 12434</sub>
|
|
7769
7675
|
|
|
7770
7676
|
<a id="type-LeaderboardDesc"></a>
|
|
7771
7677
|
|
|
@@ -7805,7 +7711,7 @@ struct LeaderboardDesc {
|
|
|
7805
7711
|
}
|
|
7806
7712
|
```
|
|
7807
7713
|
|
|
7808
|
-
<sub>`api.ogt` line
|
|
7714
|
+
<sub>`api.ogt` line 12443</sub>
|
|
7809
7715
|
|
|
7810
7716
|
<a id="type-LeaderboardResult"></a>
|
|
7811
7717
|
|
|
@@ -7830,7 +7736,7 @@ struct LeaderboardResult {
|
|
|
7830
7736
|
}
|
|
7831
7737
|
```
|
|
7832
7738
|
|
|
7833
|
-
<sub>`api.ogt` line
|
|
7739
|
+
<sub>`api.ogt` line 12461</sub>
|
|
7834
7740
|
|
|
7835
7741
|
<a id="type-TutorialStep"></a>
|
|
7836
7742
|
|
|
@@ -7856,7 +7762,7 @@ struct TutorialStep {
|
|
|
7856
7762
|
}
|
|
7857
7763
|
```
|
|
7858
7764
|
|
|
7859
|
-
<sub>`api.ogt` line
|
|
7765
|
+
<sub>`api.ogt` line 12469</sub>
|
|
7860
7766
|
|
|
7861
7767
|
<a id="type-TutorialDesc"></a>
|
|
7862
7768
|
|
|
@@ -7898,7 +7804,7 @@ struct TutorialDesc {
|
|
|
7898
7804
|
}
|
|
7899
7805
|
```
|
|
7900
7806
|
|
|
7901
|
-
<sub>`api.ogt` line
|
|
7807
|
+
<sub>`api.ogt` line 12477</sub>
|
|
7902
7808
|
|
|
7903
7809
|
<a id="type-TutorialResult"></a>
|
|
7904
7810
|
|
|
@@ -7921,7 +7827,7 @@ struct TutorialResult {
|
|
|
7921
7827
|
}
|
|
7922
7828
|
```
|
|
7923
7829
|
|
|
7924
|
-
<sub>`api.ogt` line
|
|
7830
|
+
<sub>`api.ogt` line 12497</sub>
|
|
7925
7831
|
|
|
7926
7832
|
<a id="type-LoadingDesc"></a>
|
|
7927
7833
|
|
|
@@ -7954,7 +7860,7 @@ struct LoadingDesc {
|
|
|
7954
7860
|
}
|
|
7955
7861
|
```
|
|
7956
7862
|
|
|
7957
|
-
<sub>`api.ogt` line
|
|
7863
|
+
<sub>`api.ogt` line 12504</sub>
|
|
7958
7864
|
|
|
7959
7865
|
<a id="type-ConfirmDesc"></a>
|
|
7960
7866
|
|
|
@@ -7990,7 +7896,7 @@ struct ConfirmDesc {
|
|
|
7990
7896
|
}
|
|
7991
7897
|
```
|
|
7992
7898
|
|
|
7993
|
-
<sub>`api.ogt` line
|
|
7899
|
+
<sub>`api.ogt` line 12518</sub>
|
|
7994
7900
|
|
|
7995
7901
|
<a id="type-ConfirmResult"></a>
|
|
7996
7902
|
|
|
@@ -8011,7 +7917,7 @@ struct ConfirmResult {
|
|
|
8011
7917
|
}
|
|
8012
7918
|
```
|
|
8013
7919
|
|
|
8014
|
-
<sub>`api.ogt` line
|
|
7920
|
+
<sub>`api.ogt` line 12533</sub>
|
|
8015
7921
|
|
|
8016
7922
|
<a id="type-AlertDesc"></a>
|
|
8017
7923
|
|
|
@@ -8041,4 +7947,4 @@ struct AlertDesc {
|
|
|
8041
7947
|
}
|
|
8042
7948
|
```
|
|
8043
7949
|
|
|
8044
|
-
<sub>`api.ogt` line
|
|
7950
|
+
<sub>`api.ogt` line 12539</sub>
|