<!DOCTYPE html><htmlclass="default"lang="en"><head><metacharset="utf-8"/><metahttp-equiv="x-ua-compatible"content="IE=edge"/><title>default | pokemon-rogue-battle</title><metaname="description"content="Documentation for pokemon-rogue-battle"/><metaname="viewport"content="width=device-width, initial-scale=1"/><linkrel="stylesheet"href="../assets/style.css"/><linkrel="stylesheet"href="../assets/highlight.css"/><scriptdefersrc="../assets/main.js"></script><scriptasyncsrc="../assets/icons.js"id="tsd-icons-script"></script><scriptasyncsrc="../assets/search.js"id="tsd-search-script"></script><scriptasyncsrc="../assets/navigation.js"id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme=localStorage.getItem("tsd-theme")||"os";document.body.style.display="none";setTimeout(()=>app?app.showPage():document.body.style.removeProperty("display"),500)</script><headerclass="tsd-page-toolbar"><divclass="tsd-toolbar-contents container"><divclass="table-cell"id="tsd-search"data-base=".."><divclass="field"><labelfor="tsd-search-field"class="tsd-widget tsd-toolbar-icon search no-caption"><svgwidth="16"height="16"viewBox="0 0 16 16"fill="none"><usehref="../assets/icons.svg#icon-search"></use></svg></label><inputtype="text"id="tsd-search-field"aria-label="Search"/></div><divclass="field"><divid="tsd-toolbar-links"></div></div><ulclass="results"><liclass="state loading">Preparing search index...</li><liclass="state failure">The search index is not available</li></ul><ahref="../index.html"class="title">pokemon-rogue-battle</a></div><divclass="table-cell"id="tsd-widgets"><ahref="#"class="tsd-widget tsd-toolbar-icon menu no-caption"data-toggle="menu"aria-label="Menu"><svgwidth="16"height="16"viewBox="0 0 16 16"fill="none"><usehref="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><divclass="container container-main"><divclass="col-content"><divclass="tsd-page-title"><ulclass="tsd-breadcrumb"><li><ahref="../index.html">pokemon-rogue-battle</a></li><li><ahref="../modules/ui_settings_abstract_settings_ui_handler.html">ui/settings/abstract-settings-ui-handler</a></li><li><ahref="ui_settings_abstract_settings_ui_handler.default.html">default</a></li></ul><h1>Class default</h1></div><sectionclass="tsd-panel tsd-comment"><divclass="tsd-comment tsd-typography"><p>Abstract class for handling UI elements related to settings.</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">setting</span>: <ahref="../interfaces/system_settings_settings.Setting.html"class="tsd-signature-type tsd-kind-interface">Setting</a></span><divclass="tsd-comment tsd-typography"><p>The setting to activate.</p>
</div><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">boolean</span></h4><p>Whether the setting was successfully activated.</p>
<divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/0a4c12387b5992e1f14f53a0f8e6b493a0390ad0/src/ui/settings/abstract-settings-ui-handler.ts#L296">src/ui/settings/abstract-settings-ui-handler.ts:296</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="clear"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>clear</span><ahref="#clear"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="clear.clear-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">clear</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">void</span><ahref="#clear.clear-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Clear the UI elements and state.</p>
</div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">void</span></h4><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><p>Overrides <ahref="ui_ui_handler.default.html">default</a>.<ahref="ui_ui_handler.default.html#clear">clear</a></p><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/0a4c12387b5992e1f14f53a0f8e6b493a0390ad0/src/ui/settings/abstract-settings-ui-handler.ts#L403">src/ui/settings/abstract-settings-ui-handler.ts:403</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="eraseCursor"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>erase<wbr/>Cursor</span><ahref="#eraseCursor"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="eraseCursor.eraseCursor-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">erase<wbr/>Cursor</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">void</span><ahref="#eraseCursor.eraseCursor-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Erase the cursor from the UI.</p>
</div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">void</span></h4><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/0a4c12387b5992e1f14f53a0f8e6b493a0390ad0/src/ui/settings/abstract-settings-ui-handler.ts#L418">src/ui/settings/abstract-settings-ui-handler.ts:418</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member tsd-is-inherited"><aid="getCursor"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>get<wbr/>Cursor</span><ahref="#getCursor"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures tsd-is-inherited"><liclass="tsd-signature tsd-anchor-link"><aid="getCursor.getCursor-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">get<wbr/>Cursor</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">number</span><ahref="#getCursor.getCursor-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">number</span></h4><asideclass="tsd-sources"><p>Inherited from <ahref="ui_ui_handler.default.html">default</a>.<ahref="ui_ui_handler.default.html#getCursor">getCursor</a></p><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/0a4c12387b5992e1f14f53a0f8e6b493a0390ad0/src/ui/ui-handler.ts#L42">src/ui/ui-handler.ts:42</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member tsd-is-inherited"><aid="getTextColor"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>get<wbr/>Text<wbr/>Color</span><ahref="#getTextColor"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures tsd-is-inherited"><liclass="tsd-signature tsd-anchor-link"><aid="getTextColor.getTextColor-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">get<wbr/>Text<wbr/>Color</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">style</span>, <spanclass="tsd-kind-parameter">shadow</span><spanclass="tsd-signature-symbol">?</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">string</span><ahref="#getTextColor.getTextColor-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">style</span>: <ahref="../enums/ui_text.TextStyle.html"class="tsd-signature-type tsd-kind-enum">TextStyle</a></span></li><li><span><spanclass="tsd-kind-parameter">shadow</span>: <spanclass="tsd-signature-type">boolean</span><spanclass="tsd-signature-symbol"> = false</span></span></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">string</span></h4><asideclass="tsd-sources"><p>Inherited from <ahref="ui_ui_handler.default.html">default</a>.<ahref="ui_ui_handler.default.html#getTextColor">getTextColor</a></p><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/0a4c12387b5992e1f14f53a0f8e6b493a0390ad0/src/ui/ui-handler.ts#L38">src/ui/ui-handler.ts:38</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member tsd-is-inherited"><aid="getUi"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>get<wbr/>Ui</span><ahref="#getUi"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures tsd-is-inherited"><liclass="tsd-s
This method handles navigation through a UI menu, including movement through menu items
and handling special actions like cancellation. Each button press may adjust the cursor
position or the menu scroll, and plays a sound effect if the action was successful.</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">button</span>: <ahref="../enums/enums_buttons.Button.html"class="tsd-signature-type tsd-kind-enum">Button</a></span><divclass="tsd-comment tsd-typography"><p>The button pressed by the user.</p>
</div><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">boolean</span></h4><p><code>true</code> if the action associated with the button was successfully processed, <code>false</code> otherwise.</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">cursor</span>: <spanclass="tsd-signature-type">number</span></span><divclass="tsd-comment tsd-typography"><p>The cursor position to set.</p>
</div><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">boolean</span></h4><p><code>true</code> if the cursor was set successfully.</p>
</div><asideclass="tsd-sources"><p>Inherited from <ahref="ui_ui_handler.default.html">default</a>.<ahref="ui_ui_handler.default.html#setMouseCursorStyle">setMouseCursorStyle</a></p><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/0a4c12387b5992e1f14f53a0f8e6b493a0390ad0/src/ui/ui-handler.ts#L60">src/ui/ui-handler.ts:60</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="setOptionCursor"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>set<wbr/>Option<wbr/>Cursor</span><ahref="#setOptionCursor"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="setOptionCursor.setOptionCursor-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">set<wbr/>Option<wbr/>Cursor</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">settingIndex</span>, <spanclass="tsd-kind-parameter">cursor</span>, <spanclass="tsd-kind-parameter">save</span><spanclass="tsd-signature-symbol">?</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">boolean</span><ahref="#setOptionCursor.setOptionCursor-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Set the option cursor to the specified position.</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">settingIndex</span>: <spanclass="tsd-signature-type">number</span></span><divclass="tsd-comment tsd-typography"><p>The index of the setting.</p>
</div><divclass="tsd-comment tsd-typography"></div></li><li><span><spanclass="tsd-kind-parameter">cursor</span>: <spanclass="tsd-signature-type">number</span></span><divclass="tsd-comment tsd-typography"><p>The cursor position to set.</p>
</div><divclass="tsd-comment tsd-typography"></div></li><li><span><codeclass="tsd-tag">Optional</code><spanclass="tsd-kind-parameter">save</span>: <spanclass="tsd-signature-type">boolean</span></span><divclass="tsd-comment tsd-typography"><p>Whether to save the setting to local storage.</p>
</div><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">boolean</span></h4><p><code>true</code> if the option cursor was set successfully.</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">scrollCursor</span>: <spanclass="tsd-signature-type">number</span></span><divclass="tsd-comment tsd-typography"><p>The scroll cursor position to set.</p>
</div><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">boolean</span></h4><p><code>true</code> if the scroll cursor was set successfully.</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">args</span>: <spanclass="tsd-signature-type">any</span><spanclass="tsd-signature-symbol">[]</span></span><divclass="tsd-comment tsd-typography"><p>Arguments to be passed to the show method.</p>
</div><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">boolean</span></h4><p><code>true</code> if successful.</p>
<divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><p>Overrides <ahref="ui_ui_handler.default.html">default</a>.<ahref="ui_ui_handler.default.html#show">show</a></p><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/0a4c12387b5992e1f14f53a0f8e6b493a0390ad0/src/ui/settings/abstract-settings-ui-handler.ts#L185">src/ui/settings/abstract-settings-ui-handler.ts:185</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="updateBindings"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>update<wbr/>Bindings</span><ahref="#updateBindings"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="updateBindings.updateBindings-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">update<wbr/>Bindings</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">void</span><ahref="#updateBindings.updateBindings-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Update the bindings for the current active device configuration.</p>
</div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">void</span></h4><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/0a4c12387b5992e1f14f53a0f8e6b493a0390ad0/src/ui/settings/abstract-settings-ui-handler.ts#L158">src/ui/settings/abstract-settings-ui-handler.ts:158</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="updateSettingsScroll"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>update<wbr/>Settings<wbr/>Scroll</span><ahref="#updateSettingsScroll"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="updateSettingsScroll.updateSettingsScroll-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">update<wbr/>Settings<wbr/>Scroll</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">void</span><ahref="#updateSettingsScroll.updateSettingsScroll-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Update the scroll position of the settings UI.</p>