mirror of
https://github.com/Insality/druid
synced 2025-06-27 10:27:48 +02:00
333 lines
8.3 KiB
HTML
333 lines
8.3 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>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>
|
|
</ul>
|
|
|
|
|
|
<h2>Modules</h2>
|
|
<ul class="nowrap">
|
|
<li><a href="../modules/druid.back_handler.html">druid.back_handler</a></li>
|
|
<li><a href="../modules/druid.blocker.html">druid.blocker</a></li>
|
|
<li><a href="../modules/druid.button.html">druid.button</a></li>
|
|
<li><a href="../modules/druid.drag.html">druid.drag</a></li>
|
|
<li><a href="../modules/druid.hover.html">druid.hover</a></li>
|
|
<li><a href="../modules/druid.scroll.html">druid.scroll</a></li>
|
|
<li><a href="../modules/druid.static_grid.html">druid.static_grid</a></li>
|
|
<li><a href="../modules/druid.swipe.html">druid.swipe</a></li>
|
|
<li><a href="../modules/druid.text.html">druid.text</a></li>
|
|
<li><a href="../modules/component.html">component</a></li>
|
|
<li><a href="../modules/druid.html">druid</a></li>
|
|
<li><a href="../modules/druid_event.html">druid_event</a></li>
|
|
<li><a href="../modules/druid.checkbox.html">druid.checkbox</a></li>
|
|
<li><a href="../modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
|
|
<li><a href="../modules/druid.dynamic_grid.html">druid.dynamic_grid</a></li>
|
|
<li><a href="../modules/druid.input.html">druid.input</a></li>
|
|
<li><a href="../modules/druid.lang_text.html">druid.lang_text</a></li>
|
|
<li><a href="../modules/druid.progress.html">druid.progress</a></li>
|
|
<li><a href="../modules/druid.radio_group.html">druid.radio_group</a></li>
|
|
<li><a href="../modules/druid.slider.html">druid.slider</a></li>
|
|
<li><a href="../modules/druid.timer.html">druid.timer</a></li>
|
|
<li><strong>druid.helper</strong></li>
|
|
<li><a href="../modules/druid_instance.html">druid_instance</a></li>
|
|
</ul>
|
|
<h2>Topics</h2>
|
|
<ul class="">
|
|
<li><a href="../topics/01-components.md.html">01-components</a></li>
|
|
<li><a href="../topics/02-creating_custom_components.md.html">Creating custom components</a></li>
|
|
<li><a href="../topics/03-styles.md.html">Styles</a></li>
|
|
<li><a href="../topics/04-druid_assets.md.html">Druid assets</a></li>
|
|
<li><a href="../topics/05-examples.md.html">Examples</a></li>
|
|
<li><a href="../topics/changelog.md.html">Druid 0.3.0:</a></li>
|
|
<li><a href="../topics/faq.md.html">faq</a></li>
|
|
<li><a href="../topics/README.md.html">README</a></li>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div id="content">
|
|
|
|
<h1>Module <code>druid.helper</code></h1>
|
|
<p>Text node or icon node can be nil</p>
|
|
<p>
|
|
|
|
</p>
|
|
|
|
|
|
<h2><a href="#Functions">Functions</a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap><a href="#centrate_text_with_icon">centrate_text_with_icon([text_node][, icon_node], margin)</a></td>
|
|
<td class="summary">Center two nodes.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#centrate_icon_with_text">centrate_icon_with_text([icon_node[, text_node[, margin=0]]])</a></td>
|
|
<td class="summary">Center two nodes.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#is_enabled">is_enabled(node)</a></td>
|
|
<td class="summary">Check if node is enabled in gui hierarchy.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#get_pivot_offset">get_pivot_offset(pivot)</a></td>
|
|
<td class="summary">Get node offset for given gui pivot</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#helper..is_mobile">helper..is_mobile()</a></td>
|
|
<td class="summary">Check if device is mobile (Android or iOS)</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#is_web">is_web()</a></td>
|
|
<td class="summary">Check if device is HTML5</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#get_border">get_border()</a></td>
|
|
<td class="summary">Distance from node to size border</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#deprecated">deprecated(message)</a></td>
|
|
<td class="summary">Show deprecated message.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br/>
|
|
<br/>
|
|
|
|
|
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
|
|
<dl class="function">
|
|
<dt>
|
|
<a name = "centrate_text_with_icon"></a>
|
|
<strong>centrate_text_with_icon([text_node][, icon_node], margin)</strong>
|
|
</dt>
|
|
<dd>
|
|
Center two nodes.
|
|
Nodes will be center around 0 x position
|
|
text_node will be first (at left side)
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">text_node</span>
|
|
<span class="types"><span class="type">text</span></span>
|
|
Gui text node
|
|
(<em>optional</em>)
|
|
</li>
|
|
<li><span class="parameter">icon_node</span>
|
|
<span class="types"><span class="type">box</span></span>
|
|
Gui box node
|
|
(<em>optional</em>)
|
|
</li>
|
|
<li><span class="parameter">margin</span>
|
|
<span class="types"><span class="type">number</span></span>
|
|
Offset between nodes
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "centrate_icon_with_text"></a>
|
|
<strong>centrate_icon_with_text([icon_node[, text_node[, margin=0]]])</strong>
|
|
</dt>
|
|
<dd>
|
|
Center two nodes.
|
|
Nodes will be center around 0 x position
|
|
icon_node will be first (at left side)
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">icon_node</span>
|
|
<span class="types"><span class="type">box</span></span>
|
|
Gui box node
|
|
(<em>optional</em>)
|
|
</li>
|
|
<li><span class="parameter">text_node</span>
|
|
<span class="types"><span class="type">text</span></span>
|
|
Gui text node
|
|
(<em>optional</em>)
|
|
</li>
|
|
<li><span class="parameter">margin</span>
|
|
<span class="types"><span class="type">number</span></span>
|
|
Offset between nodes
|
|
(<em>default</em> 0)
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "is_enabled"></a>
|
|
<strong>is_enabled(node)</strong>
|
|
</dt>
|
|
<dd>
|
|
Check if node is enabled in gui hierarchy.
|
|
Return false, if node or any his parent is disabled
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">node</span>
|
|
<span class="types"><span class="type">node</span></span>
|
|
Gui node
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">bool</span></span>
|
|
Is enabled in hierarchy
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "get_pivot_offset"></a>
|
|
<strong>get_pivot_offset(pivot)</strong>
|
|
</dt>
|
|
<dd>
|
|
Get node offset for given gui pivot
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">pivot</span>
|
|
<span class="types"><span class="type">gui.pivot</span></span>
|
|
The node pivot
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">vector3</span></span>
|
|
Vector offset with [-1..1] values
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "helper..is_mobile"></a>
|
|
<strong>helper..is_mobile()</strong>
|
|
</dt>
|
|
<dd>
|
|
Check if device is mobile (Android or iOS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "is_web"></a>
|
|
<strong>is_web()</strong>
|
|
</dt>
|
|
<dd>
|
|
Check if device is HTML5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "get_border"></a>
|
|
<strong>get_border()</strong>
|
|
</dt>
|
|
<dd>
|
|
Distance from node to size border
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
vector4 (left, top, right, down)
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "deprecated"></a>
|
|
<strong>deprecated(message)</strong>
|
|
</dt>
|
|
<dd>
|
|
Show deprecated message. Once time per message
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">message</span>
|
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
|
|
The deprecated message
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
</div> <!-- id="content" -->
|
|
</div> <!-- id="main" -->
|
|
<div id="about">
|
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
|
<i style="float:right;">Last updated 2020-09-29 23:46:16 </i>
|
|
</div> <!-- id="about" -->
|
|
</div> <!-- id="container" -->
|
|
</body>
|
|
</html>
|