import{_ as t,a,b as r,ag as d}from"./chunks/framework.BcrMLAmg.js";const p=JSON.parse('{"title":"Slider","description":"","frontmatter":{},"headers":[],"relativePath":"references/elements/Slider.md","filePath":"references/elements/Slider.md","lastUpdated":1757844696000}'),i={name:"references/elements/Slider.md"};function s(l,e,o,h,n,u){return r(),a("div",null,e[0]||(e[0]=[d('<h1 id="slider" tabindex="-1">Slider <a class="header-anchor" href="#slider" aria-label="Permalink to &quot;Slider&quot;">​</a></h1><p><em>This is the slider class. It provides a draggable slider control that can be either horizontal or vertical,</em><em>with customizable colors and value ranges.</em></p><p>Extends: <code>VisualElement</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>step</td><td>number</td><td>1</td><td>Current position of the slider handle (1 to width/height)</td></tr><tr><td>max</td><td>number</td><td>100</td><td>Maximum value for value conversion (maps slider position to this range)</td></tr><tr><td>horizontal</td><td>boolean</td><td>true</td><td>Whether the slider is horizontal (false for vertical)</td></tr><tr><td>barColor</td><td>color</td><td>gray</td><td>Color of the slider track</td></tr><tr><td>sliderColor</td><td>color</td><td>blue</td><td>Color of the slider handle</td></tr></tbody></table><h2 id="events" tabindex="-1">Events <a class="header-anchor" href="#events" aria-label="Permalink to &quot;Events&quot;">​</a></h2><table tabindex="0"><thead><tr><th>Event</th><th>Parameters</th><th>Description</th></tr></thead><tbody><tr><td>onChange</td><td><code>value number</code></td><td>Fired when the slider value changes</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="#slider-getvalue">Slider:getValue</a></td><td>number</td><td>Gets the current value mapped to the max range</td></tr></tbody></table><h2 id="slider-getvalue" tabindex="-1">Slider:getValue() <a class="header-anchor" href="#slider-getvalue" aria-label="Permalink to &quot;Slider:getValue()&quot;">​</a></h2><p>Gets the current value of the slider</p><h3 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to &quot;Returns&quot;">​</a></h3><ul><li><code>number</code> <code>value</code> The current value (0 to max)</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:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> value </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> slider</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">getValue</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span></code></pre></div>',15)]))}const b=t(i,[["render",s]]);export{p as __pageData,b as default};
