| Properties |
| document | An EnvyDocument resource (an imported .envy.json). Reloads while the game runs |
| document_path | Or a path to the .envy.json file |
| start_screen | Screen to show first. Defaults to the first screen |
| scale_mode | FIT scales the design resolution into the node and stretches to its aspect |
| autoplay | Play autoplay animations when a screen shows |
| use_sample_data | Start with the document's sample data |
| hot_reload | Pick up a re-imported document while the game runs |
| locale | Locale for translated text, like "de" or "pt-BR" |
| fonts | Family name to a Font resource, for fonts the document does not embed |
| cancel_closes_overlay | ui_cancel (Esc, gamepad B) closes the top overlay |
| Methods |
| goto(screen, transition) | Show a screen by name or id |
| push(screen, transition) · pop() | Open a screen over the current one, close the top one |
| get_stack() · get_screen_names() | The open screens, every screen |
| set_data(path, value) | Set one data path, for example "player.hp" |
| merge_data(patch) · get_data(path) | Deep-merge a dictionary, read a value |
| play(anim) · stop(anim) · is_playing(anim) | Run the document's animations |
| set_locale(locale) · get_locales() | Switch language at runtime |
| get_control(name_or_id) | The Control built for a layer |
| focus_first_button() | Start keyboard and gamepad navigation |
| load_document(path) · load_resource(res) | Load another document |
| Signals |
| ui_event(event, payload) | A button emitted an event |
| screen_changed(screen_name) | goto, push or pop ran |
| data_changed(data) | A button set or toggled data |
| document_reloaded | The document changed on disk and was reloaded |