# Configuring reserved button

<figure><img src="/files/ZjtcXHKygWMfs44Az9Jy" alt="" width="563"><figcaption><p>The third button on the left is "reserved button".</p></figcaption></figure>

Filters API has a third button for all tabs. Usually, it can be used to open the options menu.

{% hint style="info" %}
The core of the button is `onPress`, the shows of the button depend on whether `onPress` is `null`.
{% endhint %}

Call `FilterBuilder.setReservedButton(ItemGroup, Text, PressAction)` to add the "Reserved button".

```java
FilterBuilder.setReservedButton(CREATIVE_MODE_TAB, new TranslatableText("tooltip.modid.options"), button -> foo());
```

{% hint style="warning" %}
Icon UV is not available in 1.20.6 or above.
{% endhint %}

By default, the icon of the button is the icon that the showcase image above shows. If you want the customized icon, call `FilterBuilder.setReservedButton(ItemGroup, Text, PressAction, Identifier, int, int)`

```java
FilterBuilder.setReservedButton(CREATIVE_MODE_TAB, new TranslatableText("tooltip.modid.options"), button -> foo(), ICONS, 16, 0);
```

## See also

{% embed url="<https://maven.ziyuesinicization.site/javadoc/releases/ziyue/filters/raw/ziyue/filters/FilterBuilder.html#setReservedButton(net.minecraft.item.ItemGroup,net.minecraft.text.Text,net.minecraft.client.gui.widget.ButtonWidget.PressAction)>" %}
The javadoc (1.16\~1.19.4)
{% endembed %}


---

# Agent Instructions: 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:

```
GET https://gitbook.ziyuesinicization.site/filters-api/advanced/configuring-reserved-button.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
