# Menu

The main menu lets you browse, search, preview and play emotes through a React-based interface.

***

### Opening the menu

| Action  | Default       |
| ------- | ------------- |
| Key     | `M`           |
| Command | `/emote_menu` |

> Players can move while the menu is open (`Config.Menu.AllowMovement = true`).

***

### Playing an emote by command

```
/e [name]          Play an emote by its ID
/emote [name]      Alias
/e c               Cancel the current emote
/cancel_emote      Cancel (X key by default)
```

***

### Categories

The menu is organized in tabs. Each category can be disabled in the config:

| Category    | Description                  | Config key                      |
| ----------- | ---------------------------- | ------------------------------- |
| Emotes      | General animations           | `Config.Categories.Emotes`      |
| Dances      | Dance animations             | `Config.Categories.Dances`      |
| Props       | Emotes with attached objects | `Config.Categories.Props`       |
| Expressions | Facial expressions           | `Config.Categories.Expressions` |
| Walks       | Walk styles                  | `Config.Categories.Walks`       |
| Shared      | Two-player emotes            | `Config.Categories.Shared`      |
| Animals     | Animal emotes                | `Config.Categories.Animal`      |
| History     | Recently played emotes       | `Config.Categories.History`     |
| Playlists   | Saved emote sequences        | `Config.Categories.Playlists`   |

***

### Preview

When you hover over an emote in the menu, a clone of your character appears on screen and plays the animation as a live preview.

For shared emotes, a partner ped is also spawned to preview both sides of the animation.

```lua
Config.Preview = {
    Enabled = true,
    PartnerModel = "a_m_m_business_01",  -- Model used for the partner preview
}
```

***

### Right-click context menu

Right-clicking any emote in the menu opens a context menu with:

* **Play** the emote
* **Add to favorites**
* **Bind to numpad slot** (0-9) -- also appears in the emote wheel
* **3D Placement** -- position the emote in the world with a gizmo

***

### Config reference

```lua
Config.Menu = {
    OpenCommand = "emote_menu",
    OpenKey = "M",
    OpenLabel = "Open emote menu",

    PlayCommand = {"e", "emote"},
    CancelCommand = "cancel_emote",
    CancelKey = "X",
    CancelLabel = "Cancel current emote",

    AllowMovement = true,
    BlockedControls = {1, 2, 3, 4, 5, 6, 18, 24, 25, 37, ...},
}
```
