> For the complete documentation index, see [llms.txt](https://xcs-plugin.gitbook.io/cursorcs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xcs-plugin.gitbook.io/cursorcs/guides/how-to-build-your-own-hud.md).

# how to build your own hud

This guide shows how to build a custom HUD with CursorCs using image glyphs from a resource-pack manager.

In this example, we use **ItemsAdder**.

{% stepper %}
{% step %}

### Prerequisite: resource-pack manager

Before building image-based HUDs, install one of these:

* ItemsAdder (used in this tutorial)
* Nexo
* Any equivalent resource-pack pipeline plugin
  {% endstep %}

{% step %}

### Create your image glyph in ItemsAdder

You can render images in CursorCs text by using a font-image placeholder like:

```yaml
text: "%img_5stars%"
```

Where does `%img_5stars%` come from?

From your ItemsAdder font image configuration.

Example file:

`ItemsAdder/contents/cursorcs/configs/genshin/genshin.yml`

```yaml
info:
  namespace: "genshin"

font_images:
  5stars:
    permission: aa
    path: "5stars"
    scale_ratio: 255
    y_position: 0
    show_in_gui: true
```

Image file location:

`ItemsAdder/contents/cursorcs/resourcepack/assets/genshin/textures/5stars.png`
{% endstep %}

{% step %}

### Use the image in a CursorCs hologram

In your hologram config (`plugins/CursorCs/config/holograms/*.yml`):

```yaml
wish_stars:
  text: "%img_5stars%"
  offset_x: 0.0
  offset_y: 1.3
  offset_z: 0.0
  scale: 0.85
  alignment: "CENTER"
  line_width: 300
  billboard: "CENTER"
```

Now your hologram renders the image glyph instead of plain text.
{% endstep %}

{% step %}

### Mixing text, images, items, blocks, and entities

You can combine multiple hologram content styles in one HUD:

#### Text/image glyph

```yaml
title:
  text: "%img_5stars%"
```

#### Item display

```yaml
weapon_icon:
  text: "item:minecraft:diamond_sword"
```

#### Block display

```yaml
frame_block:
  text: "block:minecraft:polished_blackstone"
```

#### Entity display

```yaml
mascot:
  text: "entity:minecraft:wolf"
```

This makes CursorCs suitable for game-like menu HUDs, gacha UIs, shop selectors, and role pickers.
{% endstep %}

{% step %}

### Common pitfalls

* Glyph placeholder appears as raw text: resource pack is not loaded or glyph is misconfigured. (Always use /cursor reload - after any resourcepack reload)
* Image not visible: verify namespace/path and texture file name.
* Hover scale not working: confirm `hologram:` matches the exact hologram key.
* Wrong click zone: re-measure with `/cursor area`.
  {% endstep %}

{% step %}

### Recommended production pattern

1. Build visual holograms in `config/holograms/`.
2. Build interactions in `config/clickable/`.
3. Keep class/state logic in `config/groups/`.
4. Use debug mode for setup, then run in clean production mode.
   {% endstep %}
   {% endstepper %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://xcs-plugin.gitbook.io/cursorcs/guides/how-to-build-your-own-hud.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
