> For the complete documentation index, see [llms.txt](https://scripting.breeze.rip/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scripting.breeze.rip/api/functions/hudmanager.onbackground.md).

# hudManager.onBackground

> **onBackground**(`onBackground`): `void`

Register a callback that runs when background rects are collected.

### Parameters

#### onBackground

`Function`

Function that will provide background for this HUD element.

### Returns

`void`

### Example

```ts
hudManager.onBackground(() => {
    return [new ScriptRoundedRect(hudManager.x, hudManager.y, 100, 20, 3 * hudManager.scale)];
 });
```
