mirror of
https://github.com/Insality/druid
synced 2025-06-27 10:27:48 +02:00
Update docs
This commit is contained in:
parent
77e56e8747
commit
847bee2e6b
@ -49,8 +49,10 @@
|
||||
<li><a href="modules/CheckboxGroup.html">CheckboxGroup</a></li>
|
||||
<li><a href="modules/DataList.html">DataList</a></li>
|
||||
<li><a href="modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="modules/Input.html">Input</a></li>
|
||||
<li><a href="modules/LangText.html">LangText</a></li>
|
||||
<li><a href="modules/Layout.html">Layout</a></li>
|
||||
<li><a href="modules/Progress.html">Progress</a></li>
|
||||
<li><a href="modules/RadioGroup.html">RadioGroup</a></li>
|
||||
<li><a href="modules/Slider.html">Slider</a></li>
|
||||
@ -140,6 +142,10 @@
|
||||
<td class="name" nowrap><a href="modules/DynamicGrid.html">DynamicGrid</a></td>
|
||||
<td class="summary">Component to handle placing components in row</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/Hotkey.html">Hotkey</a></td>
|
||||
<td class="summary">Druid hotkey component</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/Input.html">Input</a></td>
|
||||
<td class="summary">Druid input text component.</td>
|
||||
@ -149,6 +155,10 @@
|
||||
<td class="summary">Component to handle all GUI texts
|
||||
Good working with localization system</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/Layout.html">Layout</a></td>
|
||||
<td class="summary">Layout management on node</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/Progress.html">Progress</a></td>
|
||||
<td class="summary">Basic progress bar component.</td>
|
||||
|
@ -51,9 +51,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
|
@ -51,9 +51,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
@ -136,7 +138,7 @@
|
||||
<td class="summary">Set component input state.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#set_input_priority">set_input_priority(self, value)</a></td>
|
||||
<td class="name" nowrap><a href="#set_input_priority">set_input_priority(self, value, is_temporary)</a></td>
|
||||
<td class="summary">Set component input priority</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -563,7 +565,7 @@
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "set_input_priority"></a>
|
||||
<strong>set_input_priority(self, value)</strong>
|
||||
<strong>set_input_priority(self, value, is_temporary)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set component input priority
|
||||
@ -579,6 +581,10 @@
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
The new input priority value
|
||||
</li>
|
||||
<li><span class="parameter">is_temporary</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
If true, the reset input priority will return to previous value
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
|
@ -51,9 +51,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
|
@ -52,9 +52,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
|
@ -52,9 +52,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
|
@ -51,9 +51,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
|
@ -51,9 +51,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
|
@ -52,9 +52,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
@ -87,9 +89,17 @@
|
||||
<td class="summary">Drag component constructor</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#is_enabled">is_enabled(self)</a></td>
|
||||
<td class="summary">Check if Drag component is enabled</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#set_click_zone">set_click_zone(self, node)</a></td>
|
||||
<td class="summary">Strict drag click area.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#set_enabled">set_enabled(self, is_enabled)</a></td>
|
||||
<td class="summary">Set Drag input enabled or disabled</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a href="#Tables">Tables</a></h2>
|
||||
<table class="function_list">
|
||||
@ -118,11 +128,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#on_drag">on_drag</a></td>
|
||||
<td class="summary">on drag progress callback(self, dx, dy)</td>
|
||||
<td class="summary">on drag progress callback(self, dx, dy, total_x, total_y)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#on_drag_end">on_drag_end</a></td>
|
||||
<td class="summary">Event on drag end callback(self)</td>
|
||||
<td class="summary">Event on drag end callback(self, total_x, total_y)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#on_drag_start">on_drag_start</a></td>
|
||||
@ -185,6 +195,33 @@
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "is_enabled"></a>
|
||||
<strong>is_enabled(self)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Check if Drag component is enabled
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Drag</span></span>
|
||||
<a href="../modules/Drag.html#">Drag</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">bool</span></span>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "set_click_zone"></a>
|
||||
@ -211,6 +248,31 @@
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "set_enabled"></a>
|
||||
<strong>set_enabled(self, is_enabled)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set Drag input enabled or disabled
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Drag</span></span>
|
||||
<a href="../modules/Drag.html#">Drag</a>
|
||||
</li>
|
||||
<li><span class="parameter">is_enabled</span>
|
||||
<span class="types"><span class="type">bool</span></span>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
|
||||
@ -329,7 +391,7 @@
|
||||
<strong>on_drag</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
on drag progress callback(self, dx, dy)
|
||||
on drag progress callback(self, dx, dy, total_x, total_y)
|
||||
|
||||
|
||||
<ul>
|
||||
@ -349,7 +411,7 @@
|
||||
<strong>on_drag_end</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Event on drag end callback(self)
|
||||
Event on drag end callback(self, total_x, total_y)
|
||||
|
||||
|
||||
<ul>
|
||||
|
@ -50,9 +50,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
|
@ -50,9 +50,11 @@
|
||||
<li><strong>DruidInstance</strong></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
@ -100,6 +102,8 @@
|
||||
<li><a href="../modules/Drag.html#">Drag</a></li>
|
||||
<li><a href="../modules/DataList.html#">DataList</a></li>
|
||||
<li><a href="../modules/Hover.html#">Hover</a></li>
|
||||
<li><a href="../modules/Layout.html#">Layout</a></li>
|
||||
<li><a href="../modules/Hotkey.html#">Hotkey</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@ -153,6 +157,10 @@
|
||||
<td class="name" nowrap><a href="#new_grid">new_grid(self, parent, element[, in_row=1])</a></td>
|
||||
<td class="summary">Create grid basic component
|
||||
Deprecated</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#new_hotkey">new_hotkey(self, keys_array, callback[, params])</a></td>
|
||||
<td class="summary">Create hotkey component</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#new_hover">new_hover(self, node, on_hover_callback)</a></td>
|
||||
@ -167,6 +175,10 @@
|
||||
<td class="summary">Create lang_text component</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#new_layout">new_layout(self, node, mode)</a></td>
|
||||
<td class="summary">Create layout component</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#new_progress">new_progress(self, node, key[, init_value=1])</a></td>
|
||||
<td class="summary">Create progress component</td>
|
||||
</tr>
|
||||
@ -658,6 +670,46 @@
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "new_hotkey"></a>
|
||||
<strong>new_hotkey(self, keys_array, callback[, params])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Create hotkey component
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">DruidInstance</span></span>
|
||||
|
||||
</li>
|
||||
<li><span class="parameter">keys_array</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string[]</a></span>
|
||||
Keys for trigger action. Should contains one action key and any amount of modificator keys
|
||||
</li>
|
||||
<li><span class="parameter">callback</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
Button callback
|
||||
</li>
|
||||
<li><span class="parameter">params</span>
|
||||
<span class="types"><span class="type">value</span></span>
|
||||
Button callback params
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">Hotkey</span></span>
|
||||
hotkey component
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "new_hover"></a>
|
||||
@ -772,6 +824,41 @@
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "new_layout"></a>
|
||||
<strong>new_layout(self, node, mode)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Create layout component
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">DruidInstance</span></span>
|
||||
|
||||
</li>
|
||||
<li><span class="parameter">node</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">node</span></span>
|
||||
Layout node
|
||||
</li>
|
||||
<li><span class="parameter">mode</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
The layout mode
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">Layout</span></span>
|
||||
layout component
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "new_progress"></a>
|
||||
|
@ -51,9 +51,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><strong>DynamicGrid</strong></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
|
@ -50,9 +50,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><strong>Helper</strong></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
|
314
docs/modules/Hotkey.html
Normal file
314
docs/modules/Hotkey.html
Normal file
@ -0,0 +1,314 @@
|
||||
<!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>Defold Druid UI Library</title>
|
||||
<link rel="stylesheet" href="../ldoc_fixed.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>Druid</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Functions">Functions</a></li>
|
||||
<li><a href="#Tables">Tables</a></li>
|
||||
<li><a href="#Fields">Fields</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/BackHandler.html">BackHandler</a></li>
|
||||
<li><a href="../modules/BaseComponent.html">BaseComponent</a></li>
|
||||
<li><a href="../modules/Blocker.html">Blocker</a></li>
|
||||
<li><a href="../modules/Button.html">Button</a></li>
|
||||
<li><a href="../modules/Checkbox.html">Checkbox</a></li>
|
||||
<li><a href="../modules/CheckboxGroup.html">CheckboxGroup</a></li>
|
||||
<li><a href="../modules/DataList.html">DataList</a></li>
|
||||
<li><a href="../modules/Drag.html">Drag</a></li>
|
||||
<li><a href="../modules/DruidEvent.html">DruidEvent</a></li>
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><strong>Hotkey</strong></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
<li><a href="../modules/RichInput.html">RichInput</a></li>
|
||||
<li><a href="../modules/Scroll.html">Scroll</a></li>
|
||||
<li><a href="../modules/Slider.html">Slider</a></li>
|
||||
<li><a href="../modules/StaticGrid.html">StaticGrid</a></li>
|
||||
<li><a href="../modules/Swipe.html">Swipe</a></li>
|
||||
<li><a href="../modules/Text.html">Text</a></li>
|
||||
<li><a href="../modules/Timer.html">Timer</a></li>
|
||||
<li><a href="../modules/druid.html">druid</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>Hotkey</code></h1>
|
||||
<p>Druid hotkey component</p>
|
||||
<p></p>
|
||||
|
||||
|
||||
<h2><a href="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#add_hotkey">add_hotkey(self, keys[, callback_argument])</a></td>
|
||||
<td class="summary">Add hotkey for component callback</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#init">init(self, keys, callback[, callback_argument])</a></td>
|
||||
<td class="summary">Component init function</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a href="#Tables">Tables</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#style">style</a></td>
|
||||
<td class="summary">Component style params.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a href="#Fields">Fields</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#button">button</a></td>
|
||||
<td class="summary">Button component from click_node</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#click_node">click_node</a></td>
|
||||
<td class="summary">Button trigger node</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#node">node</a></td>
|
||||
<td class="summary">Visual node</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#on_change_state">on_change_state</a></td>
|
||||
<td class="summary">On change state callback(self, state)</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "add_hotkey"></a>
|
||||
<strong>add_hotkey(self, keys[, callback_argument])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Add hotkey for component callback
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Hotkey</span></span>
|
||||
<a href="../modules/Hotkey.html#">Hotkey</a>
|
||||
</li>
|
||||
<li><span class="parameter">keys</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string[]</a>, <span class="type">hash[]</span>, <a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">hash</span></span>
|
||||
that have to be pressed before key pressed to activate
|
||||
</li>
|
||||
<li><span class="parameter">callback_argument</span>
|
||||
<span class="types"><span class="type">value</span></span>
|
||||
The argument to pass into the callback function
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "init"></a>
|
||||
<strong>init(self, keys, callback[, callback_argument])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Component init function
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Hotkey</span></span>
|
||||
<a href="../modules/Hotkey.html#">Hotkey</a>
|
||||
</li>
|
||||
<li><span class="parameter">keys</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string[]</a> or <a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
The keys to be pressed for trigger callback. Should contains one key and any modificator keys
|
||||
</li>
|
||||
<li><span class="parameter">callback</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
The callback function
|
||||
</li>
|
||||
<li><span class="parameter">callback_argument</span>
|
||||
<span class="types"><span class="type">value</span></span>
|
||||
The argument to pass into the callback function
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "style"></a>
|
||||
<strong>style</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Component style params.
|
||||
You can override this component styles params in druid styles table
|
||||
or create your own style
|
||||
|
||||
|
||||
<h3>Fields:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">MODIFICATORS</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string[]</a></span>
|
||||
The list of action_id as hotkey modificators
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "button"></a>
|
||||
<strong>button</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Button component from click_node
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">button</span>
|
||||
<span class="types"><span class="type">Button</span></span>
|
||||
<a href="../modules/Button.html#">Button</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "click_node"></a>
|
||||
<strong>click_node</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Button trigger node
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">click_node</span>
|
||||
<span class="types"><a class="type" href="../modules/Hotkey.html#node">node</a></span>
|
||||
|
||||
(<em>default</em> node)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "node"></a>
|
||||
<strong>node</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Visual node
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">node</span>
|
||||
<span class="types"><a class="type" href="../modules/Hotkey.html#node">node</a></span>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "on_change_state"></a>
|
||||
<strong>on_change_state</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
On change state callback(self, state)
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">on_change_state</span>
|
||||
<span class="types"><span class="type">DruidEvent</span></span>
|
||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc TESTING</a></i>
|
||||
<i style="float:right;">Last updated 2015-01-01 12:00:00 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
@ -51,9 +51,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><strong>Hover</strong></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
|
@ -52,9 +52,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><strong>Input</strong></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
|
@ -51,9 +51,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><strong>LangText</strong></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
|
91
docs/modules/Layout.html
Normal file
91
docs/modules/Layout.html
Normal file
@ -0,0 +1,91 @@
|
||||
<!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>Defold Druid UI Library</title>
|
||||
<link rel="stylesheet" href="../ldoc_fixed.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>Druid</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/BackHandler.html">BackHandler</a></li>
|
||||
<li><a href="../modules/BaseComponent.html">BaseComponent</a></li>
|
||||
<li><a href="../modules/Blocker.html">Blocker</a></li>
|
||||
<li><a href="../modules/Button.html">Button</a></li>
|
||||
<li><a href="../modules/Checkbox.html">Checkbox</a></li>
|
||||
<li><a href="../modules/CheckboxGroup.html">CheckboxGroup</a></li>
|
||||
<li><a href="../modules/DataList.html">DataList</a></li>
|
||||
<li><a href="../modules/Drag.html">Drag</a></li>
|
||||
<li><a href="../modules/DruidEvent.html">DruidEvent</a></li>
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><strong>Layout</strong></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
<li><a href="../modules/RichInput.html">RichInput</a></li>
|
||||
<li><a href="../modules/Scroll.html">Scroll</a></li>
|
||||
<li><a href="../modules/Slider.html">Slider</a></li>
|
||||
<li><a href="../modules/StaticGrid.html">StaticGrid</a></li>
|
||||
<li><a href="../modules/Swipe.html">Swipe</a></li>
|
||||
<li><a href="../modules/Text.html">Text</a></li>
|
||||
<li><a href="../modules/Timer.html">Timer</a></li>
|
||||
<li><a href="../modules/druid.html">druid</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>Layout</code></h1>
|
||||
<p>Layout management on node</p>
|
||||
<p></p>
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc TESTING</a></i>
|
||||
<i style="float:right;">Last updated 2015-01-01 12:00:00 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
@ -51,9 +51,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><strong>PinKnob</strong></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
|
@ -52,9 +52,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><strong>Progress</strong></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
@ -97,6 +99,10 @@
|
||||
<td class="summary">Component init function</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#set_max_size">set_max_size(self, max_size)</a></td>
|
||||
<td class="summary">Set progress bar max node size</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#set_steps">set_steps(self, steps, callback)</a></td>
|
||||
<td class="summary">Set points on progress bar to fire the callback</td>
|
||||
</tr>
|
||||
@ -251,6 +257,37 @@
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "set_max_size"></a>
|
||||
<strong>set_max_size(self, max_size)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set progress bar max node size
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Progress</span></span>
|
||||
<a href="../modules/Progress.html#">Progress</a>
|
||||
</li>
|
||||
<li><span class="parameter">max_size</span>
|
||||
<span class="types"><span class="type">vector3</span></span>
|
||||
The new node maximum (full) size
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">Progress</span></span>
|
||||
<a href="../modules/Progress.html#">Progress</a>
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "set_steps"></a>
|
||||
|
@ -51,9 +51,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><strong>RadioGroup</strong></li>
|
||||
|
@ -51,9 +51,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
|
@ -52,9 +52,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
|
@ -51,9 +51,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
|
@ -52,9 +52,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
@ -148,7 +150,7 @@
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#anchor">anchor</a></td>
|
||||
<td class="summary">Item anchor</td>
|
||||
<td class="summary">Item anchor [0..1]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#border">border</a></td>
|
||||
@ -194,6 +196,10 @@
|
||||
<td class="name" nowrap><a href="#parent">parent</a></td>
|
||||
<td class="summary">Parent gui node</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#pivot">pivot</a></td>
|
||||
<td class="summary">Item pivot [-0.5..0.5]</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
@ -677,7 +683,7 @@
|
||||
<strong>anchor</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Item anchor
|
||||
Item anchor [0..1]
|
||||
|
||||
|
||||
<ul>
|
||||
@ -911,6 +917,26 @@
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "pivot"></a>
|
||||
<strong>pivot</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Item pivot [-0.5..0.5]
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">pivot</span>
|
||||
<span class="types"><span class="type">vector3</span></span>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
@ -52,9 +52,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
|
@ -52,9 +52,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
|
@ -51,9 +51,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
|
@ -50,9 +50,11 @@
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
|
@ -368,10 +368,12 @@ System Druid component, handle drag actions on node
|
||||
Create drag component with druid: `hover = druid:new_drag(node, drag_callback)`
|
||||
|
||||
### Notes
|
||||
- Drag callback have next params: (self, swipe_side, distance, time)
|
||||
- Drag callback have next params: (self, dx, dy, total_x, total_y)
|
||||
- **self**: Druid self context
|
||||
- **dx**: *number* - delta x position
|
||||
- **dy**: *number* - delta y position
|
||||
- **total_x**: *number* - total delta x position
|
||||
- **total_y**: *number* - total delta y position
|
||||
- In styles, you can point the drag start deadzone. Default value is 10 pixels
|
||||
- Drag correctly process multitouch. You can switch touch_id, while dragging on node with correct _dx_ and _dy_ values (made for correct scrolling)
|
||||
- You can restrict horizontal or vertical dragging by setting `drag.can_x` or `drag.can_y` to _false_ value
|
||||
@ -387,3 +389,56 @@ Create drag component with druid: `hover = druid:new_drag(node, drag_callback)`
|
||||
- _on_drag_ (self, dx, dy) - Event on drag process
|
||||
- _on_drag_end_ (self) - Event on drag end
|
||||
- Drag node zone can be restricted via `drag:set_click_zone(node)`
|
||||
|
||||
|
||||
## Hotkey
|
||||
[Hotkey API here](https://insality.github.io/druid/modules/Hotkey.html)
|
||||
|
||||
### Overview
|
||||
Druid component to handle keyboard hotkeys with key modificators
|
||||
|
||||
### Setup
|
||||
This is extended component. Before use it, you should register it:
|
||||
```
|
||||
local druid = require("druid.druid")
|
||||
local hotkey = require("druid.extended.hotkey")
|
||||
druid.register("hotkey", hotkey)
|
||||
```
|
||||
Create drag component with druid: `hotkey = druid:new_hotkey(keys_array, callback, [callback_argument])`
|
||||
|
||||
### Notes
|
||||
- Hotkey callback is similar with button callback: (self, callback_argument)
|
||||
- **self**: Druid self context
|
||||
- **callback_argument**: *value* - Any value passed at component constructor
|
||||
- In styles, you can point the array of modificator keys. This keys should be pressed with main key to trigger the callback
|
||||
- The keys_arrays should contains one action key and any amount of modificator keys
|
||||
- You can add additional hotkeys to hotkey component with `hotkey:add_hotkey(keys_array, callback_argument)`
|
||||
|
||||
|
||||
## Layout
|
||||
[Layout API here](https://insality.github.io/druid/modules/Layout.html)
|
||||
|
||||
### Overview
|
||||
Component to handle node size depends on layout mode. Unlike from Defold Adjust modes, you able to select node stretch by one size or zoom by minimum or maximum side
|
||||
|
||||
### Setup
|
||||
This is extended component. Before use it, you should register it:
|
||||
```
|
||||
local druid = require("druid.druid")
|
||||
local layout = require("druid.extended.layout")
|
||||
druid.register("layout", layout)
|
||||
```
|
||||
Create drag component with druid: `layout = druid:new_layout(node, layout_mode, on_size_change_callback)`
|
||||
|
||||
|
||||
### Notes
|
||||
- Layout mode can be next:
|
||||
- `const.LAYOUT_MODE.STRETCH_X` - Stretch node only by X
|
||||
- `const.LAYOUT_MODE.STRETCH_Y` - Stretch node only by Y
|
||||
- `const.LAYOUT_MODE.ZOOM_MIN` - Zoom node by minimal stretch multiplier
|
||||
- `const.LAYOUT_MODE.ZOOM_MAX` - Zoom node by maximum stretch multiplier
|
||||
- `const.LAYOUT_MODE.FIT` - Usual Defold Fit mode
|
||||
- `const.LAYOUT_MODE.STRETCH` - Usual Defold Stretch Mode
|
||||
- The Layout component will change the node size property. So it's able to increase size of 9patch nodes without scaling issue
|
||||
- The Layout works even inside parent node with Fit adjust mode
|
||||
|
||||
|
@ -85,6 +85,9 @@ function Component:on_language_change() end
|
||||
-- [OPTIONAL] Call if game layout has changed and need to restore values in component
|
||||
function Component:on_layout_change() end
|
||||
|
||||
-- [OPTIONAL] Call if game window size is changed
|
||||
function Component:on_window_resized() end
|
||||
|
||||
-- [OPTIONAL] Call, if input was capturing before this component
|
||||
-- Example: scroll is start scrolling, so you need unhover button
|
||||
function Component:on_input_interrupt() end
|
||||
|
@ -149,8 +149,9 @@ function druid__base_component.set_input_enabled(self, state) end
|
||||
--- Set component input priority
|
||||
---@param self druid.base_component @{BaseComponent}
|
||||
---@param value number The new input priority value
|
||||
---@param is_temporary boolean If true, the reset input priority will return to previous value
|
||||
---@return number The component input priority
|
||||
function druid__base_component.set_input_priority(self, value) end
|
||||
function druid__base_component.set_input_priority(self, value, is_temporary) end
|
||||
|
||||
--- Set current component nodes (protected)
|
||||
---@protected
|
||||
@ -387,8 +388,8 @@ function druid__data_list.set_data(self, data) end
|
||||
---@field can_y bool Is drag component process horizontal.
|
||||
---@field is_drag bool Is component now dragging
|
||||
---@field is_touch bool Is component now touching
|
||||
---@field on_drag druid.event on drag progress callback(self, dx, dy)
|
||||
---@field on_drag_end druid.event Event on drag end callback(self)
|
||||
---@field on_drag druid.event on drag progress callback(self, dx, dy, total_x, total_y)
|
||||
---@field on_drag_end druid.event Event on drag end callback(self, total_x, total_y)
|
||||
---@field on_drag_start druid.event Event on drag start callback(self)
|
||||
---@field on_touch_end druid.event Event on touch end callback(self)
|
||||
---@field on_touch_start druid.event Event on touch start callback(self)
|
||||
@ -404,12 +405,22 @@ local druid__drag = {}
|
||||
---@param on_drag_callback function Callback for on_drag_event(self, dx, dy)
|
||||
function druid__drag.init(self, node, on_drag_callback) end
|
||||
|
||||
--- Check if Drag component is enabled
|
||||
---@param self druid.drag @{Drag}
|
||||
---@return bool
|
||||
function druid__drag.is_enabled(self) end
|
||||
|
||||
--- Strict drag click area.
|
||||
--- Useful for restrict events outside stencil node
|
||||
---@param self druid.drag @{Drag}
|
||||
---@param node node Gui node
|
||||
function druid__drag.set_click_zone(self, node) end
|
||||
|
||||
--- Set Drag input enabled or disabled
|
||||
---@param self druid.drag @{Drag}
|
||||
---@param is_enabled bool
|
||||
function druid__drag.set_enabled(self, is_enabled) end
|
||||
|
||||
|
||||
---@class druid.drag.style
|
||||
---@field DRAG_DEADZONE field Distance in pixels to start dragging
|
||||
@ -551,6 +562,33 @@ local druid__helper = {}
|
||||
function druid__helper.table_to_string(t) end
|
||||
|
||||
|
||||
---@class druid.hotkey : druid.base_component
|
||||
---@field button druid.button Button component from click_node
|
||||
---@field click_node node Button trigger node
|
||||
---@field node node Visual node
|
||||
---@field on_change_state druid.event On change state callback(self, state)
|
||||
---@field style druid.hotkey.style Component style params.
|
||||
local druid__hotkey = {}
|
||||
|
||||
--- Add hotkey for component callback
|
||||
---@param self druid.hotkey @{Hotkey}
|
||||
---@param keys string[]|hash[]|string|hash that have to be pressed before key pressed to activate
|
||||
---@param callback_argument value The argument to pass into the callback function
|
||||
function druid__hotkey.add_hotkey(self, keys, callback_argument) end
|
||||
|
||||
--- Component init function
|
||||
---@param self druid.hotkey @{Hotkey}
|
||||
---@param keys string[]|string The keys to be pressed for trigger callback. Should contains one key and any modificator keys
|
||||
---@param callback function The callback function
|
||||
---@param callback_argument value The argument to pass into the callback function
|
||||
function druid__hotkey.init(self, keys, callback, callback_argument) end
|
||||
|
||||
|
||||
---@class druid.hotkey.style
|
||||
---@field MODIFICATORS field The list of action_id as hotkey modificators
|
||||
local druid__hotkey__style = {}
|
||||
|
||||
|
||||
---@class druid.hover : druid.base_component
|
||||
---@field on_hover druid.event On hover callback(self, state)
|
||||
---@field on_mouse_hover druid.event On mouse hover callback(self, state)
|
||||
@ -766,6 +804,12 @@ function druid__progress.get(self) end
|
||||
---@param init_value number Initial value of progress bar
|
||||
function druid__progress.init(self, node, key, init_value) end
|
||||
|
||||
--- Set progress bar max node size
|
||||
---@param self druid.progress @{Progress}
|
||||
---@param max_size vector3 The new node maximum (full) size
|
||||
---@return druid.progress @{Progress}
|
||||
function druid__progress.set_max_size(self, max_size) end
|
||||
|
||||
--- Set points on progress bar to fire the callback
|
||||
---@param self druid.progress @{Progress}
|
||||
---@param steps number[] Array of progress bar values
|
||||
@ -1009,7 +1053,7 @@ function druid__slider.set_steps(self, steps) end
|
||||
|
||||
|
||||
---@class druid.static_grid : druid.base_component
|
||||
---@field anchor vector3 Item anchor
|
||||
---@field anchor vector3 Item anchor [0..1]
|
||||
---@field border vector4 The size of item content
|
||||
---@field first_index number The first index of node in grid
|
||||
---@field last_index number The last index of node in grid
|
||||
@ -1021,6 +1065,7 @@ function druid__slider.set_steps(self, steps) end
|
||||
---@field on_remove_item druid.event On item remove callback(self, index)
|
||||
---@field on_update_positions druid.event On update item positions callback(self)
|
||||
---@field parent node Parent gui node
|
||||
---@field pivot vector3 Item pivot [-0.5..0.5]
|
||||
---@field style druid.static_grid.style Component style params.
|
||||
local druid__static_grid = {}
|
||||
|
||||
@ -1365,6 +1410,14 @@ function druid_instance.new_dynamic_grid(self, parent) end
|
||||
---@return druid.static_grid grid component
|
||||
function druid_instance.new_grid(self, parent, element, in_row) end
|
||||
|
||||
--- Create hotkey component
|
||||
---@param self druid_instance
|
||||
---@param keys_array string|string[] Keys for trigger action. Should contains one action key and any amount of modificator keys
|
||||
---@param callback function Button callback
|
||||
---@param params value Button callback params
|
||||
---@return druid.hotkey hotkey component
|
||||
function druid_instance.new_hotkey(self, keys_array, callback, params) end
|
||||
|
||||
--- Create hover basic component
|
||||
---@param self druid_instance
|
||||
---@param node node Gui node
|
||||
@ -1388,6 +1441,13 @@ function druid_instance.new_input(self, click_node, text_node, keyboard_type) en
|
||||
---@return druid.lang_text lang_text component
|
||||
function druid_instance.new_lang_text(self, node, locale_id, no_adjust) end
|
||||
|
||||
--- Create layout component
|
||||
---@param self druid_instance
|
||||
---@param node string|node Layout node
|
||||
---@param mode string The layout mode
|
||||
---@return druid.layout layout component
|
||||
function druid_instance.new_layout(self, node, mode) end
|
||||
|
||||
--- Create progress component
|
||||
---@param self druid_instance
|
||||
---@param node string|node Progress bar fill node or node name
|
||||
|
@ -300,7 +300,7 @@ end
|
||||
|
||||
--- Set Drag input enabled or disabled
|
||||
-- @tparam Drag self @{Drag}
|
||||
-- @tparam bool is enabled
|
||||
-- @tparam bool is_enabled
|
||||
function Drag.set_enabled(self, is_enabled)
|
||||
self._is_disabled = not is_enabled
|
||||
end
|
||||
|
@ -29,6 +29,7 @@ local Hotkey = component.create("hotkey")
|
||||
-- @tparam Hotkey self @{Hotkey}
|
||||
-- @tparam string[]|string keys The keys to be pressed for trigger callback. Should contains one key and any modificator keys
|
||||
-- @tparam function callback The callback function
|
||||
-- @tparam[opt] value callback_argument The argument to pass into the callback function
|
||||
function Hotkey.init(self, keys, callback, callback_argument)
|
||||
self.druid = self:get_druid()
|
||||
|
||||
@ -59,7 +60,8 @@ end
|
||||
|
||||
--- Add hotkey for component callback
|
||||
-- @tparam Hotkey self @{Hotkey}
|
||||
-- @tparam string[]|hash[]|string|hash Keys that have to be pressed before key pressed to activate
|
||||
-- @tparam string[]|hash[]|string|hash keys that have to be pressed before key pressed to activate
|
||||
-- @tparam[opt] value callback_argument The argument to pass into the callback function
|
||||
function Hotkey.add_hotkey(self, keys, callback_argument)
|
||||
keys = keys or {}
|
||||
if type(keys) == "string" then
|
||||
|
@ -13,7 +13,7 @@ local helper = require("druid.helper")
|
||||
local component = require("druid.component")
|
||||
local Event = require("druid.event")
|
||||
|
||||
---@class layout : druid.base_component
|
||||
|
||||
local Layout = component.create("layout")
|
||||
|
||||
|
||||
|
@ -215,7 +215,7 @@ end
|
||||
-- @tparam Progress self @{Progress}
|
||||
-- @tparam vector3 max_size The new node maximum (full) size
|
||||
-- @treturn Progress @{Progress}
|
||||
function Progress:set_max_size(max_size)
|
||||
function Progress.set_max_size(self, max_size)
|
||||
self.max_size = max_size[self.key]
|
||||
self:set_to(self.last_value)
|
||||
return self
|
||||
|
@ -752,10 +752,10 @@ end
|
||||
|
||||
--- Create hotkey component
|
||||
-- @tparam DruidInstance self
|
||||
-- @tparam string|string[] string Keys for trigger action. Should contains one action key and any amount of modificator keys
|
||||
-- @tparam string|string[] keys_array Keys for trigger action. Should contains one action key and any amount of modificator keys
|
||||
-- @tparam function callback Button callback
|
||||
-- @tparam[opt] value params Button callback params
|
||||
-- @treturn Layout layout component
|
||||
-- @treturn Hotkey hotkey component
|
||||
function DruidInstance.new_hotkey(self, keys_array, callback, params)
|
||||
return helper.extended_component("hotkey")
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user