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

2 lines
3.7 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 e,a as r,b as o,ag as d}from"./chunks/framework.BcrMLAmg.js";const h=JSON.parse('{"title":"Input","description":"","frontmatter":{},"headers":[],"relativePath":"references/elements/Input.md","filePath":"references/elements/Input.md","lastUpdated":1757844696000}'),a={name:"references/elements/Input.md"};function n(i,t,s,l,u,c){return o(),r("div",null,t[0]||(t[0]=[d('<h1 id="input" tabindex="-1">Input <a class="header-anchor" href="#input" aria-label="Permalink to &quot;Input&quot;"></a></h1><p><em>This is the input class. It provides a text input field that can handle user input with various features like</em><em>cursor movement, text manipulation, placeholder text, and input validation.</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>text</td><td>string</td><td>-</td><td>The current text content of the input</td></tr><tr><td>cursorPos</td><td>number</td><td>1</td><td>The current cursor position in the text</td></tr><tr><td>viewOffset</td><td>number</td><td>0</td><td>The horizontal scroll offset for viewing long text</td></tr><tr><td>placeholder</td><td>string</td><td>...</td><td>Text to display when input is empty</td></tr><tr><td>placeholderColor</td><td>color</td><td>gray</td><td>Color of the placeholder text</td></tr><tr><td>focusedBackground</td><td>color</td><td>blue</td><td>Background color when input is focused</td></tr><tr><td>focusedForeground</td><td>color</td><td>white</td><td>Foreground color when input is focused</td></tr><tr><td>cursorColor</td><td>number</td><td>nil</td><td>Color of the cursor</td></tr><tr><td>replaceChar</td><td>string</td><td>nil</td><td>Character to replace the input with (for password fields)</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="#input-setcursor-x-y-blink-color">Input:setCursor</a></td><td>-</td><td>Sets the cursor position and color</td></tr><tr><td><a href="#input-updateviewport">Input:updateViewport</a></td><td>Input</td><td>Updates the input&#39;s viewport</td></tr></tbody></table><h2 id="input-setcursor-x-y-blink-color" tabindex="-1">Input:setCursor(x, y, blink, color) <a class="header-anchor" href="#input-setcursor-x-y-blink-color" aria-label="Permalink to &quot;Input:setCursor(x, y, blink, color)&quot;"></a></h2><p>Sets the cursor position and color</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>x</code> <code>number</code> The x position of the cursor</li><li><code>y</code> <code>number</code> The y position of the cursor</li><li><code>blink</code> <code>boolean</code> Whether the cursor should blink</li><li><code>color</code> <code>number</code> The color of the cursor</li></ul><h2 id="input-updateviewport" tabindex="-1">Input:updateViewport() <a class="header-anchor" href="#input-updateviewport" aria-label="Permalink to &quot;Input:updateViewport()&quot;"></a></h2><p>Updates the input&#39;s viewport</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>Input</code> <code>self</code> The updated instance</li></ul>',15)]))}const f=e(a,[["render",n]]);export{h as __pageData,f as default};