mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 18:37:44 +02:00
295 lines
7.5 KiB
HTML
295 lines
7.5 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>
|
|
<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><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>
|
|
<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><strong>Swipe</strong></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>Swipe</code></h1>
|
|
<p>Component to handle swipe gestures on node.</p>
|
|
<p>
|
|
Swipe will be triggered, if swipe was started and
|
|
ended on one node</p>
|
|
|
|
|
|
<h2><a href="#Functions">Functions</a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap><a href="#init">init(self, node, on_swipe_callback)</a></td>
|
|
<td class="summary">Component init function</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#set_click_zone">set_click_zone(self, zone)</a></td>
|
|
<td class="summary">Strict swipe click area.</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="#click_zone">click_zone</a></td>
|
|
<td class="summary">Restriction zone</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#node">node</a></td>
|
|
<td class="summary">Swipe node</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#on_swipe">on_swipe</a></td>
|
|
<td class="summary">Trigger on swipe event(self, swipe_side, dist, delta_time)</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br/>
|
|
<br/>
|
|
|
|
|
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
|
|
<dl class="function">
|
|
<dt>
|
|
<a name = "init"></a>
|
|
<strong>init(self, node, on_swipe_callback)</strong>
|
|
</dt>
|
|
<dd>
|
|
Component init function
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">self</span>
|
|
<span class="types"><span class="type">Swipe</span></span>
|
|
<a href="../modules/Swipe.html#">Swipe</a>
|
|
</li>
|
|
<li><span class="parameter">node</span>
|
|
<span class="types"><a class="type" href="../modules/Swipe.html#node">node</a></span>
|
|
Gui node
|
|
</li>
|
|
<li><span class="parameter">on_swipe_callback</span>
|
|
<span class="types"><span class="type">function</span></span>
|
|
Swipe callback for on_swipe_end event
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "set_click_zone"></a>
|
|
<strong>set_click_zone(self, zone)</strong>
|
|
</dt>
|
|
<dd>
|
|
Strict swipe click area. Useful for
|
|
restrict events outside stencil node
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">self</span>
|
|
<span class="types"><span class="type">Swipe</span></span>
|
|
<a href="../modules/Swipe.html#">Swipe</a>
|
|
</li>
|
|
<li><span class="parameter">zone</span>
|
|
<span class="types"><a class="type" href="../modules/Swipe.html#node">node</a></span>
|
|
Gui node
|
|
</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">SWIPE_TIME</span>
|
|
<span class="types"><span class="type">number</span></span>
|
|
Maximum time for swipe trigger
|
|
(<em>default</em> 0.4)
|
|
</li>
|
|
<li><span class="parameter">SWIPE_THRESHOLD</span>
|
|
<span class="types"><span class="type">number</span></span>
|
|
Minimum distance for swipe trigger
|
|
(<em>default</em> 50)
|
|
</li>
|
|
<li><span class="parameter">SWIPE_TRIGGER_ON_MOVE</span>
|
|
<span class="types"><span class="type">bool</span></span>
|
|
If true, trigger on swipe moving, not only release action
|
|
(<em>default</em> false)
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
|
|
|
<dl class="function">
|
|
<dt>
|
|
<a name = "click_zone"></a>
|
|
<strong>click_zone</strong>
|
|
</dt>
|
|
<dd>
|
|
Restriction zone
|
|
|
|
|
|
<ul>
|
|
<li><span class="parameter">click_zone</span>
|
|
<span class="types"><a class="type" href="../modules/Swipe.html#node">node</a></span>
|
|
|
|
(<em>optional</em>)
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "node"></a>
|
|
<strong>node</strong>
|
|
</dt>
|
|
<dd>
|
|
Swipe node
|
|
|
|
|
|
<ul>
|
|
<li><span class="parameter">node</span>
|
|
<span class="types"><a class="type" href="../modules/Swipe.html#node">node</a></span>
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "on_swipe"></a>
|
|
<strong>on_swipe</strong>
|
|
</dt>
|
|
<dd>
|
|
Trigger on swipe event(self, swipe_side, dist, delta_time)
|
|
|
|
|
|
<ul>
|
|
<li><span class="parameter">on_swipe</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>
|