mirror of
https://github.com/Insality/druid
synced 2025-06-27 10:27:48 +02:00
177 lines
5.0 KiB
HTML
177 lines
5.0 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 Framework</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="#Fields">Fields</a></li>
|
|
</ul>
|
|
|
|
|
|
<h2>Modules</h2>
|
|
<ul class="nowrap">
|
|
<li><strong>BackHandler</strong></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/Druid.html">Druid</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/RichText.html">RichText</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>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div id="content">
|
|
|
|
<h1>Module <code>BackHandler</code></h1>
|
|
<p>Component with event on back and backspace button.</p>
|
|
<p>
|
|
<b># Overview #</b>
|
|
<p> Back Handler is recommended to put in every game window to close it
|
|
or in main screen to call settings window.
|
|
<p> <b># Notes #</b>
|
|
<p> • Back Handler inheritance <a href="../modules/BaseComponent.html#">BaseComponent</a>, you can use all of its methods in addition to those described here.
|
|
<p> • Back Handler react on release action ACTION_BACK or ACTION_BACKSPACE</p>
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example">local callback = function(self, params) ... end
|
|
|
|
local params = {}
|
|
local back_handler = self.druid:new_back_handler(callback, [params])
|
|
</pre>
|
|
</ul>
|
|
|
|
|
|
<h2><a href="#Fields">Fields</a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap><a href="#on_back">on_back</a></td>
|
|
<td class="summary">The <a href="../modules/DruidEvent.html#">DruidEvent</a> Event on back handler action.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#params">params</a></td>
|
|
<td class="summary">Custom args to pass in the callback</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br/>
|
|
<br/>
|
|
|
|
|
|
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
|
|
|
<dl class="function">
|
|
<dt>
|
|
<a name = "on_back"></a>
|
|
<strong>on_back</strong>
|
|
</dt>
|
|
<dd>
|
|
The <a href="../modules/DruidEvent.html#">DruidEvent</a> Event on back handler action.
|
|
<p> Trigger on input action ACTION_BACK or ACTION_BACKSPACE
|
|
|
|
|
|
<ul>
|
|
<li><span class="parameter">on_back</span>
|
|
<span class="types"><span class="type">DruidEvent</span></span>
|
|
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example"><span class="comment">-- Subscribe additional callbacks:
|
|
</span>back_handler.on_back:subscribe(callback)</pre>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "params"></a>
|
|
<strong>params</strong>
|
|
</dt>
|
|
<dd>
|
|
Custom args to pass in the callback
|
|
|
|
|
|
<ul>
|
|
<li><span class="parameter">params</span>
|
|
<span class="types"><span class="type">any</span> or <span class="type">nil</span></span>
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example"><span class="comment">-- Replace params on runtime:
|
|
</span>back_handler.params = { ... }</pre>
|
|
</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>
|