Files
Basalt2/docs/index.html
github-actions[bot] 8e23fece01 Update documentation
2025-02-09 15:27:10 +00:00

390 lines
8.6 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Basalt2 Documentation</title>
<link rel="stylesheet" href="ldoc_pale.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Basalt2</h1>
<h2>Contents</h2>
<ul>
<li><a href="#Class_Basalt">Class Basalt </a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><strong>basalt</strong></li>
</ul>
</div>
<div id="content">
<h1>Module <code>basalt</code></h1>
<p>Basalt UI Framework main module.</p>
<p> This is the main entry point for the Basalt UI Framework.
It provides functions for creating and managing UI elements and handling events.</p>
<h3>See also:</h3>
<ul>
</ul>
<h3>Usage:</h3>
<ul>
<pre class="example">local basalt = require(&quot;basalt&quot;)
local mainFrame = basalt.createFrame()
mainFrame:show()
basalt.run()
</pre>
</ul>
<h3>Info:</h3>
<ul>
<li><strong>Copyright</strong>: 2025</li>
<li><strong>Release</strong>: 2.0</li>
<li><strong>License</strong>: MIT</li>
<li><strong>Author</strong>: NyoriE</li>
</ul>
<h2><a href="#Class_Basalt">Class Basalt </a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#basalt:create">basalt:create(type[, id])</a></td>
<td class="summary">Creates a new UI element
Creates and returns a new UI element of the specified type</td>
</tr>
<tr>
<td class="name" ><a href="#basalt:createFrame">basalt:createFrame()</a></td>
<td class="summary">Creates and returns a new frame</td>
</tr>
<tr>
<td class="name" ><a href="#basalt:getElementManager">basalt:getElementManager()</a></td>
<td class="summary">Returns the element manager instance</td>
</tr>
<tr>
<td class="name" ><a href="#basalt:getMainFrame">basalt:getMainFrame()</a></td>
<td class="summary">Gets or creates the main frame</td>
</tr>
<tr>
<td class="name" ><a href="#basalt:removeSchedule">basalt:removeSchedule(id)</a></td>
<td class="summary">Removes a scheduled update</td>
</tr>
<tr>
<td class="name" ><a href="#basalt:run">basalt:run([isActive])</a></td>
<td class="summary">Starts the Basalt runtime</td>
</tr>
<tr>
<td class="name" ><a href="#basalt:scheduleUpdate">basalt:scheduleUpdate(func)</a></td>
<td class="summary">Schedules a function to be updated</td>
</tr>
<tr>
<td class="name" ><a href="#basalt:setActiveFrame">basalt:setActiveFrame(frame)</a></td>
<td class="summary">Sets the active frame</td>
</tr>
<tr>
<td class="name" ><a href="#basalt:stop">basalt:stop()</a></td>
<td class="summary">Stops the Basalt runtime</td>
</tr>
<tr>
<td class="name" ><a href="#basalt:update">basalt:update()</a></td>
<td class="summary">Updates all scheduled functions</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header has-description"><a name="Class_Basalt"></a>Class Basalt </h2>
<div class="section-description">
The main Basalt instance
Contains all core functionality and management functions
</div>
<dl class="function">
<dt>
<a name = "basalt:create"></a>
<strong>basalt:create(type[, id])</strong>
</dt>
<dd>
Creates a new UI element
Creates and returns a new UI element of the specified type
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">type</span>
string The type of element to create (e.g. "Button", "Label", "BaseFrame")
</li>
<li><span class="parameter">id</span>
string Optional unique identifier for the element
(<em>optional</em>)
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
The created element instance
</ol>
<h3>See also:</h3>
<ul>
</ul>
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="keyword">local</span> button = basalt.<span class="function-name">create</span>(<span class="string">"Button"</span>, <span class="string">"myButton"</span>)
button:<span class="function-name">setPosition</span>(<span class="number">5</span>, <span class="number">5</span>)</pre>
</ul>
</dd>
<dt>
<a name = "basalt:createFrame"></a>
<strong>basalt:createFrame()</strong>
</dt>
<dd>
Creates and returns a new frame
<h3>Returns:</h3>
<ol>
table The created frame instance
</ol>
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="keyword">local</span> mainFrame = basalt.<span class="function-name">createFrame</span>()</pre>
</ul>
</dd>
<dt>
<a name = "basalt:getElementManager"></a>
<strong>basalt:getElementManager()</strong>
</dt>
<dd>
Returns the element manager instance
<h3>Returns:</h3>
<ol>
table The element manager
</ol>
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="keyword">local</span> manager = basalt.<span class="function-name">getElementManager</span>()</pre>
</ul>
</dd>
<dt>
<a name = "basalt:getMainFrame"></a>
<strong>basalt:getMainFrame()</strong>
</dt>
<dd>
Gets or creates the main frame
<h3>Returns:</h3>
<ol>
table The main frame instance
</ol>
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="keyword">local</span> frame = basalt.<span class="function-name">getMainFrame</span>()</pre>
</ul>
</dd>
<dt>
<a name = "basalt:removeSchedule"></a>
<strong>basalt:removeSchedule(id)</strong>
</dt>
<dd>
Removes a scheduled update
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">id</span>
number The schedule ID to remove
</li>
</ul>
<h3>Usage:</h3>
<ul>
<pre class="example">basalt.<span class="function-name">removeSchedule</span>(scheduleId)</pre>
</ul>
</dd>
<dt>
<a name = "basalt:run"></a>
<strong>basalt:run([isActive])</strong>
</dt>
<dd>
Starts the Basalt runtime
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">isActive</span>
boolean Whether to start active (default: true)
(<em>optional</em>)
</li>
</ul>
<h3>Usage:</h3>
<ul>
<li><pre class="example">basalt.<span class="function-name">run</span>()</pre></li>
<li><pre class="example">basalt.<span class="function-name">run</span>(<span class="keyword">false</span>)</pre></li>
</ul>
</dd>
<dt>
<a name = "basalt:scheduleUpdate"></a>
<strong>basalt:scheduleUpdate(func)</strong>
</dt>
<dd>
Schedules a function to be updated
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">func</span>
function The function to schedule
</li>
</ul>
<h3>Returns:</h3>
<ol>
number The schedule ID
</ol>
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="keyword">local</span> id = basalt.<span class="function-name">scheduleUpdate</span>(myFunction)</pre>
</ul>
</dd>
<dt>
<a name = "basalt:setActiveFrame"></a>
<strong>basalt:setActiveFrame(frame)</strong>
</dt>
<dd>
Sets the active frame
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">frame</span>
table The frame to set as active
</li>
</ul>
<h3>Returns:</h3>
<ol>
boolean Always returns false
</ol>
<h3>Usage:</h3>
<ul>
<pre class="example">basalt.<span class="function-name">setActiveFrame</span>(myFrame)</pre>
</ul>
</dd>
<dt>
<a name = "basalt:stop"></a>
<strong>basalt:stop()</strong>
</dt>
<dd>
Stops the Basalt runtime
<h3>Usage:</h3>
<ul>
<pre class="example">basalt.<span class="function-name">stop</span>()</pre>
</ul>
</dd>
<dt>
<a name = "basalt:update"></a>
<strong>basalt:update()</strong>
</dt>
<dd>
Updates all scheduled functions
<h3>Usage:</h3>
<ul>
<pre class="example">basalt.<span class="function-name">update</span>()</pre>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2025-02-09 15:27:10 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>