---
title: "appMenu"
description: "The app's menu: the one menu the pause action opens (Escape, a gamepad's Start, the on-screen Menu button, a headset's left menu button)…"
section: "API Reference"
slug: "api-appmenu"
canonical: "https://origozero.ai/docs/api-appmenu"
updated: "2026-11-13T09:49:49.693311585+00:00"
tags: ["api", "reference"]
---

# appMenu

The app's menu: the one menu the pause action opens (Escape, a gamepad's Start, the on-screen Menu button, a headset's left menu button), in every profile and on every platform. It is a host of tabs: every tab is a `.menuTab` asset that draws its own body, and the menu draws the frame around them in the presentation the device needs: full-window on a desktop, full-screen with the tabs along the bottom on a phone, and a home menu on a world panel in a headset, with the tabs along its bottom edge and Resume, Recenter and Exit VR along its top. The engine's own tabs are ZeroMind (the worlds to play and make) and System (the client settings); World is the world's own tab, the `.menuTab` in its `/source`, and while a world has none it shows the world's title and the way back to it. Opening the menu pauses nothing: every world is shared, and it keeps running.

```lua
require("@builtin::modules.api.engine.app_menu") -- appMenu (also available as global 'appMenu')
```

The `appMenu` namespace: 29 functions.

## globals/appMenu/SCREEN {#globals-appmenu-screen}

```lua
appMenu.SCREEN()
```

The id of the menu's screen and of its world panel in a headset.

## globals/appMenu/activeTab {#globals-appmenu-activetab}

```lua
appMenu.activeTab() -> string?
```

The tab the menu shows, or would show when opened.

**Returns** `string?`

## globals/appMenu/close {#globals-appmenu-close}

```lua
appMenu.close(opts: { force: boolean? }?) -> boolean
```

Close the menu and go back to the world it was opened over. A menu
with no world behind it stays, unless `force` takes it down regardless,
as opening a world from it does.

**Parameters**

- `opts` `{ force: boolean? }` _(optional)_ — `{ force? }`.

**Returns** `boolean` — Whether it closed.

## globals/appMenu/isOpen {#globals-appmenu-isopen}

```lua
appMenu.isOpen() -> boolean
```

Whether the menu is open.

**Returns** `boolean`

## globals/appMenu/open {#globals-appmenu-open}

```lua
appMenu.open(tab: string?)
```

Open the menu, on the tab named or the one shown last.

**Parameters**

- `tab` `string` _(optional)_ — The tab's id (`"world"`, `"zeromind"`, `"system"`), or nil.

## globals/appMenu/presentation {#globals-appmenu-presentation}

```lua
appMenu.presentation() -> Presentation
```

The presentation the menu is drawn in on this client now: `"vr"`
while a headset session holds focus, `"phone"` on Android and on a
screen narrower than a tablet or standing in portrait, `"desktop"`
otherwise.

**Returns** `Presentation` — The presentation.

## globals/appMenu/redraw {#globals-appmenu-redraw}

```lua
appMenu.redraw()
```

Draw the open menu again, its frame and the shown tab's body built
from their state now. A tab calls it after its own state changes, in
its `onCallback` or from a task or a timer, for the change to show; a
closed menu builds the tab it shows afresh when it next opens.

## globals/appMenu/select {#globals-appmenu-select}

```lua
appMenu.select(tab: string)
```

Show the tab named in the open menu.

**Parameters**

- `tab` `string` — The tab's id.

## globals/appMenu/tabs {#globals-appmenu-tabs}

```lua
appMenu.tabs() -> { { id: string, title: string, visible: boolean } }
```

The tabs registered, in their order, and whether each shows now.

**Returns** `{ { id: string, title: string, visible: boolean } }` — `{ { id, title, visible } }`.

## globals/appMenu/toggle {#globals-appmenu-toggle}

```lua
appMenu.toggle()
```

What the pause action does: open the menu, or, while it is open, go
back one step in its tab, and close it from the tab's first step.

## modules/appMenu/activeTab {#modules-appmenu-activetab}

```lua
activeTab(): string?
```

The tab the menu shows, or would show when opened.

## modules/appMenu/close {#modules-appmenu-close}

```lua
close(opts: { force: boolean? }?): boolean
```

Close the menu and go back to the world it was opened over. A menu
with no world behind it stays, unless `force` takes it down regardless,
as opening a world from it does.

**Parameters**

- `opts` `{ force: boolean? }?` _(optional)_ — `{ force? }`.

## modules/appMenu/install {#modules-appmenu-install}

```lua
install()
```

Hold the pause action and keep the open menu in its presentation and
current with the window. Called once by the prelude.

## modules/appMenu/isOpen {#modules-appmenu-isopen}

```lua
isOpen(): boolean
```

Whether the menu is open.

## modules/appMenu/open {#modules-appmenu-open}

```lua
open(tab: string?)
```

Open the menu, on the tab named or the one shown last.

**Parameters**

- `tab` `string?` _(optional)_ — The tab's id (`"world"`, `"zeromind"`, `"system"`), or nil.

## modules/appMenu/presentation {#modules-appmenu-presentation}

```lua
presentation(): Presentation
```

The presentation the menu is drawn in on this client now: `"vr"`
while a headset session holds focus, `"phone"` on Android and on a
screen narrower than a tablet or standing in portrait, `"desktop"`
otherwise.

## modules/appMenu/redraw {#modules-appmenu-redraw}

```lua
redraw()
```

Draw the open menu again, its frame and the shown tab's body built
from their state now. A tab calls it after its own state changes, in
its `onCallback` or from a task or a timer, for the change to show; a
closed menu builds the tab it shows afresh when it next opens.

## modules/appMenu/select {#modules-appmenu-select}

```lua
select(tab: string)
```

Show the tab named in the open menu.

**Parameters**

- `tab` `string` — The tab's id.

## modules/appMenu/tabs {#modules-appmenu-tabs}

```lua
tabs(): { { id: string, title: string, visible: boolean } }
```

The tabs registered, in their order, and whether each shows now.

## modules/appMenu/toggle {#modules-appmenu-toggle}

```lua
toggle()
```

What the pause action does: open the menu, or, while it is open, go
back one step in its tab, and close it from the tab's first step.

## typed/builtin//modules/api/engine/app_menu/appMenu/activeTab {#typed-builtin-modules-api-engine-app-menu-appmenu-activetab}

```lua
appMenu.activeTab() -> string?
```

The tab the menu shows, or would show when opened.

**Returns** `string?`

## typed/builtin//modules/api/engine/app_menu/appMenu/close {#typed-builtin-modules-api-engine-app-menu-appmenu-close}

```lua
appMenu.close(opts: { force: boolean? }?) -> boolean
```

Close the menu and go back to the world it was opened over. A menu
with no world behind it stays, unless `force` takes it down regardless,
as opening a world from it does.

**Parameters**

- `opts` `{ force: boolean? }` _(optional)_ — `{ force? }`.

**Returns** `boolean` — Whether it closed.

## typed/builtin//modules/api/engine/app_menu/appMenu/isOpen {#typed-builtin-modules-api-engine-app-menu-appmenu-isopen}

```lua
appMenu.isOpen() -> boolean
```

Whether the menu is open.

**Returns** `boolean`

## typed/builtin//modules/api/engine/app_menu/appMenu/open {#typed-builtin-modules-api-engine-app-menu-appmenu-open}

```lua
appMenu.open(tab: string?)
```

Open the menu, on the tab named or the one shown last.

**Parameters**

- `tab` `string` _(optional)_ — The tab's id (`"world"`, `"zeromind"`, `"system"`), or nil.

## typed/builtin//modules/api/engine/app_menu/appMenu/presentation {#typed-builtin-modules-api-engine-app-menu-appmenu-presentation}

```lua
appMenu.presentation() -> Presentation
```

The presentation the menu is drawn in on this client now: `"vr"`
while a headset session holds focus, `"phone"` on Android and on a
screen narrower than a tablet or standing in portrait, `"desktop"`
otherwise.

**Returns** `Presentation` — The presentation.

## typed/builtin//modules/api/engine/app_menu/appMenu/redraw {#typed-builtin-modules-api-engine-app-menu-appmenu-redraw}

```lua
appMenu.redraw()
```

Draw the open menu again, its frame and the shown tab's body built
from their state now. A tab calls it after its own state changes, in
its `onCallback` or from a task or a timer, for the change to show; a
closed menu builds the tab it shows afresh when it next opens.

## typed/builtin//modules/api/engine/app_menu/appMenu/select {#typed-builtin-modules-api-engine-app-menu-appmenu-select}

```lua
appMenu.select(tab: string)
```

Show the tab named in the open menu.

**Parameters**

- `tab` `string` — The tab's id.

## typed/builtin//modules/api/engine/app_menu/appMenu/tabs {#typed-builtin-modules-api-engine-app-menu-appmenu-tabs}

```lua
appMenu.tabs() -> { { id: string, title: string, visible: boolean } }
```

The tabs registered, in their order, and whether each shows now.

**Returns** `{ { id: string, title: string, visible: boolean } }` — `{ { id, title, visible } }`.

## typed/builtin//modules/api/engine/app_menu/appMenu/toggle {#typed-builtin-modules-api-engine-app-menu-appmenu-toggle}

```lua
appMenu.toggle()
```

What the pause action does: open the menu, or, while it is open, go
back one step in its tab, and close it from the tab's first step.
