> ## Documentation Index
> Fetch the complete documentation index at: https://docs.borntocraftstudio.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Cursor Menu

> Gaze-controlled interactive menu.

The `BetterHud Cursor Menu` entry displays a visual menu where the player controls a cursor by looking around (pitch/yaw). This allows for free-form layouts that mimic a mouse-driven interface without actual mouse capture.

## interactions

1. **Cursor Control**: Player gaze controls the cursor. Looking right/left moves X, up/down moves Y.
2. **Detection**: The cursor hits buttons defined by X/Y/Width/Height.
3. **Click**: Pressing the confirmation key (default: Shift/Drop) clicks the button.

## Configuration

This entry requires a corresponding BetterHud configuration (Image/Layout/Popup) to render the visuals.
The extension provides `cursor_x` and `cursor_y` variables (0-100) to position the cursor image dynamically.

<ResponseField name="popupId" type="String" default="cursor_menu">
  The ID of the BetterHud popup to display.
</ResponseField>

<ResponseField name="buttons" type="List<Button>">
  Definitions of interactable buttons.
</ResponseField>

<ResponseField name="cursorSensitivity" type="Double" default="1.0">
  Multiplier for cursor movement speed relative to head movement.
</ResponseField>

<ResponseField name="yawRange" type="Double" default="60.0">
  Degrees of horizontal rotation for full screen width.
</ResponseField>

<ResponseField name="pitchRange" type="Double" default="40.0">
  Degrees of vertical rotation for full screen height.
</ResponseField>

<ResponseField name="showCursor" type="Boolean" default="true">
  Whether to calculate/show the cursor (true by default).
</ResponseField>

<ResponseField name="text" type="String">
  Optional title text to display.
</ResponseField>

### Button Definition

<ResponseField name="buttonId" type="String" required>
  Unique ID for the button.
</ResponseField>

<ResponseField name="x" type="Double">
  Center X position (0-100%).
</ResponseField>

<ResponseField name="y" type="Double">
  Center Y position (0-100%).
</ResponseField>

<ResponseField name="width" type="Double">
  Size of the hit area width (percentage).
</ResponseField>

<ResponseField name="height" type="Double">
  Size of the hit area height (percentage).
</ResponseField>

<ResponseField name="text" type="String">
  Display text for the button.
</ResponseField>

<ResponseField name="triggers" type="List<Ref<TriggerableEntry>>">
  Actions to run when clicked.
</ResponseField>

## BetterHud Setup

You must create valid BetterHud `images`, `layouts`, and `popups` that respond to the variables:

* `[cursor_x]`, `[cursor_y]`
* `[hovered_button]` (ID of hovered button)
* `[button_ID_hovered]` (1 if true, 0 if false)

<CodeGroup>
  ```yaml BetterHud Layout theme={null}
  cursor_layout:
    images:
      1:
        name: cursor_icon
        gui:
          x: "[cursor_x]"
          y: "[cursor_y]"
        conditions:
          - condition: "[hovered_button] != ''"
            image: cursor_hover_icon
  ```
</CodeGroup>
