> For the complete documentation index, see [llms.txt](https://docs.myarc.icu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.myarc.icu/en/feature-configuration/tooltips.md).

# Tooltips

Tooltips display floating explanatory text as soon as a player points their crosshair or mouse cursor at an interactive button region. You can present feature descriptions, price requirements, or live personal stats without making the player click the button first.

The text for each tooltip is defined inside the menu's `backend` regions, while overall appearance, font size, and background skins are configured globally in `plugins/ArcMenu/tooltip.yml`.

## Adding tooltip text to interactive regions

Under `backend` in a menu configuration file, add `tooltip` and the optional `update` field to any interactive region to enable its tooltip:

```yaml
backend:
  information-area:
    x: 0
    y: 0
    width: 80
    height: 24
    tooltip:
      - '&fServer Guide'
      - '&7Player: %player_name%'
      - '&eRight-click to view details'
    update: 20
    actions:
      right:
        - 'tell: &aOpened the detailed guide for you.'
```

These two fields accept the following values:

| Field     | Description and valid values                                                                                                                                                                                            |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tooltip` | A single-line string or a multi-line string list (each item renders on its own line). Supports legacy color codes, hex colors, and PlaceholderAPI placeholders.                                                         |
| `update`  | Periodic refresh interval for the tooltip text in game ticks (`20` ticks is roughly 1 second). Accepts a positive integer (such as `20`), or `-1` to disable periodic refreshes. Defaults to `-1`; `0` is not accepted. |

When a player moves their pointer into the region, the tooltip appears automatically with all placeholders parsed; moving out of the region hides it immediately. If multiple interactive regions overlap, the tooltip for whichever region is currently hit is shown.

If a tooltip includes placeholders that change over time (such as a cooldown timer or live balance), set `update` to a positive integer so it refreshes automatically while the player hovers. You can also use `refresh: <region-name>` inside a button action to manually refresh the tooltip of the currently pointed region. To change how a region behaves based on conditions, see [Conditions](/en/menu-configuration/menus/conditions.md).

## Configuring tooltip appearance (`tooltip.yml`)

`plugins/ArcMenu/tooltip.yml` manages tooltip styling across all menus. At the top level, the file is divided into `touch` (for Touch mode) and `mouse` (for Mouse and Vision modes), letting you set distinct font sizes and offsets for each input method.

If you omit the `mouse` section from the file entirely, Mouse mode inherits the complete appearance and skin settings from `touch`.

### Basic properties and solid backgrounds

When no image skin is configured, tooltips render with a translucent solid-color background. Here is a clean solid-background configuration:

```yaml
touch:
  offset: {x: 6, y: 4.27, z: 5}
  anchor: top-left
  wrap: false
  size: 2.989
  line-width: 180
  background: '#D0101010'

mouse:
  offset: {x: 6, y: 4.27, z: 5}
  anchor: top-left
  wrap: false
  size: 4.375
  line-width: 180
  background: '#D0101010'
```

The default configuration generated on first install includes a nine-slice `skin` image background. To switch to the solid-color background above, delete the `skin` section under the corresponding mode.

Each mode supports the following basic fields:

| Field        | Description and valid values                                                                                                                                                                                                                                                     |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `offset`     | Offset of the tooltip relative to the pointed position, with finite numbers `x`, `y`, and `z`. Positive `x` moves right, positive `y` moves up, and positive `z` moves forward toward the player.                                                                                |
| `anchor`     | The corner of the tooltip anchored to "pointed position + offset". Valid values: `top-left`, `top-right`, `bottom-left`, `bottom-right`. Defaults to `bottom-left` when omitted (the bundled configuration sets `top-left`).                                                     |
| `wrap`       | Whether to wrap lines automatically at `line-width`. Accepts boolean `true` or `false`; defaults to `false`.                                                                                                                                                                     |
| `size`       | Text scale of the tooltip. Accepts a number greater than `0`.                                                                                                                                                                                                                    |
| `line-width` | Maximum width of a single line when automatic wrapping is enabled, in text pixels. Accepts an integer greater than `0` (defaults to `180`).                                                                                                                                      |
| `background` | Solid background color used when `skin` is not configured. Accepts a quoted 8-digit hex color `'#AARRGGBB'`. The first two digits (`AA`) control opacity (`00` for fully transparent, `FF` for fully opaque); for example, `'#D0101010'` produces a dark translucent background. |
| `skin`       | Optional nine-slice image background section. When configured, it automatically replaces the solid `background` color.                                                                                                                                                           |

### Alignment anchors and line wrapping

Touch mode uses the crosshair hit point as the alignment origin, while Mouse mode uses the tip of the cursor. The `anchor` setting determines which corner of the tooltip stays pinned to that origin, as well as which directions the box expands toward as text gets longer or adds more lines:

| `anchor` value | Pinned corner       | Expansion direction    |
| -------------- | ------------------- | ---------------------- |
| `top-left`     | Top-left corner     | Expands right and down |
| `top-right`    | Top-right corner    | Expands left and down  |
| `bottom-left`  | Bottom-left corner  | Expands right and up   |
| `bottom-right` | Bottom-right corner | Expands left and up    |

When `wrap` is `false`, each entry in the `tooltip` list stays on its own single line without automatic wrapping; splitting text into a multi-line list is the most direct way to control line breaks yourself. When `wrap` is `true`, lines exceeding `line-width` text pixels wrap automatically. Note that `line-width` is measured in font pixels, which is not the same unit as menu canvas coordinate width.

## Nine-slice image backgrounds (`skin`)

By configuring `skin`, you can draw custom panels and frames for your tooltips using PNG images. ArcMenu uses nine-slice scaling: the four corners keep their original proportions while the four edges and center stretch automatically to fit the width and height of the tooltip text.

Place the following `skin` section under `touch` or `mouse` to enable an image background:

```yaml
touch:
  skin:
    background: /ce/topaz_background.png
    frame: /ce/topaz_frame.png
    border: 8
    padding: {left: 8, right: 8, top: 8, bottom: 8}
    min-size: {width: 24, height: 24}
    size-adjust: {width: 0, height: 0}
    offset: {x: 0, y: 0, z: -0.25}
    scale: {x: 1.0, y: 1.0}
    text-offset: {x: 0, y: 0, z: 0}
```

The example above uses `/ce/topaz_background.png` and `/ce/topaz_frame.png`, which are included on initial installation inside `plugins/ArcMenu/images/ce/`. Image paths follow the exact same rules as regular menu images; see [Images and resource packs](/en/feature-configuration/resource-packs.md) for details.

### Slicing and dimension fields

| Field         | Description and valid values                                                                                                                                                                                 |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `background`  | Required. Path to the base background PNG (such as `/ce/topaz_background.png`).                                                                                                                              |
| `frame`       | Optional. Path to a border PNG layered over the background; when set, its source pixel width and height must match `background` exactly.                                                                     |
| `border`      | Width in pixels preserved on all four edges during nine-slice cutting. Accepts an integer greater than `0` (defaults to `8`). Must be less than half the source image's width and less than half its height. |
| `padding`     | Inner padding between the text and the four edges of the background, with non-negative integers `left`, `right`, `top`, and `bottom` in tooltip text pixels.                                                 |
| `min-size`    | Minimum width and height of the tooltip background, with integers `width` and `height` in tooltip text pixels. Both values must be at least `2 × border + 1`.                                                |
| `size-adjust` | Extra width and height added to or subtracted from the automatically measured dimensions, with integers `width` and `height`. The resulting minimum dimensions must still be at least `2 × border + 1`.      |

Here, `border` is measured in source PNG pixels, whereas `padding`, `min-size`, and `size-adjust` are measured in tooltip text pixels and scale alongside the mode's `size` and the skin's `scale`. For example, with `border: 8`, the source image must be at least `17` pixels wide and high, and `min-size` must also be at least `17` on both axes (the example uses `24` to leave comfortable margins).

### Independent background and text positioning

To fine-tune layering or alignment between the background image and the text independently, use these three fields under `skin`:

| Field         | Subfields     | Description and valid values                                                                                                                                                                  |
| ------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `offset`      | `x`, `y`, `z` | Moves only the image background without moving the tooltip text. `x` and `y` use menu coordinate units; `z` uses depth units (defaults to `z: -0.25` to keep the background behind the text). |
| `scale`       | `x`, `y`      | Horizontal and vertical scale multipliers for the image background. Accepts numbers greater than `0` (both default to `1.0`).                                                                 |
| `text-offset` | `x`, `y`, `z` | Fine-tunes only the tooltip text position without moving the image background. Defaults to `0` on all axes.                                                                                   |

Keep in mind the difference between the mode-level `offset` and `skin.offset`: the mode-level `offset` shifts the entire tooltip (both text and background together), while `skin.offset` shifts only the background layer.

### Fine-tuning nine-slice seams

`skin` also provides optional glyph-stitching adjustments, all measured in tooltip text pixels. The default value of `0` works well for everyday use, and you can adjust them if a custom texture shows hairline seams at a specific scale:

| Field           | Subfields                 | Description and valid values                                                                                               |
| --------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `seam-overlap`  | `x`, `y`                  | Pixel overlap between adjacent nine-slice pieces to eliminate visible seams. Accepts numbers greater than or equal to `0`. |
| `glyph-offset`  | `x`, `y`                  | Overall position offset for the complete set of nine-slice glyphs. Accepts finite numbers.                                 |
| `column-offset` | `left`, `center`, `right` | Fine-tunes the horizontal position of the left, center, and right slice columns individually. Accepts finite numbers.      |
| `row-offset`    | `top`, `center`, `bottom` | Fine-tunes the vertical position of the top, center, and bottom slice rows individually. Accepts finite numbers.           |

## Reloading and applying changes

* If you only edited `tooltip` text or `update` intervals in a menu, or adjusted numeric settings like offsets, font sizes, or padding in `tooltip.yml`, run `/arcmenu reload` to apply the changes.
* If you replaced PNG textures under `skin` or changed the `border` slice width, regenerate the resource pack: when working with a custom-content plugin, run `/arcmenu resources` followed by that plugin's pack command (such as `/ce reload pack`, `/nexo reload pack`, or `/iazip`); for standalone distribution, run `/arcmenu reload all`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.myarc.icu/en/feature-configuration/tooltips.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
