Druid-Extension/docs/modules/base.button.html
2020-02-05 02:42:36 +03:00

199 lines
5.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>Defold Druid UI Library</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>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/base.back_handler.html">base.back_handler</a></li>
<li><a href="../modules/base.blocker.html">base.blocker</a></li>
<li><strong>base.button</strong></li>
<li><a href="../modules/base.checkbox.html">base.checkbox</a></li>
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
<li><a href="../modules/base.grid.html">base.grid</a></li>
<li><a href="../modules/base.text.html">base.text</a></li>
<li><a href="../modules/base.progress.html">base.progress</a></li>
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
<li><a href="../modules/base.scroll.html">base.scroll</a></li>
<li><a href="../modules/base.slider.html">base.slider</a></li>
<li><a href="../modules/base.text.html">base.text</a></li>
<li><a href="../modules/base.timer.html">base.timer</a></li>
<li><a href="../modules/const.html">const</a></li>
<li><a href="../modules/druid.html">druid</a></li>
<li><a href="../modules/helper.html">helper</a></li>
<li><a href="../modules/helper.animate.html">helper.animate</a></li>
<li><a href="../modules/helper.formats.html">helper.formats</a></li>
<li><a href="../modules/rich.progress_rich.html">rich.progress_rich</a></li>
<li><a href="../modules/component.html">component</a></li>
<li><a href="../modules/settings.html">settings</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>base.button</code></h1>
<p>Component to handle basic GUI button</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#init">init(self, node, callback[, params[, anim_node[, event]]])</a></td>
<td class="summary">Component init function</td>
</tr>
<tr>
<td class="name" nowrap><a href="#disable_animation">disable_animation(self)</a></td>
<td class="summary">Disable all button animations</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_click_zone">set_click_zone(self, zone)</a></td>
<td class="summary">Strict button click area.</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, callback[, params[, anim_node[, event]]])</strong>
</dt>
<dd>
Component init function
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
Component instance
</li>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
Gui node
</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"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
Button callback params
(<em>optional</em>)
</li>
<li><span class="parameter">anim_node</span>
<span class="types"><span class="type">node</span></span>
Button anim node (node, if not provided)
(<em>optional</em>)
</li>
<li><span class="parameter">event</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
Button react event, const.ACTION_TOUCH by default
(<em>optional</em>)
</li>
</ul>
</dd>
<dt>
<a name = "disable_animation"></a>
<strong>disable_animation(self)</strong>
</dt>
<dd>
Disable all button animations
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
Component instance
</li>
</ul>
</dd>
<dt>
<a name = "set_click_zone"></a>
<strong>set_click_zone(self, zone)</strong>
</dt>
<dd>
Strict button click area. Useful for
no click events outside stencil node
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
Component instance
</li>
<li><span class="parameter">zone</span>
<span class="types"><span class="type">node</span></span>
Gui node
</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-02-04 23:46:10 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>