Files
Basalt2/docs/.vitepress/dist/assets/references_elements_Menu.md.Bu8HagrJ.js
2025-09-16 17:41:40 +02:00

2 lines
3.5 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{_ as t,a,b as s,ag as i}from"./chunks/framework.BcrMLAmg.js";const c=JSON.parse('{"title":"Menu","description":"","frontmatter":{},"headers":[],"relativePath":"references/elements/Menu.md","filePath":"references/elements/Menu.md","lastUpdated":1757844696000}'),r={name:"references/elements/Menu.md"};function n(h,e,l,o,d,u){return s(),a("div",null,e[0]||(e[0]=[i('<h1 id="menu" tabindex="-1">Menu <a class="header-anchor" href="#menu" aria-label="Permalink to &quot;Menu&quot;"></a></h1><p><em>This is the menu class. It provides a horizontal menu bar with selectable items.</em><em>Menu items are displayed in a single row and can have custom colors and callbacks.</em></p><p>Extends: <code>List</code></p><h2 id="properties" tabindex="-1">Properties <a class="header-anchor" href="#properties" aria-label="Permalink to &quot;Properties&quot;"></a></h2><table tabindex="0"><thead><tr><th>Property</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>separatorColor</td><td>color</td><td>gray</td><td>The color used for separator items in the menu</td></tr></tbody></table><h2 id="functions" tabindex="-1">Functions <a class="header-anchor" href="#functions" aria-label="Permalink to &quot;Functions&quot;"></a></h2><table tabindex="0"><thead><tr><th>Method</th><th>Returns</th><th>Description</th></tr></thead><tbody><tr><td><a href="#menu-setitems-items">Menu:setItems</a></td><td>Menu</td><td>Sets the menu items and calculates total width</td></tr></tbody></table><h2 id="menu-setitems-items" tabindex="-1">Menu:setItems(items) <a class="header-anchor" href="#menu-setitems-items" aria-label="Permalink to &quot;Menu:setItems(items)&quot;"></a></h2><p>Sets the menu items</p><h3 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to &quot;Parameters&quot;"></a></h3><ul><li><code>items</code> <code>table</code> [] List of items with {text, separator, callback, foreground, background} properties</li></ul><h3 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to &quot;Returns&quot;"></a></h3><ul><li><code>Menu</code> <code>self</code> The Menu instance</li></ul><h3 id="usage" tabindex="-1">Usage <a class="header-anchor" href="#usage" aria-label="Permalink to &quot;Usage&quot;"></a></h3><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">menu</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">setItems</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({{text</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;File&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}, {separator</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}, {text</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Edit&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}})</span></span></code></pre></div>',15)]))}const m=t(r,[["render",n]]);export{c as __pageData,m as default};