mirror of
https://github.com/Insality/druid
synced 2025-06-27 10:27:48 +02:00
Remove HTML API from this branch
This commit is contained in:
parent
6ccf58d527
commit
0972c53c70
186
docs/index.html
186
docs/index.html
@ -1,186 +0,0 @@
|
|||||||
<!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>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Modules</h2>
|
|
||||||
<ul class="nowrap">
|
|
||||||
<li><a href="modules/BackHandler.html">BackHandler</a></li>
|
|
||||||
<li><a href="modules/Blocker.html">Blocker</a></li>
|
|
||||||
<li><a href="modules/Button.html">Button</a></li>
|
|
||||||
<li><a href="modules/Drag.html">Drag</a></li>
|
|
||||||
<li><a href="modules/Hover.html">Hover</a></li>
|
|
||||||
<li><a href="modules/Scroll.html">Scroll</a></li>
|
|
||||||
<li><a href="modules/StaticGrid.html">StaticGrid</a></li>
|
|
||||||
<li><a href="modules/Text.html">Text</a></li>
|
|
||||||
<li><a href="modules/BaseComponent.html">BaseComponent</a></li>
|
|
||||||
<li><a href="modules/RichInput.html">RichInput</a></li>
|
|
||||||
<li><a href="modules/RichText.html">RichText</a></li>
|
|
||||||
<li><a href="modules/Druid.html">Druid</a></li>
|
|
||||||
<li><a href="modules/DruidEvent.html">DruidEvent</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/Slider.html">Slider</a></li>
|
|
||||||
<li><a href="modules/Swipe.html">Swipe</a></li>
|
|
||||||
<li><a href="modules/Timer.html">Timer</a></li>
|
|
||||||
<li><a href="modules/Helper.html">Helper</a></li>
|
|
||||||
<li><a href="modules/DruidInstance.html">DruidInstance</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Documentation for Druid Framework</h2>
|
|
||||||
|
|
||||||
<h2>Modules</h2>
|
|
||||||
<table class="module_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="modules/BackHandler.html">BackHandler</a></td>
|
|
||||||
<td class="summary">Component with event on back and backspace button.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="modules/Blocker.html">Blocker</a></td>
|
|
||||||
<td class="summary">Component to consume input in special zone defined by GUI node.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="modules/Button.html">Button</a></td>
|
|
||||||
<td class="summary">Druid Component for Handling User Click Interactions: Click, Long Click, Double Click, and More.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="modules/Drag.html">Drag</a></td>
|
|
||||||
<td class="summary">Component to handle drag action on node.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="modules/Hover.html">Hover</a></td>
|
|
||||||
<td class="summary">Component to handle hover node interaction</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="modules/Scroll.html">Scroll</a></td>
|
|
||||||
<td class="summary">Component to handle scroll content.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="modules/StaticGrid.html">StaticGrid</a></td>
|
|
||||||
<td class="summary">Component to handle component's position by row and columns.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="modules/Text.html">Text</a></td>
|
|
||||||
<td class="summary">Component for Wrapping GUI Text Nodes: Druid Text
|
|
||||||
<p> ## Overview ##
|
|
||||||
<p> Druid Text is a component that provides various adjustment modes for text nodes.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="modules/BaseComponent.html">BaseComponent</a></td>
|
|
||||||
<td class="summary">Basic class for all Druid components.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="modules/RichInput.html">RichInput</a></td>
|
|
||||||
<td class="summary">Druid Rich Input custom component.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="modules/RichText.html">RichText</a></td>
|
|
||||||
<td class="summary">Druid Rich Text Custom Component.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="modules/Druid.html">Druid</a></td>
|
|
||||||
<td class="summary">Druid UI Component Framework.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="modules/DruidEvent.html">DruidEvent</a></td>
|
|
||||||
<td class="summary">Druid Event Module
|
|
||||||
<p> The Event module provides a simple class for handling callbacks.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="modules/DataList.html">DataList</a></td>
|
|
||||||
<td class="summary">Component to manage data for huge dataset in scroll.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<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>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="modules/LangText.html">LangText</a></td>
|
|
||||||
<td class="summary">Component to wrap over GUI Text nodes with localization helpers
|
|
||||||
<p> <b># Overview #</b>
|
|
||||||
<p> • The initialization of druid.set_text_function is required to enable localization
|
|
||||||
using the localization ID.</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">Druid component to handle the progress bars.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="modules/Slider.html">Slider</a></td>
|
|
||||||
<td class="summary">Druid slider component</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="modules/Swipe.html">Swipe</a></td>
|
|
||||||
<td class="summary">Component to handle swipe gestures on node.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="modules/Timer.html">Timer</a></td>
|
|
||||||
<td class="summary">Component to handle GUI timers.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="modules/Helper.html">Helper</a></td>
|
|
||||||
<td class="summary">Helper module with various usefull GUI functions.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="modules/DruidInstance.html">DruidInstance</a></td>
|
|
||||||
<td class="summary">Druid Instance which you use for component creation.</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</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>
|
|
@ -1,311 +0,0 @@
|
|||||||
/* BEGIN RESET
|
|
||||||
|
|
||||||
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
|
|
||||||
Code licensed under the BSD License:
|
|
||||||
http://developer.yahoo.com/yui/license.html
|
|
||||||
version: 2.8.2r1
|
|
||||||
*/
|
|
||||||
html {
|
|
||||||
color: #000;
|
|
||||||
background: #FFF;
|
|
||||||
}
|
|
||||||
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
table {
|
|
||||||
border-collapse: collapse;
|
|
||||||
border-spacing: 0;
|
|
||||||
}
|
|
||||||
fieldset,img {
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
address,caption,cite,code,dfn,em,strong,th,var,optgroup {
|
|
||||||
font-style: inherit;
|
|
||||||
font-weight: inherit;
|
|
||||||
}
|
|
||||||
del,ins {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
li {
|
|
||||||
margin-left: 20px;
|
|
||||||
}
|
|
||||||
caption,th {
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
h1,h2,h3,h4,h5,h6 {
|
|
||||||
font-size: 100%;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
q:before,q:after {
|
|
||||||
content: '';
|
|
||||||
}
|
|
||||||
abbr,acronym {
|
|
||||||
border: 0;
|
|
||||||
font-variant: normal;
|
|
||||||
}
|
|
||||||
sup {
|
|
||||||
vertical-align: baseline;
|
|
||||||
}
|
|
||||||
sub {
|
|
||||||
vertical-align: baseline;
|
|
||||||
}
|
|
||||||
legend {
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
input,button,textarea,select,optgroup,option {
|
|
||||||
font-family: inherit;
|
|
||||||
font-size: inherit;
|
|
||||||
font-style: inherit;
|
|
||||||
font-weight: inherit;
|
|
||||||
}
|
|
||||||
input,button,textarea,select {*font-size:100%;
|
|
||||||
}
|
|
||||||
/* END RESET */
|
|
||||||
|
|
||||||
body {
|
|
||||||
margin-left: 1em;
|
|
||||||
margin-right: 1em;
|
|
||||||
font-family: arial, helvetica, geneva, sans-serif;
|
|
||||||
background-color: #ffffff; margin: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
code, tt { font-family: monospace; font-size: 1.1em; }
|
|
||||||
span.parameter { font-family:monospace; }
|
|
||||||
span.parameter:after { content:":"; }
|
|
||||||
span.types:before { content:"("; }
|
|
||||||
span.types:after { content:")"; }
|
|
||||||
.type { font-weight: bold; font-style:italic }
|
|
||||||
|
|
||||||
body, p, td, th { font-size: .95em; line-height: 1.2em;}
|
|
||||||
|
|
||||||
p, ul { margin: 10px 0 0 0px;}
|
|
||||||
|
|
||||||
strong { font-weight: bold;}
|
|
||||||
|
|
||||||
em { font-style: italic;}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: 1.5em;
|
|
||||||
margin: 0 0 20px 0;
|
|
||||||
}
|
|
||||||
h2, h3, h4 { margin: 15px 0 10px 0; }
|
|
||||||
h2 { font-size: 1.25em; }
|
|
||||||
h3 { font-size: 1.15em; }
|
|
||||||
h4 { font-size: 1.06em; }
|
|
||||||
|
|
||||||
a:link { font-weight: bold; color: #004080; text-decoration: none; }
|
|
||||||
a:visited { font-weight: bold; color: #006699; text-decoration: none; }
|
|
||||||
a:link:hover { text-decoration: underline; }
|
|
||||||
|
|
||||||
hr {
|
|
||||||
color:#cccccc;
|
|
||||||
background: #00007f;
|
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote { margin-left: 3em; }
|
|
||||||
|
|
||||||
ul { list-style-type: disc; }
|
|
||||||
|
|
||||||
p.name {
|
|
||||||
font-family: "Andale Mono", monospace;
|
|
||||||
padding-top: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre {
|
|
||||||
background-color: rgb(245, 245, 245);
|
|
||||||
border: 1px solid #C0C0C0; /* silver */
|
|
||||||
padding: 10px;
|
|
||||||
margin: 10px 0 10px 0;
|
|
||||||
overflow: auto;
|
|
||||||
font-family: "Andale Mono", monospace;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre.example {
|
|
||||||
font-size: .85em;
|
|
||||||
}
|
|
||||||
|
|
||||||
table.index { border: 1px #00007f; }
|
|
||||||
table.index td { text-align: left; vertical-align: top; }
|
|
||||||
|
|
||||||
#container {
|
|
||||||
margin-left: 1em;
|
|
||||||
margin-right: 1em;
|
|
||||||
background-color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#product {
|
|
||||||
text-align: center;
|
|
||||||
border-bottom: 1px solid #cccccc;
|
|
||||||
background-color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#product big {
|
|
||||||
font-size: 2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
#main {
|
|
||||||
background-color:#FFFFFF; // #f0f0f0;
|
|
||||||
border-left: 1px solid #cccccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
#navigation {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
float: left;
|
|
||||||
width: 14em;
|
|
||||||
vertical-align: top;
|
|
||||||
background-color:#FFFFFF; // #f0f0f0;
|
|
||||||
border-right: 2px solid #cccccc;
|
|
||||||
overflow: visible;
|
|
||||||
overflow-y: scroll;
|
|
||||||
height: 100%;
|
|
||||||
padding-left: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
#navigation h2 {
|
|
||||||
background-color:#FFFFFF;//:#e7e7e7;
|
|
||||||
font-size:1.1em;
|
|
||||||
color:#000000;
|
|
||||||
text-align: left;
|
|
||||||
padding:0.2em;
|
|
||||||
border-bottom:1px solid #dddddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
#navigation ul
|
|
||||||
{
|
|
||||||
font-size:1em;
|
|
||||||
list-style-type: none;
|
|
||||||
margin: 1px 1px 10px 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#navigation li {
|
|
||||||
text-indent: -1em;
|
|
||||||
display: block;
|
|
||||||
margin: 3px 0px 0px 22px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#navigation li li a {
|
|
||||||
margin: 0px 3px 0px -1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
#content {
|
|
||||||
margin-left: 14em;
|
|
||||||
padding: 1em;
|
|
||||||
padding-left: 2em;
|
|
||||||
width: 900px;
|
|
||||||
border-left: 2px solid #cccccc;
|
|
||||||
// border-right: 2px solid #cccccc;
|
|
||||||
background-color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#about {
|
|
||||||
clear: both;
|
|
||||||
padding-left: 1em;
|
|
||||||
margin-left: 14em; // avoid the damn sidebar!
|
|
||||||
border-top: 2px solid #cccccc;
|
|
||||||
border-left: 2px solid #cccccc;
|
|
||||||
background-color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media print {
|
|
||||||
body {
|
|
||||||
font: 12pt "Times New Roman", "TimeNR", Times, serif;
|
|
||||||
}
|
|
||||||
a { font-weight: bold; color: #004080; text-decoration: underline; }
|
|
||||||
|
|
||||||
#main {
|
|
||||||
background-color: #ffffff;
|
|
||||||
border-left: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#container {
|
|
||||||
margin-left: 2%;
|
|
||||||
margin-right: 2%;
|
|
||||||
background-color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#content {
|
|
||||||
padding: 1em;
|
|
||||||
background-color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#navigation {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
pre.example {
|
|
||||||
font-family: "Andale Mono", monospace;
|
|
||||||
font-size: 10pt;
|
|
||||||
page-break-inside: avoid;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
table.module_list {
|
|
||||||
border-width: 1px;
|
|
||||||
border-style: solid;
|
|
||||||
border-color: #cccccc;
|
|
||||||
border-collapse: collapse;
|
|
||||||
}
|
|
||||||
table.module_list td {
|
|
||||||
border-width: 1px;
|
|
||||||
padding: 3px;
|
|
||||||
border-style: solid;
|
|
||||||
border-color: #cccccc;
|
|
||||||
}
|
|
||||||
table.module_list td.name { background-color: #f0f0f0; ; min-width: 200px; }
|
|
||||||
table.module_list td.summary { width: 100%; }
|
|
||||||
|
|
||||||
table.function_list {
|
|
||||||
border-width: 1px;
|
|
||||||
border-style: solid;
|
|
||||||
border-color: #cccccc;
|
|
||||||
border-collapse: collapse;
|
|
||||||
}
|
|
||||||
table.function_list td {
|
|
||||||
border-width: 1px;
|
|
||||||
padding: 3px;
|
|
||||||
border-style: solid;
|
|
||||||
border-color: #cccccc;
|
|
||||||
}
|
|
||||||
table.function_list td.name { background-color: #f6f6ff; ; min-width: 200px; }
|
|
||||||
table.function_list td.summary { width: 100%; }
|
|
||||||
|
|
||||||
dl.table dt, dl.function dt {border-top: 1px solid #ccc; padding-top: 1em;}
|
|
||||||
dl.table dd, dl.function dd {padding-bottom: 1em; margin: 10px 0 0 20px;}
|
|
||||||
dl.table h3, dl.function h3 {font-size: .95em;}
|
|
||||||
|
|
||||||
ul.nowrap {
|
|
||||||
overflow:auto;
|
|
||||||
whitespace:nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* stop sublists from having initial vertical space */
|
|
||||||
ul ul { margin-top: 0px; }
|
|
||||||
ol ul { margin-top: 0px; }
|
|
||||||
ol ol { margin-top: 0px; }
|
|
||||||
ul ol { margin-top: 0px; }
|
|
||||||
|
|
||||||
/* make the target distinct; helps when we're navigating to a function */
|
|
||||||
a:target + * {
|
|
||||||
background-color: #FF9;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* styles for prettification of source */
|
|
||||||
pre .comment { color: #558817; }
|
|
||||||
pre .constant { color: #a8660d; }
|
|
||||||
pre .escape { color: #844631; }
|
|
||||||
pre .keyword { color: #aa5050; font-weight: bold; }
|
|
||||||
pre .library { color: #0e7c6b; }
|
|
||||||
pre .marker { color: #512b1e; background: #fedc56; font-weight: bold; }
|
|
||||||
pre .string { color: #8080ff; }
|
|
||||||
pre .number { color: #f8660d; }
|
|
||||||
pre .operator { color: #2239a8; font-weight: bold; }
|
|
||||||
pre .preprocessor, pre .prepro { color: #a33243; }
|
|
||||||
pre .global { color: #800080; }
|
|
||||||
pre .user-keyword { color: #800080; }
|
|
||||||
pre .prompt { color: #558817; }
|
|
||||||
pre .url { color: #272fc2; text-decoration: underline; }
|
|
||||||
|
|
@ -1,172 +0,0 @@
|
|||||||
<!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/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/Progress.html">Progress</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>
|
|
@ -1,549 +0,0 @@
|
|||||||
<!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="#Functions">Functions</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Modules</h2>
|
|
||||||
<ul class="nowrap">
|
|
||||||
<li><a href="../modules/BackHandler.html">BackHandler</a></li>
|
|
||||||
<li><strong>BaseComponent</strong></li>
|
|
||||||
<li><a href="../modules/Blocker.html">Blocker</a></li>
|
|
||||||
<li><a href="../modules/Button.html">Button</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/Progress.html">Progress</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>BaseComponent</code></h1>
|
|
||||||
<p>Basic class for all Druid components.</p>
|
|
||||||
<p>
|
|
||||||
To create you custom component, use static function `component.create`</p>
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example">-- Create your component:
|
|
||||||
local component = require("druid.component")
|
|
||||||
|
|
||||||
local AwesomeComponent = component.create("awesome_component")
|
|
||||||
|
|
||||||
function AwesomeComponent:init(template, nodes)
|
|
||||||
self:set_template(template)
|
|
||||||
self:set_nodes(nodes)
|
|
||||||
self.druid = self:get_druid()
|
|
||||||
end
|
|
||||||
|
|
||||||
return AwesomeComponent
|
|
||||||
</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_childrens">get_childrens(self)</a></td>
|
|
||||||
<td class="summary">Return all children components, recursive</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_context">get_context(self)</a></td>
|
|
||||||
<td class="summary">Context used as first arg in all Druid events</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_druid">get_druid(self, template, nodes)</a></td>
|
|
||||||
<td class="summary">Get Druid instance for inner component creation.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_input_priority">get_input_priority(self)</a></td>
|
|
||||||
<td class="summary">Return component input priority</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_name">get_name(self)</a></td>
|
|
||||||
<td class="summary">Return component name</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_node">get_node(self, node_or_name)</a></td>
|
|
||||||
<td class="summary">Get component node by name.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_parent_component">get_parent_component(self)</a></td>
|
|
||||||
<td class="summary">Return the parent component if exist</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_parent_name">get_parent_name(self)</a></td>
|
|
||||||
<td class="summary">Return parent component name</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_template">get_template(self)</a></td>
|
|
||||||
<td class="summary">Get current component template name.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_uid">get_uid(self)</a></td>
|
|
||||||
<td class="summary">Return component UID.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#reset_input_priority">reset_input_priority(self)</a></td>
|
|
||||||
<td class="summary">Reset component input priority to default value</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_input_enabled">set_input_enabled(self, state)</a></td>
|
|
||||||
<td class="summary">Set component input state.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<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>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "get_childrens"></a>
|
|
||||||
<strong>get_childrens(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return all children components, recursive
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">BaseComponent</span></span>
|
|
||||||
<a href="../modules/BaseComponent.html#">BaseComponent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
|
||||||
Array of childrens if the Druid component instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_context"></a>
|
|
||||||
<strong>get_context(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Context used as first arg in all Druid events Context is usually self of gui_script.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">BaseComponent</span></span>
|
|
||||||
<a href="../modules/BaseComponent.html#">BaseComponent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
|
||||||
BaseComponent context
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_druid"></a>
|
|
||||||
<strong>get_druid(self, template, nodes)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Get Druid instance for inner component creation.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">BaseComponent</span></span>
|
|
||||||
<a href="../modules/BaseComponent.html#">BaseComponent</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">template</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">nil</span></span>
|
|
||||||
The template name
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">nodes</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a> or <span class="type">nil</span></span>
|
|
||||||
The nodes table
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">DruidInstance</span></span>
|
|
||||||
Druid instance with component context
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_input_priority"></a>
|
|
||||||
<strong>get_input_priority(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return component input priority
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">BaseComponent</span></span>
|
|
||||||
<a href="../modules/BaseComponent.html#">BaseComponent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
The component input priority
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_name"></a>
|
|
||||||
<strong>get_name(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return component name
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">BaseComponent</span></span>
|
|
||||||
<a href="../modules/BaseComponent.html#">BaseComponent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
The component name
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_node"></a>
|
|
||||||
<strong>get_node(self, node_or_name)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Get component node by name.
|
|
||||||
<p> If component has nodes, node_or_name should be string
|
|
||||||
It autopick node by template name or from nodes by gui.clone_tree
|
|
||||||
if they was setup via component:set_nodes, component:set_template.
|
|
||||||
If node is not found, the exception will fired
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">BaseComponent</span></span>
|
|
||||||
<a href="../modules/BaseComponent.html#">BaseComponent</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">node_or_name</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>
|
|
||||||
Node name or node itself
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">node</span></span>
|
|
||||||
Gui node
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_parent_component"></a>
|
|
||||||
<strong>get_parent_component(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return the parent component if exist
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">BaseComponent</span></span>
|
|
||||||
<a href="../modules/BaseComponent.html#">BaseComponent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">BaseComponent</span> or <span class="type">nil</span></span>
|
|
||||||
The druid component instance or nil
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_parent_name"></a>
|
|
||||||
<strong>get_parent_name(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return parent component name
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">BaseComponent</span></span>
|
|
||||||
<a href="../modules/BaseComponent.html#">BaseComponent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">nil</span></span>
|
|
||||||
The parent component name if exist or bil
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_template"></a>
|
|
||||||
<strong>get_template(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Get current component template name.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">BaseComponent</span></span>
|
|
||||||
<a href="../modules/BaseComponent.html#">BaseComponent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
Component full template name
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_uid"></a>
|
|
||||||
<strong>get_uid(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return component UID.
|
|
||||||
<p> UID generated in component creation order.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">BaseComponent</span></span>
|
|
||||||
<a href="../modules/BaseComponent.html#">BaseComponent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
The component uid
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "reset_input_priority"></a>
|
|
||||||
<strong>reset_input_priority(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Reset component input priority to default value
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">BaseComponent</span></span>
|
|
||||||
<a href="../modules/BaseComponent.html#">BaseComponent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
The component input priority
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_input_enabled"></a>
|
|
||||||
<strong>set_input_enabled(self, state)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set component input state. By default it enabled
|
|
||||||
<p> If input is disabled, the component will not receive input events
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">BaseComponent</span></span>
|
|
||||||
<a href="../modules/BaseComponent.html#">BaseComponent</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">state</span>
|
|
||||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
|
||||||
The component input state
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">BaseComponent</span></span>
|
|
||||||
BaseComponent itself
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_input_priority"></a>
|
|
||||||
<strong>set_input_priority(self, value, is_temporary)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set component input priority Default value: 10
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">BaseComponent</span></span>
|
|
||||||
<a href="../modules/BaseComponent.html#">BaseComponent</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">value</span>
|
|
||||||
<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> or <span class="type">nil</span></span>
|
|
||||||
If true, the reset input priority will return to previous value
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
The component input priority
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</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>
|
|
@ -1,233 +0,0 @@
|
|||||||
<!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="#Functions">Functions</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><strong>Blocker</strong></li>
|
|
||||||
<li><a href="../modules/Button.html">Button</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/Progress.html">Progress</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>Blocker</code></h1>
|
|
||||||
<p>Component to consume input in special zone defined by GUI node.</p>
|
|
||||||
<p>
|
|
||||||
<b># Overview #</b>
|
|
||||||
<p> <b># Notes #</b>
|
|
||||||
<p> Blocker consume input if `gui.pick_node` works on it.
|
|
||||||
<p> • Blocker inheritance <a href="../modules/BaseComponent.html#">BaseComponent</a>, you can use all of its methods in addition to those described here.
|
|
||||||
<p> • Blocker initial enabled state is `gui.is_enabled(node, true)`
|
|
||||||
<p> • The Blocker node should be enabled to capture the input</p>
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example">local node = gui.get_node("blocker_node")
|
|
||||||
local blocker = self.druid:new_blocker(node)
|
|
||||||
</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#init">init(self, node)</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/Blocker.html#">Blocker</a> constructor</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#is_enabled">is_enabled(self)</a></td>
|
|
||||||
<td class="summary">Return blocker enabled state</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_enabled">set_enabled(self, state)</a></td>
|
|
||||||
<td class="summary">Set enabled blocker component state.</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<h2><a href="#Fields">Fields</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#node">node</a></td>
|
|
||||||
<td class="summary">Blocker node</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)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/Blocker.html#">Blocker</a> constructor
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Blocker</span></span>
|
|
||||||
<a href="../modules/Blocker.html#">Blocker</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Blocker.html#node">node</a></span>
|
|
||||||
Gui node
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "is_enabled"></a>
|
|
||||||
<strong>is_enabled(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return blocker enabled state
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Blocker</span></span>
|
|
||||||
<a href="../modules/Blocker.html#">Blocker</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
@True, if blocker is enabled
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_enabled"></a>
|
|
||||||
<strong>set_enabled(self, state)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set enabled blocker component state.
|
|
||||||
<p> Don't change node enabled state itself.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Blocker</span></span>
|
|
||||||
<a href="../modules/Blocker.html#">Blocker</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">state</span>
|
|
||||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
|
||||||
Enabled state
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "node"></a>
|
|
||||||
<strong>node</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Blocker node
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Blocker.html#node">node</a></span>
|
|
||||||
|
|
||||||
</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>
|
|
@ -1,880 +0,0 @@
|
|||||||
<!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="#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><strong>Button</strong></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/Progress.html">Progress</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>Button</code></h1>
|
|
||||||
<p>Druid Component for Handling User Click Interactions: Click, Long Click, Double Click, and More.</p>
|
|
||||||
<p>
|
|
||||||
<p> <b># Overview #</b>
|
|
||||||
<p> This component provides a versatile solution for handling user click interactions.
|
|
||||||
It allows you to make any GUI node clickable and define various callbacks for different types of clicks.
|
|
||||||
<p> <b># Notes #</b>
|
|
||||||
<p> • The click callback will not trigger if the cursor moves outside the node's
|
|
||||||
area between the pressed and released states.
|
|
||||||
<p> • If a button has a double click event subscriber and the double click event is triggered,
|
|
||||||
the regular click callback will not be triggered.
|
|
||||||
<p> • Buttons can be triggered using a keyboard key by calling the button:set_key_trigger method.
|
|
||||||
<p> • To animate a small icon on a big button panel, you can use an animation node.
|
|
||||||
The trigger node name should be set as "big panel," and the animation node should be set as "small icon."
|
|
||||||
<p> <a href="https://insality.github.io/druid/druid/index.html?example=general_buttons" target="_blank"><b>Example Link</b></a></p>
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example">local function on_button_click(self, args, button)
|
|
||||||
print("Button has clicked with params: " .. args)
|
|
||||||
print("Also the button component is passed in callback params")
|
|
||||||
end
|
|
||||||
|
|
||||||
local custom_args = "Any variable to pass inside callback"
|
|
||||||
local button = self.druid:new_button("button_name", on_button_click, custom_args)
|
|
||||||
</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_key_trigger">get_key_trigger(self)</a></td>
|
|
||||||
<td class="summary">Get current key name to trigger this button.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#init">init(self, node, callback, custom_args, anim_node)</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/Button.html#">Button</a> constructor</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#is_enabled">is_enabled(self)</a></td>
|
|
||||||
<td class="summary">Get button enabled state.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_check_function">set_check_function(self, check_function, failure_callback)</a></td>
|
|
||||||
<td class="summary">Set function for additional check for button click availability</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_click_zone">set_click_zone(self, zone)</a></td>
|
|
||||||
<td class="summary">Set additional button click area.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_enabled">set_enabled(self, state)</a></td>
|
|
||||||
<td class="summary">Set button enabled state.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_key_trigger">set_key_trigger(self, key)</a></td>
|
|
||||||
<td class="summary">Set key name to trigger this button by keyboard.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_web_user_interaction">set_web_user_interaction(self, is_web_mode)</a></td>
|
|
||||||
<td class="summary">Set Button mode to work inside user HTML5 interaction event.</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="#anim_node">anim_node</a></td>
|
|
||||||
<td class="summary">Button animation node.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#click_zone">click_zone</a></td>
|
|
||||||
<td class="summary">Additional button click area, defined by another GUI node</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#hover">hover</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/Hover.html#">Hover</a>: Button Hover component</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#node">node</a></td>
|
|
||||||
<td class="summary">Button trigger node</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#node_id">node_id</a></td>
|
|
||||||
<td class="summary">The GUI node id from button node</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_click">on_click</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on successful release action over button.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_click_outside">on_click_outside</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event calls if click event was outside of button.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_double_click">on_double_click</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on double tap action over button.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_hold_callback">on_hold_callback</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event calls every frame before on_long_click event.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_long_click">on_long_click</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on long tap action over button.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_pressed">on_pressed</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event triggered if button was pressed by user.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_repeated_click">on_repeated_click</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on repeated action over button.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#params">params</a></td>
|
|
||||||
<td class="summary">Custom args for any Button event.</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "get_key_trigger"></a>
|
|
||||||
<strong>get_key_trigger(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Get current key name to trigger this button.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Button</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">hash</span></span>
|
|
||||||
The action_id of the input key
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example"><span class="keyword">local</span> key_hash = button:get_key_trigger()</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "init"></a>
|
|
||||||
<strong>init(self, node, callback, custom_args, anim_node)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/Button.html#">Button</a> constructor
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Button</span></span>
|
|
||||||
<a href="../modules/Button.html#">Button</a>
|
|
||||||
</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 <a class="type" href="../modules/Button.html#node">node</a></span>
|
|
||||||
The node_id or gui.get_node(node_id)
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">callback</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
On click button callback
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">custom_args</span>
|
|
||||||
<span class="types"><span class="type">any</span> or <span class="type">nil</span></span>
|
|
||||||
Button events custom arguments
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">anim_node</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a>, <a class="type" href="../modules/Button.html#node">node</a> or <span class="type">nil</span></span>
|
|
||||||
Node to animate instead of trigger node.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "is_enabled"></a>
|
|
||||||
<strong>is_enabled(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Get button enabled state.
|
|
||||||
<p> By default all Buttons is enabled on creating.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Button</span></span>
|
|
||||||
<a href="../modules/Button.html#">Button</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
@True, if button is enabled now, False overwise
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example"><span class="keyword">local</span> is_enabled = button:is_enabled()</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_check_function"></a>
|
|
||||||
<strong>set_check_function(self, check_function, failure_callback)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set function for additional check for button click availability
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Button</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">check_function</span>
|
|
||||||
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
|
||||||
Should return true or false. If true - button can be pressed.
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">failure_callback</span>
|
|
||||||
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
|
||||||
Function will be called on button click, if check function return false
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">Button</span></span>
|
|
||||||
Current button instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_click_zone"></a>
|
|
||||||
<strong>set_click_zone(self, zone)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set additional button click area.
|
|
||||||
Useful to restrict click outside out stencil node or scrollable content.
|
|
||||||
<p> This functions calls automatically if you don't disable it in game.project: druid.no_stencil_check
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Button</span></span>
|
|
||||||
<a href="../modules/Button.html#">Button</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">zone</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Button.html#node">node</a>, <a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">nil</span></span>
|
|
||||||
Gui node
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">Button</span></span>
|
|
||||||
Current button instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example">button:set_click_zone(<span class="string">"stencil_node"</span>)</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_enabled"></a>
|
|
||||||
<strong>set_enabled(self, state)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set button enabled state.
|
|
||||||
The style.on_set_enabled will be triggered.
|
|
||||||
Disabled button is not clickable.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Button</span></span>
|
|
||||||
<a href="../modules/Button.html#">Button</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">state</span>
|
|
||||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
|
||||||
Enabled state
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">Button</span></span>
|
|
||||||
Current button instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example">button:set_enabled(<span class="keyword">false</span>)
|
|
||||||
button:set_enabled(<span class="keyword">true</span>)</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_key_trigger"></a>
|
|
||||||
<strong>set_key_trigger(self, key)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set key name to trigger this button by keyboard.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Button</span></span>
|
|
||||||
<a href="../modules/Button.html#">Button</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">key</span>
|
|
||||||
<span class="types"><span class="type">hash</span> or <a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
The action_id of the input key
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">Button</span></span>
|
|
||||||
Current button instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example">button:set_key_trigger(<span class="string">"key_space"</span>)</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_web_user_interaction"></a>
|
|
||||||
<strong>set_web_user_interaction(self, is_web_mode)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set Button mode to work inside user HTML5 interaction event.
|
|
||||||
<p> It's required to make protected things like copy & paste text, show mobile keyboard, etc
|
|
||||||
The HTML5 button's doesn't call any events except on_click event.
|
|
||||||
<p> If the game is not HTML, html mode will be not enabled
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Button</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">is_web_mode</span>
|
|
||||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
|
||||||
If true - button will be called inside html5 callback
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">Button</span></span>
|
|
||||||
Current button instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example">button:set_web_user_interaction(<span class="keyword">true</span>)</pre>
|
|
||||||
</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">LONGTAP_TIME</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
Minimum time to trigger on_hold_callback. Default: 0.4
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">AUTOHOLD_TRIGGER</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
Maximum hold time to trigger button release while holding. Default: 0.8
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">DOUBLETAP_TIME</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
Time between double taps. Default: 0.4
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">on_click</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
function(self, node)
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">on_click_disabled</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
function(self, node)
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">on_hover</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
function(self, node, hover_state)
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">on_mouse_hover</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
function(self, node, hover_state)
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">on_set_enabled</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
function(self, node, enabled_state)
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "anim_node"></a>
|
|
||||||
<strong>anim_node</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Button animation node.
|
|
||||||
In default case equals to clickable node.
|
|
||||||
<p> Usecase: You have the big clickable panel, but want to animate only one small icon on it.
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">anim_node</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Button.html#node">node</a> or <span class="type">nil</span></span>
|
|
||||||
Default node
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "click_zone"></a>
|
|
||||||
<strong>click_zone</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Additional button click area, defined by another GUI node
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">click_zone</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Button.html#node">node</a> or <span class="type">nil</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "hover"></a>
|
|
||||||
<strong>hover</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/Hover.html#">Hover</a>: Button Hover component
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">hover</span>
|
|
||||||
<span class="types"><span class="type">Hover</span></span>
|
|
||||||
<a href="../modules/Hover.html#">Hover</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "node"></a>
|
|
||||||
<strong>node</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Button trigger node
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Button.html#node">node</a></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "node_id"></a>
|
|
||||||
<strong>node_id</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The GUI node id from button node
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">node_id</span>
|
|
||||||
<span class="types"><span class="type">hash</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_click"></a>
|
|
||||||
<strong>on_click</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on successful release action over button.
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_click</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">-- Custom args passed in Button constructor
|
|
||||||
</span>button.on_click:subscribe(<span class="keyword">function</span>(self, custom_args, button_instance)
|
|
||||||
<span class="global">print</span>(<span class="string">"On button click!"</span>)
|
|
||||||
<span class="keyword">end</span>)</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_click_outside"></a>
|
|
||||||
<strong>on_click_outside</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event calls if click event was outside of button.
|
|
||||||
<p> This event will be triggered for each button what was not clicked on user click action
|
|
||||||
<p> Usecase: Hide the popup when click outside
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_click_outside</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">-- Custom args passed in Button constructor
|
|
||||||
</span>button.on_click_outside:subscribe(<span class="keyword">function</span>(self, custom_args, button_instance)
|
|
||||||
<span class="global">print</span>(<span class="string">"On click Button outside!"</span>)
|
|
||||||
<span class="keyword">end</span>)</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_double_click"></a>
|
|
||||||
<strong>on_double_click</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on double tap action over button.
|
|
||||||
<p> If secondary click was too fast after previous one, the double
|
|
||||||
click will be called instead usual click (if on_double_click subscriber exists)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_double_click</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">-- Custom args passed in Button constructor
|
|
||||||
</span>button.on_double_click:subscribe(<span class="keyword">function</span>(self, custom_args, button_instance, click_amount)
|
|
||||||
<span class="global">print</span>(<span class="string">"On double Button click!"</span>)
|
|
||||||
<span class="keyword">end</span>)</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_hold_callback"></a>
|
|
||||||
<strong>on_hold_callback</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event calls every frame before on_long_click event.
|
|
||||||
<p> If long_click subscriber exists, the on_hold_callback will be called before long_click trigger.
|
|
||||||
<p> Usecase: Animate button progress of long tap
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_hold_callback</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">-- Custom args passed in Button constructor
|
|
||||||
</span>button.on_double_click:subscribe(<span class="keyword">function</span>(self, custom_args, button_instance, time)
|
|
||||||
<span class="global">print</span>(<span class="string">"On hold Button callback!"</span>)
|
|
||||||
<span class="keyword">end</span>)</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_long_click"></a>
|
|
||||||
<strong>on_long_click</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on long tap action over button.
|
|
||||||
<p> This callback will be triggered if user pressed the button and hold the some amount of time.
|
|
||||||
The amount of time picked from button style param: LONGTAP_TIME
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_long_click</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">-- Custom args passed in Button constructor
|
|
||||||
</span>button.on_long_click:subscribe(<span class="keyword">function</span>(self, custom_args, button_instance, hold_time)
|
|
||||||
<span class="global">print</span>(<span class="string">"On long Button click!"</span>)
|
|
||||||
<span class="keyword">end</span>)</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_pressed"></a>
|
|
||||||
<strong>on_pressed</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event triggered if button was pressed by user.
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_pressed</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">-- Custom args passed in Button constructor
|
|
||||||
</span>button.on_pressed:subscribe(<span class="keyword">function</span>(self, custom_args, button_instance)
|
|
||||||
<span class="global">print</span>(<span class="string">"On Button pressed!"</span>)
|
|
||||||
<span class="keyword">end</span>)</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_repeated_click"></a>
|
|
||||||
<strong>on_repeated_click</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on repeated action over button.
|
|
||||||
<p> This callback will be triggered if user hold the button. The repeat rate pick from `input.repeat_interval` in game.project
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_repeated_click</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">-- Custom args passed in Button constructor
|
|
||||||
</span>button.on_repeated_click:subscribe(<span class="keyword">function</span>(self, custom_args, button_instance, click_count)
|
|
||||||
<span class="global">print</span>(<span class="string">"On repeated Button click!"</span>)
|
|
||||||
<span class="keyword">end</span>)</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "params"></a>
|
|
||||||
<strong>params</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Custom args for any Button event. Setup in Button constructor
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">params</span>
|
|
||||||
<span class="types"><span class="type">any</span></span>
|
|
||||||
|
|
||||||
</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>
|
|
@ -1,350 +0,0 @@
|
|||||||
<!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="#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><strong>Checkbox</strong></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/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>Checkbox</code></h1>
|
|
||||||
<p>Druid checkbox component</p>
|
|
||||||
<p> <a href="https://insality.github.io/druid/druid/index.html?example=general_checkboxes" target="_blank"><b>Example Link</b></a></p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_state">get_state(self)</a></td>
|
|
||||||
<td class="summary">Return checkbox state</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#init">init(self, node, callback, click_node, initial_state)</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/Checkbox.html#">Checkbox</a> constructor</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_state">set_state(self, state, is_silent, is_instant)</a></td>
|
|
||||||
<td class="summary">Set checkbox state</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 = "get_state"></a>
|
|
||||||
<strong>get_state(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return checkbox state
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Checkbox</span></span>
|
|
||||||
<a href="../modules/Checkbox.html#">Checkbox</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
Checkbox state
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "init"></a>
|
|
||||||
<strong>init(self, node, callback, click_node, initial_state)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/Checkbox.html#">Checkbox</a> constructor
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Checkbox</span></span>
|
|
||||||
<a href="../modules/Checkbox.html#">Checkbox</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Checkbox.html#node">node</a></span>
|
|
||||||
Gui node
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">callback</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
Checkbox callback
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">click_node</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Checkbox.html#node">node</a> or <span class="type">nil</span></span>
|
|
||||||
Trigger node, by default equals to node. Default: node
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">initial_state</span>
|
|
||||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
|
||||||
The initial state of checkbox, default - false
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_state"></a>
|
|
||||||
<strong>set_state(self, state, is_silent, is_instant)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set checkbox state
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Checkbox</span></span>
|
|
||||||
<a href="../modules/Checkbox.html#">Checkbox</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">state</span>
|
|
||||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
|
||||||
Checkbox state
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">is_silent</span>
|
|
||||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
|
||||||
Don't trigger on_change_state if true
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">is_instant</span>
|
|
||||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
|
||||||
If instant checkbox change
|
|
||||||
</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">on_change_state</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
(self, node, state)
|
|
||||||
</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/Checkbox.html#node">node</a> or <span class="type">nil</span></span>
|
|
||||||
|
|
||||||
</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/Checkbox.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>
|
|
@ -1,259 +0,0 @@
|
|||||||
<!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="#Functions">Functions</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><strong>CheckboxGroup</strong></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/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>CheckboxGroup</code></h1>
|
|
||||||
<p>Checkbox group module</p>
|
|
||||||
<p> <a href="https://insality.github.io/druid/druid/index.html?example=general_checkboxes" target="_blank"><b>Example Link</b></a></p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_state">get_state(self)</a></td>
|
|
||||||
<td class="summary">Return checkbox group state</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#init">init(self, nodes, callback, click_nodes)</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/CheckboxGroup.html#">CheckboxGroup</a> constructor</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_state">set_state(self, indexes, is_instant)</a></td>
|
|
||||||
<td class="summary">Set checkbox group state</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<h2><a href="#Fields">Fields</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#checkboxes">checkboxes</a></td>
|
|
||||||
<td class="summary">Array of checkbox components</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_checkbox_click">on_checkbox_click</a></td>
|
|
||||||
<td class="summary">On any checkbox click callback(self, index)</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "get_state"></a>
|
|
||||||
<strong>get_state(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return checkbox group state
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">CheckboxGroup</span></span>
|
|
||||||
<a href="../modules/CheckboxGroup.html#">CheckboxGroup</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">boolean[]</span></span>
|
|
||||||
Array if checkboxes state
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "init"></a>
|
|
||||||
<strong>init(self, nodes, callback, click_nodes)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/CheckboxGroup.html#">CheckboxGroup</a> constructor
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">CheckboxGroup</span></span>
|
|
||||||
<a href="../modules/CheckboxGroup.html#">CheckboxGroup</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">nodes</span>
|
|
||||||
<span class="types"><span class="type">node[]</span></span>
|
|
||||||
Array of gui node
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">callback</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
Checkbox callback
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">click_nodes</span>
|
|
||||||
<span class="types"><span class="type">node[]</span> or <span class="type">nil</span></span>
|
|
||||||
Array of trigger nodes, by default equals to nodes
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_state"></a>
|
|
||||||
<strong>set_state(self, indexes, is_instant)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set checkbox group state
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">CheckboxGroup</span></span>
|
|
||||||
<a href="../modules/CheckboxGroup.html#">CheckboxGroup</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">indexes</span>
|
|
||||||
<span class="types"><span class="type">boolean[]</span></span>
|
|
||||||
Array of checkbox state
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">is_instant</span>
|
|
||||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
|
||||||
If instant state change
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "checkboxes"></a>
|
|
||||||
<strong>checkboxes</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Array of checkbox components
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">checkboxes</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
|
||||||
<a href="../modules/Checkbox.html#">Checkbox</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_checkbox_click"></a>
|
|
||||||
<strong>on_checkbox_click</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On any checkbox click callback(self, index)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_checkbox_click</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>
|
|
@ -1,712 +0,0 @@
|
|||||||
<!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="#Functions">Functions</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><strong>DataList</strong></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/Progress.html">Progress</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>DataList</code></h1>
|
|
||||||
<p>Component to manage data for huge dataset in scroll.</p>
|
|
||||||
<p>
|
|
||||||
It requires Druid Scroll and Druid Grid (Static or Dynamic) components
|
|
||||||
<p> <a href="https://insality.github.io/druid/druid/index.html?example=general_data_list" target="_blank"><b>Example Link</b></a></p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#add">add(self, data, index, shift_policy)</a></td>
|
|
||||||
<td class="summary">Add element to DataList.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#clear">clear(self)</a></td>
|
|
||||||
<td class="summary">Clear the DataList and refresh visuals</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_created_components">get_created_components(self)</a></td>
|
|
||||||
<td class="summary">Return all currenly created components in DataList</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_created_nodes">get_created_nodes(self)</a></td>
|
|
||||||
<td class="summary">Return all currenly created nodes in DataList</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_data">get_data(self)</a></td>
|
|
||||||
<td class="summary">Return current data from DataList component</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_index">get_index(self, data)</a></td>
|
|
||||||
<td class="summary">Return index for data value</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#init">init(self, scroll, grid, create_function)</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/DataList.html#">DataList</a> constructor</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_remove">on_remove(self)</a></td>
|
|
||||||
<td class="summary">Druid System on_remove function</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#remove">remove(self, index, shift_policy)</a></td>
|
|
||||||
<td class="summary">Remove element from DataList.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#remove_by_data">remove_by_data(self, data, shift_policy)</a></td>
|
|
||||||
<td class="summary">Remove element from DataList by data value.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#scroll_to_index">scroll_to_index(self, index)</a></td>
|
|
||||||
<td class="summary">Instant scroll to element with passed index</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_data">set_data(self, data)</a></td>
|
|
||||||
<td class="summary">Set new data set for DataList component</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_use_cache">set_use_cache(self, is_use_cache)</a></td>
|
|
||||||
<td class="summary">Set refresh function for DataList component</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<h2><a href="#Fields">Fields</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#grid">grid</a></td>
|
|
||||||
<td class="summary">The Druid Grid component</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#last_index">last_index</a></td>
|
|
||||||
<td class="summary">The current last index of visual elements</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_element_add">on_element_add</a></td>
|
|
||||||
<td class="summary">On DataList visual element created Event callback(self, index, node, instance)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_element_remove">on_element_remove</a></td>
|
|
||||||
<td class="summary">On DataList visual element created Event callback(self, index)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_scroll_progress_change">on_scroll_progress_change</a></td>
|
|
||||||
<td class="summary">Event triggered when scroll progress is changed; event(self, progress_value)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#scroll">scroll</a></td>
|
|
||||||
<td class="summary">The Druid scroll component</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#scroll_progress">scroll_progress</a></td>
|
|
||||||
<td class="summary">The current progress of scroll posititon</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#top_index">top_index</a></td>
|
|
||||||
<td class="summary">The current top index of visual elements</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "add"></a>
|
|
||||||
<strong>add(self, data, index, shift_policy)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Add element to DataList. Currenly untested
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DataList</span></span>
|
|
||||||
<a href="../modules/DataList.html#">DataList</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">data</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">index</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">shift_policy</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
The constant from const.SHIFT.*
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "clear"></a>
|
|
||||||
<strong>clear(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Clear the DataList and refresh visuals
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DataList</span></span>
|
|
||||||
<a href="../modules/DataList.html#">DataList</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_created_components"></a>
|
|
||||||
<strong>get_created_components(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return all currenly created components in DataList
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DataList</span></span>
|
|
||||||
<a href="../modules/DataList.html#">DataList</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">druid.base_component[]</span></span>
|
|
||||||
List of created nodes
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_created_nodes"></a>
|
|
||||||
<strong>get_created_nodes(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return all currenly created nodes in DataList
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DataList</span></span>
|
|
||||||
<a href="../modules/DataList.html#">DataList</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">node[]</span></span>
|
|
||||||
List of created nodes
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_data"></a>
|
|
||||||
<strong>get_data(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return current data from DataList component
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DataList</span></span>
|
|
||||||
<a href="../modules/DataList.html#">DataList</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
|
||||||
The current data array
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_index"></a>
|
|
||||||
<strong>get_index(self, data)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return index for data value
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DataList</span></span>
|
|
||||||
<a href="../modules/DataList.html#">DataList</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">data</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "init"></a>
|
|
||||||
<strong>init(self, scroll, grid, create_function)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/DataList.html#">DataList</a> constructor
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DataList</span></span>
|
|
||||||
<a href="../modules/DataList.html#">DataList</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">scroll</span>
|
|
||||||
<span class="types"><span class="type">Scroll</span></span>
|
|
||||||
The <a href="../modules/Scroll.html#">Scroll</a> instance for Data List component
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">grid</span>
|
|
||||||
<span class="types"><span class="type">StaticGrid</span></span>
|
|
||||||
The <a href="../modules/StaticGrid.html#">StaticGrid</a> or <a href="../modules/DynamicGrid.html#">DynamicGrid</a> instance for Data List component
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">create_function</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
The create function callback(self, data, index, data_list). Function should return (node, [component])
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_remove"></a>
|
|
||||||
<strong>on_remove(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Druid System on_remove function
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DataList</span></span>
|
|
||||||
<a href="../modules/DataList.html#">DataList</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "remove"></a>
|
|
||||||
<strong>remove(self, index, shift_policy)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Remove element from DataList. Currenly untested
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DataList</span></span>
|
|
||||||
<a href="../modules/DataList.html#">DataList</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">index</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">shift_policy</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
The constant from const.SHIFT.*
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "remove_by_data"></a>
|
|
||||||
<strong>remove_by_data(self, data, shift_policy)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Remove element from DataList by data value. Currenly untested
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DataList</span></span>
|
|
||||||
<a href="../modules/DataList.html#">DataList</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">data</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">shift_policy</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
The constant from const.SHIFT.*
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "scroll_to_index"></a>
|
|
||||||
<strong>scroll_to_index(self, index)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Instant scroll to element with passed index
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DataList</span></span>
|
|
||||||
<a href="../modules/DataList.html#">DataList</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">index</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_data"></a>
|
|
||||||
<strong>set_data(self, data)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set new data set for DataList component
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DataList</span></span>
|
|
||||||
<a href="../modules/DataList.html#">DataList</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">data</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
|
||||||
The new data array
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">druid.data_list</span></span>
|
|
||||||
Current DataList instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_use_cache"></a>
|
|
||||||
<strong>set_use_cache(self, is_use_cache)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set refresh function for DataList component
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DataList</span></span>
|
|
||||||
<a href="../modules/DataList.html#">DataList</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">is_use_cache</span>
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
Use cache version of DataList. Requires make setup of components in on_element_add callback and clean in on_element_remove
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">druid.data_list</span></span>
|
|
||||||
Current DataList instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "grid"></a>
|
|
||||||
<strong>grid</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The Druid Grid component
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">grid</span>
|
|
||||||
<span class="types"><span class="type">StaticGrid</span></span>
|
|
||||||
<a href="../modules/StaticGrid.html#">StaticGrid</a>, <a href="../modules/DynamicGrid.html#">DynamicGrid</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "last_index"></a>
|
|
||||||
<strong>last_index</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The current last index of visual elements
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">last_index</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_element_add"></a>
|
|
||||||
<strong>on_element_add</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On DataList visual element created Event callback(self, index, node, instance)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_element_add</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_element_remove"></a>
|
|
||||||
<strong>on_element_remove</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On DataList visual element created Event callback(self, index)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_element_remove</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_scroll_progress_change"></a>
|
|
||||||
<strong>on_scroll_progress_change</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Event triggered when scroll progress is changed; event(self, progress_value)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_scroll_progress_change</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "scroll"></a>
|
|
||||||
<strong>scroll</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The Druid scroll component
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">scroll</span>
|
|
||||||
<span class="types"><span class="type">Scroll</span></span>
|
|
||||||
<a href="../modules/Scroll.html#">Scroll</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "scroll_progress"></a>
|
|
||||||
<strong>scroll_progress</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The current progress of scroll posititon
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">scroll_progress</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "top_index"></a>
|
|
||||||
<strong>top_index</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The current top index of visual elements
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">top_index</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
|
|
||||||
</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>
|
|
@ -1,633 +0,0 @@
|
|||||||
<!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="#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/DataList.html">DataList</a></li>
|
|
||||||
<li><strong>Drag</strong></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/Progress.html">Progress</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>Drag</code></h1>
|
|
||||||
<p>Component to handle drag action on node.</p>
|
|
||||||
<p>
|
|
||||||
Drag have correct handling for multitouch and swap
|
|
||||||
touched while dragging. Drag will be processed even
|
|
||||||
the cursor is outside of node, if drag is already started
|
|
||||||
<p> <a href="https://insality.github.io/druid/druid/index.html?example=general_drag" target="_blank"><b>Example Link</b></a></p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#init">init(self, node, on_drag_callback)</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/Drag.html#">Drag</a> 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">
|
|
||||||
<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="#can_x">can_x</a></td>
|
|
||||||
<td class="summary">Is drag component process vertical dragging.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#can_y">can_y</a></td>
|
|
||||||
<td class="summary">Is drag component process horizontal.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#is_drag">is_drag</a></td>
|
|
||||||
<td class="summary">Is component now dragging</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#is_touch">is_touch</a></td>
|
|
||||||
<td class="summary">Is component now touching</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#node">node</a></td>
|
|
||||||
<td class="summary">Drag node</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_drag">on_drag</a></td>
|
|
||||||
<td class="summary">on drag progress callback(self, dx, dy, total_x, total_y, touch)</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, total_x, total_y, touch)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_drag_start">on_drag_start</a></td>
|
|
||||||
<td class="summary">Event on drag start callback(self, touch)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_touch_end">on_touch_end</a></td>
|
|
||||||
<td class="summary">Event on touch end callback(self)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_touch_start">on_touch_start</a></td>
|
|
||||||
<td class="summary">Event on touch start callback(self)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#screen_x">screen_x</a></td>
|
|
||||||
<td class="summary">Current touch x screen position</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#screen_y">screen_y</a></td>
|
|
||||||
<td class="summary">Current touch y screen position</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#touch_start_pos">touch_start_pos</a></td>
|
|
||||||
<td class="summary">Touch start position</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#x">x</a></td>
|
|
||||||
<td class="summary">Current touch x position</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#y">y</a></td>
|
|
||||||
<td class="summary">Current touch y position</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_drag_callback)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/Drag.html#">Drag</a> constructor
|
|
||||||
|
|
||||||
|
|
||||||
<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">node</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Drag.html#node">node</a></span>
|
|
||||||
GUI node to detect dragging
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">on_drag_callback</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
Callback for on_drag_event(self, dx, dy)
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</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">boolean</span></span>
|
|
||||||
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_click_zone"></a>
|
|
||||||
<strong>set_click_zone(self, node)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Strict drag 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">Drag</span></span>
|
|
||||||
<a href="../modules/Drag.html#">Drag</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Drag.html#node">node</a>, <a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">nil</span></span>
|
|
||||||
Gui node
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</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">boolean</span> or <span class="type">nil</span></span>
|
|
||||||
|
|
||||||
</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">DRAG_DEADZONE</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
Distance in pixels to start dragging. Default: 10
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">NO_USE_SCREEN_KOEF</span>
|
|
||||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
|
||||||
If screen aspect ratio affects on drag values. Default: false
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "can_x"></a>
|
|
||||||
<strong>can_x</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Is drag component process vertical dragging. Default - true
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">can_x</span>
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "can_y"></a>
|
|
||||||
<strong>can_y</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Is drag component process horizontal. Default - true
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">can_y</span>
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "is_drag"></a>
|
|
||||||
<strong>is_drag</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Is component now dragging
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">is_drag</span>
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "is_touch"></a>
|
|
||||||
<strong>is_touch</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Is component now touching
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">is_touch</span>
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "node"></a>
|
|
||||||
<strong>node</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Drag node
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Drag.html#node">node</a></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_drag"></a>
|
|
||||||
<strong>on_drag</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
on drag progress callback(self, dx, dy, total_x, total_y, touch)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_drag</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
Event <a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_drag_end"></a>
|
|
||||||
<strong>on_drag_end</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Event on drag end callback(self, total_x, total_y, touch)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_drag_end</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_drag_start"></a>
|
|
||||||
<strong>on_drag_start</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Event on drag start callback(self, touch)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_drag_start</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_touch_end"></a>
|
|
||||||
<strong>on_touch_end</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Event on touch end callback(self)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_touch_end</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_touch_start"></a>
|
|
||||||
<strong>on_touch_start</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Event on touch start callback(self)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_touch_start</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "screen_x"></a>
|
|
||||||
<strong>screen_x</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Current touch x screen position
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">screen_x</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "screen_y"></a>
|
|
||||||
<strong>screen_y</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Current touch y screen position
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">screen_y</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "touch_start_pos"></a>
|
|
||||||
<strong>touch_start_pos</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Touch start position
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">touch_start_pos</span>
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "x"></a>
|
|
||||||
<strong>x</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Current touch x position
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">x</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "y"></a>
|
|
||||||
<strong>y</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Current touch y position
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">y</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
|
|
||||||
</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>
|
|
@ -1,374 +0,0 @@
|
|||||||
<!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="#Functions">Functions</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/DataList.html">DataList</a></li>
|
|
||||||
<li><a href="../modules/Drag.html">Drag</a></li>
|
|
||||||
<li><strong>Druid</strong></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/Progress.html">Progress</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>Druid</code></h1>
|
|
||||||
<p>Druid UI Component Framework.</p>
|
|
||||||
<p>
|
|
||||||
<b># Overview #</b>
|
|
||||||
<p> Druid - powerful Defold component UI library. Use basic and extended
|
|
||||||
Druid components or make your own game-specific components to make
|
|
||||||
amazing GUI in your games.
|
|
||||||
<p> To start using Druid, please refer to the Usage section below.
|
|
||||||
<p> <b># Notes #</b>
|
|
||||||
<p> • Each Druid instance maintains the self context from the constructor and passes it to each Druid callback.
|
|
||||||
<p> See next: <a href="../modules/DruidInstance.html#">DruidInstance</a>
|
|
||||||
</p>
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example">local druid = require("druid.druid")
|
|
||||||
|
|
||||||
local function on_play(self)
|
|
||||||
print("Gonna play!")
|
|
||||||
end
|
|
||||||
|
|
||||||
function init(self)
|
|
||||||
self.druid = druid.new(self)
|
|
||||||
self.druid:new_button("button_play", on_play)
|
|
||||||
end
|
|
||||||
|
|
||||||
function final(self)
|
|
||||||
self.druid:final()
|
|
||||||
end
|
|
||||||
|
|
||||||
function update(self, dt)
|
|
||||||
self.druid:update(dt)
|
|
||||||
end
|
|
||||||
|
|
||||||
function on_message(self, message_id, message, sender)
|
|
||||||
self.druid:on_message(message_id, message, sender)
|
|
||||||
end
|
|
||||||
|
|
||||||
function on_input(self, action_id, action)
|
|
||||||
return self.druid:on_input(action_id, action)
|
|
||||||
end
|
|
||||||
</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#druid.new">druid.new(context, style)</a></td>
|
|
||||||
<td class="summary">Create a new Druid instance for creating GUI components.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#druid.on_language_change">druid.on_language_change()</a></td>
|
|
||||||
<td class="summary">Call this function when the game language changes.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#druid.on_window_callback">druid.on_window_callback(event)</a></td>
|
|
||||||
<td class="summary">Set the window callback to enable on_focus_gain and on_focus_lost functions.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#druid.register">druid.register(name, module)</a></td>
|
|
||||||
<td class="summary">Register a new external Druid component.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#druid.set_default_style">druid.set_default_style(style)</a></td>
|
|
||||||
<td class="summary">Set your own default style for all Druid instances.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#druid.set_sound_function">druid.set_sound_function(callback)</a></td>
|
|
||||||
<td class="summary">Set the Druid sound function to play UI sounds if used.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#druid.set_text_function">druid.set_text_function(callback)</a></td>
|
|
||||||
<td class="summary">Set the text function for the LangText component.</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "druid.new"></a>
|
|
||||||
<strong>druid.new(context, style)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Create a new Druid instance for creating GUI components.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">context</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
|
||||||
The Druid context. Usually, this is the self of the gui_script. It is passed into all Druid callbacks.
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">style</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a> or <span class="type">nil</span></span>
|
|
||||||
The Druid style table to override style parameters for this Druid instance.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">druid_instance</span></span>
|
|
||||||
The Druid instance <a href="../modules/DruidInstance.html#">DruidInstance</a>.
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example"><span class="keyword">local</span> druid = <span class="global">require</span>(<span class="string">"druid.druid"</span>)
|
|
||||||
|
|
||||||
<span class="keyword">function</span> init(self)
|
|
||||||
self.druid = druid.new(self)
|
|
||||||
<span class="keyword">end</span></pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "druid.on_language_change"></a>
|
|
||||||
<strong>druid.on_language_change()</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Call this function when the game language changes.
|
|
||||||
<p> This function will translate all current LangText components.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example">druid.on_language_change()</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "druid.on_window_callback"></a>
|
|
||||||
<strong>druid.on_window_callback(event)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set the window callback to enable on_focus_gain and on_focus_lost functions.
|
|
||||||
<p> This is used to trigger the on_focus_lost and on_focus_gain functions in Druid components.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">event</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
Event param from window listener
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example">window.set_listener(<span class="keyword">function</span>(_, event)
|
|
||||||
druid.on_window_callback(event)
|
|
||||||
<span class="keyword">end</span>)</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "druid.register"></a>
|
|
||||||
<strong>druid.register(name, module)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Register a new external Druid component.
|
|
||||||
<p> You can register your own components to make new alias: the druid:new_{name} function.
|
|
||||||
For example, if you want to register a component called "my_component", you can create it using druid:new_my_component(...).
|
|
||||||
This can be useful if you have your own "basic" components that you don't want to re-create each time.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">name</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
module name
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">module</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
|
||||||
lua table with component
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example"><span class="keyword">local</span> my_component = <span class="global">require</span>(<span class="string">"path.to.my.component"</span>)
|
|
||||||
druid.register(<span class="string">"my_component"</span>, my_component)
|
|
||||||
...
|
|
||||||
<span class="keyword">local</span> druid = druid.new(self)
|
|
||||||
<span class="keyword">local</span> component_instance = self.druid:new_my_component(...)</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "druid.set_default_style"></a>
|
|
||||||
<strong>druid.set_default_style(style)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set your own default style for all Druid instances.
|
|
||||||
<p> To create your own style file, copy the default style file and make changes to it.
|
|
||||||
Register the new style before creating your Druid instances.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">style</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
|
||||||
Druid style module
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example"><span class="keyword">local</span> my_style = <span class="global">require</span>(<span class="string">"path.to.my.style"</span>)
|
|
||||||
druid.set_default_style(my_style)</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "druid.set_sound_function"></a>
|
|
||||||
<strong>druid.set_sound_function(callback)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set the Druid sound function to play UI sounds if used.
|
|
||||||
<p> Set a function to play a sound given a sound_id. This function is used for button clicks to play the "click" sound.
|
|
||||||
It can also be used to play sounds in your custom components (see the default Druid style file for an example).
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">callback</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
Sound play callback
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example">druid.set_sound_function(<span class="keyword">function</span>(sound_id)
|
|
||||||
sound.play(sound_id) <span class="comment">-- Replace with your real function
|
|
||||||
</span><span class="keyword">end</span>)</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "druid.set_text_function"></a>
|
|
||||||
<strong>druid.set_text_function(callback)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set the text function for the LangText component.
|
|
||||||
<p> The Druid locale component will call this function to get translated text.
|
|
||||||
After setting the text function, all existing locale components will be updated.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">callback</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
Get localized text function
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example">druid.set_text_function(<span class="keyword">function</span>(text_id)
|
|
||||||
<span class="keyword">return</span> lang_data[text_id] <span class="comment">-- Replace with your real function
|
|
||||||
</span><span class="keyword">end</span>)</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>
|
|
@ -1,399 +0,0 @@
|
|||||||
<!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="#Functions">Functions</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/DataList.html">DataList</a></li>
|
|
||||||
<li><a href="../modules/Drag.html">Drag</a></li>
|
|
||||||
<li><a href="../modules/Druid.html">Druid</a></li>
|
|
||||||
<li><strong>DruidEvent</strong></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/Progress.html">Progress</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>DruidEvent</code></h1>
|
|
||||||
<p>Druid Event Module
|
|
||||||
<p> The Event module provides a simple class for handling callbacks.</p>
|
|
||||||
<p> It is used in many Druid components.
|
|
||||||
<p> You can subscribe to an event using the `:subscribe` method and unsubscribe using the `:unsubscribe` method.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#clear">clear(self)</a></td>
|
|
||||||
<td class="summary">Clear the all event handlers</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#create">create(callback, callback_context)</a></td>
|
|
||||||
<td class="summary">DruidEvent constructor</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#is_empty">is_empty(self)</a></td>
|
|
||||||
<td class="summary">Return true, if event not have handler</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#is_exist">is_exist(self)</a></td>
|
|
||||||
<td class="summary">Return true, if event have at lease one handler</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#is_subscribed">is_subscribed(self, callback, callback_context)</a></td>
|
|
||||||
<td class="summary">Check is event subscribed.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#subscribe">subscribe(self, callback, callback_context)</a></td>
|
|
||||||
<td class="summary">Subscribe callback on event</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#trigger">trigger(self, ...)</a></td>
|
|
||||||
<td class="summary">Trigger the event and call all subscribed callbacks</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#unsubscribe">unsubscribe(self, callback, callback_context)</a></td>
|
|
||||||
<td class="summary">Unsubscribe callback on event</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "clear"></a>
|
|
||||||
<strong>clear(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Clear the all event handlers
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</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">button.on_long_click:clear()</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "create"></a>
|
|
||||||
<strong>create(callback, callback_context)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
DruidEvent constructor
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">callback</span>
|
|
||||||
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
|
||||||
Subscribe the callback on new event, if callback exist
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">callback_context</span>
|
|
||||||
<span class="types"><span class="type">any</span> or <span class="type">nil</span></span>
|
|
||||||
Additional context as first param to callback call
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example"><span class="keyword">local</span> Event = <span class="global">require</span>(<span class="string">"druid.event"</span>)
|
|
||||||
...
|
|
||||||
<span class="keyword">local</span> event = Event(callback)</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "is_empty"></a>
|
|
||||||
<strong>is_empty(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return true, if event not have handler
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
True if event not have handlers
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example"><span class="keyword">local</span> is_long_click_handler_not_exists = button.on_long_click:is_empty()</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "is_exist"></a>
|
|
||||||
<strong>is_exist(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return true, if event have at lease one handler
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
True if event have handlers
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example"><span class="keyword">local</span> is_long_click_handler_exists = button.on_long_click:is_exist()</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "is_subscribed"></a>
|
|
||||||
<strong>is_subscribed(self, callback, callback_context)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Check is event subscribed.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">callback</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
Callback itself
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">callback_context</span>
|
|
||||||
<span class="types"><span class="type">any</span> or <span class="type">nil</span></span>
|
|
||||||
Additional context as first param to callback call
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">boolean,</span></span>
|
|
||||||
number|nil @Is event subscribed, return index of callback in event as second param
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "subscribe"></a>
|
|
||||||
<strong>subscribe(self, callback, callback_context)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Subscribe callback on event
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">callback</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
Callback itself
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">callback_context</span>
|
|
||||||
<span class="types"><span class="type">any</span> or <span class="type">nil</span></span>
|
|
||||||
Additional context as first param to callback call, usually it's self
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
True if callback was subscribed
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example"><span class="keyword">local</span> <span class="keyword">function</span> on_long_callback(self)
|
|
||||||
<span class="global">print</span>(<span class="string">"Long click!"</span>)
|
|
||||||
<span class="keyword">end</span>
|
|
||||||
...
|
|
||||||
<span class="keyword">local</span> button = self.druid:new_button(<span class="string">"button"</span>, callback)
|
|
||||||
button.on_long_click:subscribe(on_long_callback, self)</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "trigger"></a>
|
|
||||||
<strong>trigger(self, ...)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Trigger the event and call all subscribed callbacks
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">...</span>
|
|
||||||
<span class="types"><span class="type">any</span></span>
|
|
||||||
All event params
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example"><span class="keyword">local</span> Event = <span class="global">require</span>(<span class="string">"druid.event"</span>)
|
|
||||||
...
|
|
||||||
<span class="keyword">local</span> event = Event()
|
|
||||||
event:trigger(<span class="string">"Param1"</span>, <span class="string">"Param2"</span>)</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "unsubscribe"></a>
|
|
||||||
<strong>unsubscribe(self, callback, callback_context)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Unsubscribe callback on event
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">callback</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
Callback itself
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">callback_context</span>
|
|
||||||
<span class="types"><span class="type">any</span> or <span class="type">nil</span></span>
|
|
||||||
Additional context as first param to callback call
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example"><span class="keyword">local</span> <span class="keyword">function</span> on_long_callback(self)
|
|
||||||
<span class="global">print</span>(<span class="string">"Long click!"</span>)
|
|
||||||
<span class="keyword">end</span>
|
|
||||||
...
|
|
||||||
button.on_long_click:unsubscribe(on_long_callback, self)</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>
|
|
File diff suppressed because it is too large
Load Diff
@ -1,788 +0,0 @@
|
|||||||
<!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="#Functions">Functions</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/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><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/Progress.html">Progress</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>DynamicGrid</code></h1>
|
|
||||||
<p>Component to handle placing components in row</p>
|
|
||||||
<p> <a href="https://insality.github.io/druid/druid/index.html?example=general_grid" target="_blank"><b>Example Link</b></a></p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#_get_side_vector">_get_side_vector(self, side, is_forward)</a></td>
|
|
||||||
<td class="summary">Return side vector to correct node shifting</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#add">add(self, node, index, shift_policy, is_instant)</a></td>
|
|
||||||
<td class="summary">Add new node to the grid</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#clear">clear(self)</a></td>
|
|
||||||
<td class="summary">Clear grid nodes array.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_all_pos">get_all_pos(self)</a></td>
|
|
||||||
<td class="summary">Return array of all node positions</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_borders">get_borders(self)</a></td>
|
|
||||||
<td class="summary">Return grid content borders</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_index_by_node">get_index_by_node(self, node)</a></td>
|
|
||||||
<td class="summary">Return grid index by node</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_offset">get_offset(self)</a></td>
|
|
||||||
<td class="summary">Return DynamicGrid offset, where DynamicGrid content starts.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_pos">get_pos(self, index, node, origin_index)</a></td>
|
|
||||||
<td class="summary">Return pos for grid node index</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_size">get_size(self, border)</a></td>
|
|
||||||
<td class="summary">Return grid content size</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#init">init(self, parent)</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/DynamicGrid.html#">DynamicGrid</a> constructor</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#remove">remove(self, index, shift_policy, is_instant)</a></td>
|
|
||||||
<td class="summary">Remove the item from the grid.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_position_function">set_position_function(self, callback)</a></td>
|
|
||||||
<td class="summary">Change set position function for grid nodes.</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<h2><a href="#Fields">Fields</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#border">border</a></td>
|
|
||||||
<td class="summary">The size of item content</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#first_index">first_index</a></td>
|
|
||||||
<td class="summary">The first index of node in grid</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#last_index">last_index</a></td>
|
|
||||||
<td class="summary">The last index of node in grid</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#node_size">node_size</a></td>
|
|
||||||
<td class="summary">Item size</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#nodes">nodes</a></td>
|
|
||||||
<td class="summary">List of all grid elements.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_add_item">on_add_item</a></td>
|
|
||||||
<td class="summary">On item add callback(self, node, index)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_change_items">on_change_items</a></td>
|
|
||||||
<td class="summary">On item add or remove callback(self, index)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_clear">on_clear</a></td>
|
|
||||||
<td class="summary">On grid clear callback(self)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_remove_item">on_remove_item</a></td>
|
|
||||||
<td class="summary">On item remove callback(self, index)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_update_positions">on_update_positions</a></td>
|
|
||||||
<td class="summary">On update item positions callback(self)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#parent">parent</a></td>
|
|
||||||
<td class="summary">Parent gui node</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "_get_side_vector"></a>
|
|
||||||
<strong>_get_side_vector(self, side, is_forward)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return side vector to correct node shifting
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">side</span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">is_forward</span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "add"></a>
|
|
||||||
<strong>add(self, node, index, shift_policy, is_instant)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Add new node to the grid
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DynamicGrid</span></span>
|
|
||||||
<a href="../modules/DynamicGrid.html#">DynamicGrid</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><span class="type">node</span></span>
|
|
||||||
Gui node
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">index</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
The node position. By default add as last node
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">shift_policy</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
How shift nodes, if required. Default: const.SHIFT.RIGHT
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">is_instant</span>
|
|
||||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
|
||||||
If true, update node positions instantly
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "clear"></a>
|
|
||||||
<strong>clear(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Clear grid nodes array. GUI nodes will be not deleted!
|
|
||||||
If you want to delete GUI nodes, use dynamic_grid.nodes array before grid:clear
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DynamicGrid</span></span>
|
|
||||||
<a href="../modules/DynamicGrid.html#">DynamicGrid</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">druid.dynamic_grid</span></span>
|
|
||||||
Current grid instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_all_pos"></a>
|
|
||||||
<strong>get_all_pos(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return array of all node positions
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DynamicGrid</span></span>
|
|
||||||
<a href="../modules/DynamicGrid.html#">DynamicGrid</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">vector3[]</span></span>
|
|
||||||
All grid node positions
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_borders"></a>
|
|
||||||
<strong>get_borders(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return grid content borders
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DynamicGrid</span></span>
|
|
||||||
<a href="../modules/DynamicGrid.html#">DynamicGrid</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
The grid content borders
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_index_by_node"></a>
|
|
||||||
<strong>get_index_by_node(self, node)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return grid index by node
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DynamicGrid</span></span>
|
|
||||||
<a href="../modules/DynamicGrid.html#">DynamicGrid</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><span class="type">node</span></span>
|
|
||||||
The gui node in the grid
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
The node index
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_offset"></a>
|
|
||||||
<strong>get_offset(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return DynamicGrid offset, where DynamicGrid content starts.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DynamicGrid</span></span>
|
|
||||||
<a href="../modules/DynamicGrid.html#">DynamicGrid</a> The DynamicGrid instance
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
The DynamicGrid offset
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_pos"></a>
|
|
||||||
<strong>get_pos(self, index, node, origin_index)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return pos for grid node index
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DynamicGrid</span></span>
|
|
||||||
<a href="../modules/DynamicGrid.html#">DynamicGrid</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">index</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
The grid element index
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><span class="type">node</span></span>
|
|
||||||
The node to be placed
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">origin_index</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
Index of nearby node
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
node position
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_size"></a>
|
|
||||||
<strong>get_size(self, border)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return grid content size
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DynamicGrid</span></span>
|
|
||||||
<a href="../modules/DynamicGrid.html#">DynamicGrid</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">border</span>
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
The grid content size
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "init"></a>
|
|
||||||
<strong>init(self, parent)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/DynamicGrid.html#">DynamicGrid</a> constructor
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DynamicGrid</span></span>
|
|
||||||
<a href="../modules/DynamicGrid.html#">DynamicGrid</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">parent</span>
|
|
||||||
<span class="types"><span class="type">node</span></span>
|
|
||||||
The gui node parent, where items will be placed
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "remove"></a>
|
|
||||||
<strong>remove(self, index, shift_policy, is_instant)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Remove the item from the grid. Note that gui node will be not deleted
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DynamicGrid</span></span>
|
|
||||||
<a href="../modules/DynamicGrid.html#">DynamicGrid</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">index</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
The grid node index to remove
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">shift_policy</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
How shift nodes, if required. Default: const.SHIFT.RIGHT
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">is_instant</span>
|
|
||||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
|
||||||
If true, update node positions instantly
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">node</span></span>
|
|
||||||
The deleted gui node from grid
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_position_function"></a>
|
|
||||||
<strong>set_position_function(self, callback)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Change set position function for grid nodes. It will call on
|
|
||||||
update poses on grid elements. Default: gui.set_position
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">DynamicGrid</span></span>
|
|
||||||
<a href="../modules/DynamicGrid.html#">DynamicGrid</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">callback</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
Function on node set position
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">druid.dynamic_grid</span></span>
|
|
||||||
Current grid instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "border"></a>
|
|
||||||
<strong>border</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The size of item content
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">border</span>
|
|
||||||
<span class="types"><span class="type">vector4</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "first_index"></a>
|
|
||||||
<strong>first_index</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The first index of node in grid
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">first_index</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "last_index"></a>
|
|
||||||
<strong>last_index</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The last index of node in grid
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">last_index</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "node_size"></a>
|
|
||||||
<strong>node_size</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Item size
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">node_size</span>
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "nodes"></a>
|
|
||||||
<strong>nodes</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
List of all grid elements. Contains from node, pos, size, pivot
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">nodes</span>
|
|
||||||
<span class="types"><span class="type">node[]</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_add_item"></a>
|
|
||||||
<strong>on_add_item</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On item add callback(self, node, index)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_add_item</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_change_items"></a>
|
|
||||||
<strong>on_change_items</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On item add or remove callback(self, index)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_change_items</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_clear"></a>
|
|
||||||
<strong>on_clear</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On grid clear callback(self)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_clear</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_remove_item"></a>
|
|
||||||
<strong>on_remove_item</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On item remove callback(self, index)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_remove_item</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_update_positions"></a>
|
|
||||||
<strong>on_update_positions</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On update item positions callback(self)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_update_positions</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "parent"></a>
|
|
||||||
<strong>parent</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Parent gui node
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">parent</span>
|
|
||||||
<span class="types"><span class="type">node</span></span>
|
|
||||||
|
|
||||||
</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>
|
|
@ -1,927 +0,0 @@
|
|||||||
<!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="#Functions">Functions</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/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><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/Progress.html">Progress</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>Helper</code></h1>
|
|
||||||
<p>Helper module with various usefull GUI functions.</p>
|
|
||||||
<p></p>
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example">local helper = require("druid.helper")
|
|
||||||
helper.centrate_nodes(0, node_1, node_2)
|
|
||||||
</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.add_array">helper.add_array(target, source)</a></td>
|
|
||||||
<td class="summary">Add all elements from source array to the target array</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.centrate_nodes">helper.centrate_nodes(margin, ...)</a></td>
|
|
||||||
<td class="summary">Centerate nodes by x position with margin.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.clamp">helper.clamp(a, min, max)</a></td>
|
|
||||||
<td class="summary">Clamp value between min and max</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.contains">helper.contains(t, value)</a></td>
|
|
||||||
<td class="summary">Check if value is in array and return index of it</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.deepcopy">helper.deepcopy(orig_table)</a></td>
|
|
||||||
<td class="summary">Make a copy table with all nested tables</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.distance">helper.distance(x1, y1, x2, y2)</a></td>
|
|
||||||
<td class="summary">Calculate distance between two points</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.get_border">helper.get_border(node, offset)</a></td>
|
|
||||||
<td class="summary">Distance from node position to his borders</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.get_closest_stencil_node">helper.get_closest_stencil_node(node)</a></td>
|
|
||||||
<td class="summary">Return closest non inverted clipping parent node for given node</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.get_gui_scale">helper.get_gui_scale()</a></td>
|
|
||||||
<td class="summary">Get current GUI scale for each side</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.get_pivot_offset">helper.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.get_scaled_size">helper.get_scaled_size(node)</a></td>
|
|
||||||
<td class="summary">Get node size adjusted by scale</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.get_scene_scale">helper.get_scene_scale(node, include_passed_node_scale)</a></td>
|
|
||||||
<td class="summary">Get cumulative parent's node scale</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.get_screen_aspect_koef">helper.get_screen_aspect_koef()</a></td>
|
|
||||||
<td class="summary">Get current screen stretch multiplier for each side</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.get_text_metrics_from_node">helper.get_text_metrics_from_node(text_node)</a></td>
|
|
||||||
<td class="summary">Get text metric from GUI node.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.insert_with_shift">helper.insert_with_shift(array, any, index, shift_policy)</a></td>
|
|
||||||
<td class="summary">Add value to array with shift policy</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.is_mobile">helper.is_mobile()</a></td>
|
|
||||||
<td class="summary">Check if device is native mobile (Android or iOS)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.is_multitouch_supported">helper.is_multitouch_supported()</a></td>
|
|
||||||
<td class="summary">Check if device is mobile and can support multitouch</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.is_web">helper.is_web()</a></td>
|
|
||||||
<td class="summary">Check if device is HTML5</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.is_web_mobile">helper.is_web_mobile()</a></td>
|
|
||||||
<td class="summary">Check if device is HTML5 mobile</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.lerp">helper.lerp(a, b, t)</a></td>
|
|
||||||
<td class="summary">Lerp between two values</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.remove_with_shift">helper.remove_with_shift(array, index, shift_policy)</a></td>
|
|
||||||
<td class="summary">Remove value from array with shift policy</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.round">helper.round(num, num_decimal_places)</a></td>
|
|
||||||
<td class="summary">Round number to specified decimal places</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.sign">helper.sign(val)</a></td>
|
|
||||||
<td class="summary">Return sign of value (-1, 0, 1)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.step">helper.step(current, target, step)</a></td>
|
|
||||||
<td class="summary">Move value from current to target value with step amount</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.table_to_string">helper.table_to_string(t)</a></td>
|
|
||||||
<td class="summary">Simple table to one-line string converter</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.add_array"></a>
|
|
||||||
<strong>helper.add_array(target, source)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Add all elements from source array to the target array
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">target</span>
|
|
||||||
<span class="types"><span class="type">any[]</span></span>
|
|
||||||
Array to put elements from source
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">source</span>
|
|
||||||
<span class="types"><span class="type">any[]</span> or <span class="type">nil</span></span>
|
|
||||||
The source array to get elements from
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">any[]</span></span>
|
|
||||||
The target array
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.centrate_nodes"></a>
|
|
||||||
<strong>helper.centrate_nodes(margin, ...)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Centerate nodes by x position with margin.
|
|
||||||
<p> This functions calculate total width of nodes and set position for each node.
|
|
||||||
The centrate will be around 0 x position.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">margin</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
Offset between nodes
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">...</span>
|
|
||||||
Gui nodes
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.clamp"></a>
|
|
||||||
<strong>helper.clamp(a, min, max)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Clamp value between min and max
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">a</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Value
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">min</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Min value
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">max</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Max value
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Clamped value
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.contains"></a>
|
|
||||||
<strong>helper.contains(t, value)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Check if value is in array and return index of it
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">t</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
|
||||||
Array
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">value</span>
|
|
||||||
Value
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
Index of value or nil
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.deepcopy"></a>
|
|
||||||
<strong>helper.deepcopy(orig_table)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Make a copy table with all nested tables
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">orig_table</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
|
||||||
Original table
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
|
||||||
Copy of original table
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.distance"></a>
|
|
||||||
<strong>helper.distance(x1, y1, x2, y2)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Calculate distance between two points
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">x1</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
First point x
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">y1</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
First point y
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">x2</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Second point x
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">y2</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Second point y
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Distance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.get_border"></a>
|
|
||||||
<strong>helper.get_border(node, offset)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Distance from node position to his borders
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><span class="type">node</span></span>
|
|
||||||
GUI node
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">offset</span>
|
|
||||||
<span class="types"><span class="type">vector3</span> or <span class="type">nil</span></span>
|
|
||||||
Offset from node position. Pass current node position to get non relative border values
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">vector4</span></span>
|
|
||||||
Vector4 with border values (left, top, right, down)
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.get_closest_stencil_node"></a>
|
|
||||||
<strong>helper.get_closest_stencil_node(node)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return closest non inverted clipping parent node for given node
|
|
||||||
|
|
||||||
|
|
||||||
<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">node</span> or <span class="type">nil</span></span>
|
|
||||||
The closest stencil node or nil
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.get_gui_scale"></a>
|
|
||||||
<strong>helper.get_gui_scale()</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Get current GUI scale for each side
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
<li>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
scale_x</li>
|
|
||||||
<li>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
scale_y</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.get_pivot_offset"></a>
|
|
||||||
<strong>helper.get_pivot_offset(pivot)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Get node offset for given GUI pivot.
|
|
||||||
<p> Offset shown in [-0.5 .. 0.5] range, where -0.5 is left or bottom, 0.5 is right or top.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">pivot</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
The gui.PIVOT_* constant
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
Vector offset with [-0.5..0.5] values
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.get_scaled_size"></a>
|
|
||||||
<strong>helper.get_scaled_size(node)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Get node size adjusted by scale
|
|
||||||
|
|
||||||
|
|
||||||
<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">vector3</span></span>
|
|
||||||
Scaled size
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.get_scene_scale"></a>
|
|
||||||
<strong>helper.get_scene_scale(node, include_passed_node_scale)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Get cumulative parent's node scale
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><span class="type">node</span></span>
|
|
||||||
Gui node
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">include_passed_node_scale</span>
|
|
||||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
|
||||||
True if add current node scale to result
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
The scene node scale
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.get_screen_aspect_koef"></a>
|
|
||||||
<strong>helper.get_screen_aspect_koef()</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Get current screen stretch multiplier for each side
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
<li>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
stretch_x</li>
|
|
||||||
<li>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
stretch_y</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.get_text_metrics_from_node"></a>
|
|
||||||
<strong>helper.get_text_metrics_from_node(text_node)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Get text metric from GUI node.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">text_node</span>
|
|
||||||
<span class="types"><span class="type">node</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">GUITextMetrics</span></span>
|
|
||||||
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example"><span class="global">type</span> GUITextMetrics = {
|
|
||||||
width: number,
|
|
||||||
height: number,
|
|
||||||
max_ascent: number,
|
|
||||||
max_descent: number
|
|
||||||
}</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.insert_with_shift"></a>
|
|
||||||
<strong>helper.insert_with_shift(array, any, index, shift_policy)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Add value to array with shift policy Shift policy can be: left, right, no_shift
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">array</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
|
||||||
Array
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">any</span>
|
|
||||||
Item to insert
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">index</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
Index to insert. If nil, item will be inserted at the end of array
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">shift_policy</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
The druid_const.SHIFT.* constant
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">any</span></span>
|
|
||||||
Inserted item
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.is_mobile"></a>
|
|
||||||
<strong>helper.is_mobile()</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Check if device is native mobile (Android or iOS)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
Is mobile
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.is_multitouch_supported"></a>
|
|
||||||
<strong>helper.is_multitouch_supported()</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Check if device is mobile and can support multitouch
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
Is multitouch supported
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.is_web"></a>
|
|
||||||
<strong>helper.is_web()</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Check if device is HTML5
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
Is web
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.is_web_mobile"></a>
|
|
||||||
<strong>helper.is_web_mobile()</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Check if device is HTML5 mobile
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
Is web mobile
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.lerp"></a>
|
|
||||||
<strong>helper.lerp(a, b, t)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Lerp between two values
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">a</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
First value
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">b</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Second value
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">t</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Lerp amount
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Lerped value
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.remove_with_shift"></a>
|
|
||||||
<strong>helper.remove_with_shift(array, index, shift_policy)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Remove value from array with shift policy Shift policy can be: left, right, no_shift
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">array</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
|
||||||
Array
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">index</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
Index to remove. If nil, item will be removed from the end of array
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">shift_policy</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
The druid_const.SHIFT.* constant
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">any</span></span>
|
|
||||||
Removed item
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.round"></a>
|
|
||||||
<strong>helper.round(num, num_decimal_places)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Round number to specified decimal places
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">num</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Number
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">num_decimal_places</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
Decimal places
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Rounded number
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.sign"></a>
|
|
||||||
<strong>helper.sign(val)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return sign of value (-1, 0, 1)
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">val</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Value
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Sign
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.step"></a>
|
|
||||||
<strong>helper.step(current, target, step)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Move value from current to target value with step amount
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">current</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Current value
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">target</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Target value
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">step</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Step amount
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
New value
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.table_to_string"></a>
|
|
||||||
<strong>helper.table_to_string(t)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Simple table to one-line string converter
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">t</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</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>
|
|
@ -1,373 +0,0 @@
|
|||||||
<!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="#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/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><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/Progress.html">Progress</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>Hotkey</code></h1>
|
|
||||||
<p>Druid hotkey component</p>
|
|
||||||
<p> <a href="https://insality.github.io/druid/druid/index.html?example=general_hotkey" target="_blank"><b>Example Link</b></a></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">The <a href="../modules/Hotkey.html#">Hotkey</a> constructor</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_repeat">set_repeat(self, is_enabled_repeated)</a></td>
|
|
||||||
<td class="summary">If true, the callback will be triggered on action.repeated</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_hotkey_pressed">on_hotkey_pressed</a></td>
|
|
||||||
<td class="summary">On hotkey released callback(self, argument)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_hotkey_released">on_hotkey_released</a></td>
|
|
||||||
<td class="summary">On hotkey released callback(self, argument)</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">any</span> or <span class="type">nil</span></span>
|
|
||||||
The argument to pass into the callback function
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">Hotkey</span></span>
|
|
||||||
Current instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "init"></a>
|
|
||||||
<strong>init(self, keys, callback, callback_argument)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/Hotkey.html#">Hotkey</a> constructor
|
|
||||||
|
|
||||||
|
|
||||||
<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">any</span> or <span class="type">nil</span></span>
|
|
||||||
The argument to pass into the callback function
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_repeat"></a>
|
|
||||||
<strong>set_repeat(self, is_enabled_repeated)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
If true, the callback will be triggered on action.repeated
|
|
||||||
|
|
||||||
|
|
||||||
<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">is_enabled_repeated</span>
|
|
||||||
<span class="types"><span class="type">bool</span></span>
|
|
||||||
The flag value
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">Hotkey</span></span>
|
|
||||||
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</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> or <span class="type">nil</span></span>
|
|
||||||
|
|
||||||
</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_hotkey_pressed"></a>
|
|
||||||
<strong>on_hotkey_pressed</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On hotkey released callback(self, argument)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_hotkey_pressed</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_hotkey_released"></a>
|
|
||||||
<strong>on_hotkey_released</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On hotkey released callback(self, argument)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_hotkey_released</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>
|
|
@ -1,469 +0,0 @@
|
|||||||
<!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="#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/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><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/Progress.html">Progress</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>Hover</code></h1>
|
|
||||||
<p>Component to handle hover node interaction</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, on_hover_callback, on_mouse_hover)</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/Hover.html#">Hover</a> constructor</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#is_enabled">is_enabled(self)</a></td>
|
|
||||||
<td class="summary">Return current hover enabled state</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#is_hovered">is_hovered(self)</a></td>
|
|
||||||
<td class="summary">Return current hover state.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#is_mouse_hovered">is_mouse_hovered(self)</a></td>
|
|
||||||
<td class="summary">Return current hover state.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_click_zone">set_click_zone(self, zone)</a></td>
|
|
||||||
<td class="summary">Strict hover click area.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_enabled">set_enabled(self, state)</a></td>
|
|
||||||
<td class="summary">Set enable state of hover component.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_hover">set_hover(self, state)</a></td>
|
|
||||||
<td class="summary">Set hover state</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_mouse_hover">set_mouse_hover(self, state)</a></td>
|
|
||||||
<td class="summary">Set mouse hover state</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="#node">node</a></td>
|
|
||||||
<td class="summary">Hover node</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_hover">on_hover</a></td>
|
|
||||||
<td class="summary">On hover callback(self, state, hover_instance)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_mouse_hover">on_mouse_hover</a></td>
|
|
||||||
<td class="summary">On mouse hover callback(self, state, hover_instance)</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_hover_callback, on_mouse_hover)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/Hover.html#">Hover</a> constructor
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Hover</span></span>
|
|
||||||
<a href="../modules/Hover.html#">Hover</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Hover.html#node">node</a></span>
|
|
||||||
Gui node
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">on_hover_callback</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
Hover callback
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">on_mouse_hover</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
On mouse hover callback
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "is_enabled"></a>
|
|
||||||
<strong>is_enabled(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return current hover enabled state
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Hover</span></span>
|
|
||||||
<a href="../modules/Hover.html#">Hover</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
The hover enabled state
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "is_hovered"></a>
|
|
||||||
<strong>is_hovered(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return current hover state. True if touch action was on the node at current time
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Hover</span></span>
|
|
||||||
<a href="../modules/Hover.html#">Hover</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
The current hovered state
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "is_mouse_hovered"></a>
|
|
||||||
<strong>is_mouse_hovered(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return current hover state. True if nil action_id (usually desktop mouse) was on the node at current time
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Hover</span></span>
|
|
||||||
<a href="../modules/Hover.html#">Hover</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
The current hovered state
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_click_zone"></a>
|
|
||||||
<strong>set_click_zone(self, zone)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Strict hover click area. Useful for
|
|
||||||
no click events outside stencil node
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Hover</span></span>
|
|
||||||
<a href="../modules/Hover.html#">Hover</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">zone</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Hover.html#node">node</a>, <a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">nil</span></span>
|
|
||||||
Gui node
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_enabled"></a>
|
|
||||||
<strong>set_enabled(self, state)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set enable state of hover component.
|
|
||||||
If hover is not enabled, it will not generate
|
|
||||||
any hover events
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Hover</span></span>
|
|
||||||
<a href="../modules/Hover.html#">Hover</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">state</span>
|
|
||||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
|
||||||
The hover enabled state
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_hover"></a>
|
|
||||||
<strong>set_hover(self, state)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set hover state
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Hover</span></span>
|
|
||||||
<a href="../modules/Hover.html#">Hover</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">state</span>
|
|
||||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
|
||||||
The hover state
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_mouse_hover"></a>
|
|
||||||
<strong>set_mouse_hover(self, state)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set mouse hover state
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Hover</span></span>
|
|
||||||
<a href="../modules/Hover.html#">Hover</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">state</span>
|
|
||||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
|
||||||
The mouse hover state
|
|
||||||
</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">ON_HOVER_CURSOR</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
Mouse hover style on node hover
|
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">ON_MOUSE_HOVER_CURSOR</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
Mouse hover style on node mouse hover
|
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "node"></a>
|
|
||||||
<strong>node</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Hover node
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Hover.html#node">node</a></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_hover"></a>
|
|
||||||
<strong>on_hover</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On hover callback(self, state, hover_instance)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_hover</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_mouse_hover"></a>
|
|
||||||
<strong>on_mouse_hover</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On mouse hover callback(self, state, hover_instance)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_mouse_hover</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>
|
|
File diff suppressed because it is too large
Load Diff
@ -1,380 +0,0 @@
|
|||||||
<!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="#Functions">Functions</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/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><strong>LangText</strong></li>
|
|
||||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
|
||||||
<li><a href="../modules/Progress.html">Progress</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>LangText</code></h1>
|
|
||||||
<p>Component to wrap over GUI Text nodes with localization helpers
|
|
||||||
<p> <b># Overview #</b>
|
|
||||||
<p> • The initialization of druid.set_text_function is required to enable localization
|
|
||||||
using the localization ID.</p>
|
|
||||||
<p>
|
|
||||||
<p> • The LangText component supports up to 7 string format parameters.
|
|
||||||
This limitation exists due to certain issues with using ... arguments.
|
|
||||||
<p> <b># Notes #</b>
|
|
||||||
<p> <a href="https://insality.github.io/druid/druid/index.html?example=texts_lang_text" target="_blank"><b>Example Link</b></a></p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#format">format(self, a, b, c, d, e, f, g)</a></td>
|
|
||||||
<td class="summary">Format string with new text params on localized text</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#init">init(self, node, locale_id, adjust_type)</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/LangText.html#">LangText</a> constructor</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_to">set_to(self, text)</a></td>
|
|
||||||
<td class="summary">Setup raw text to lang_text component</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#translate">translate(self, locale_id, a, b, c, d, e, f, g)</a></td>
|
|
||||||
<td class="summary">Translate the text by locale_id</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<h2><a href="#Fields">Fields</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#node">node</a></td>
|
|
||||||
<td class="summary">Text node</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_change">on_change</a></td>
|
|
||||||
<td class="summary">On change text callback</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#text">text</a></td>
|
|
||||||
<td class="summary">The text component</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "format"></a>
|
|
||||||
<strong>format(self, a, b, c, d, e, f, g)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Format string with new text params on localized text
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">LangText</span></span>
|
|
||||||
<a href="../modules/LangText.html#">LangText</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">a</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">nil</span></span>
|
|
||||||
Optional param to string.format
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">b</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">nil</span></span>
|
|
||||||
Optional param to string.format
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">c</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">nil</span></span>
|
|
||||||
Optional param to string.format
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">d</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">nil</span></span>
|
|
||||||
Optional param to string.format
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">e</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">nil</span></span>
|
|
||||||
Optional param to string.format
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">f</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">nil</span></span>
|
|
||||||
Optional param to string.format
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">g</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">nil</span></span>
|
|
||||||
Optional param to string.format
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">LangText</span></span>
|
|
||||||
Current instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "init"></a>
|
|
||||||
<strong>init(self, node, locale_id, adjust_type)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/LangText.html#">LangText</a> constructor
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">LangText</span></span>
|
|
||||||
<a href="../modules/LangText.html#">LangText</a>
|
|
||||||
</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 <a class="type" href="../modules/LangText.html#node">node</a></span>
|
|
||||||
The node_id or gui.get_node(node_id)
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">locale_id</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">nil</span></span>
|
|
||||||
Default locale id or text from node as default
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">adjust_type</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">nil</span></span>
|
|
||||||
Adjust type for text. By default is DOWNSCALE. Look const.TEXT_ADJUST for reference
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_to"></a>
|
|
||||||
<strong>set_to(self, text)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Setup raw text to lang_text component
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">LangText</span></span>
|
|
||||||
<a href="../modules/LangText.html#">LangText</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">text</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
Text for text node
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">LangText</span></span>
|
|
||||||
Current instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "translate"></a>
|
|
||||||
<strong>translate(self, locale_id, a, b, c, d, e, f, g)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Translate the text by locale_id
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">LangText</span></span>
|
|
||||||
<a href="../modules/LangText.html#">LangText</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">locale_id</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
Locale id
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">a</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">nil</span></span>
|
|
||||||
Optional param to string.format
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">b</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">nil</span></span>
|
|
||||||
Optional param to string.format
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">c</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">nil</span></span>
|
|
||||||
Optional param to string.format
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">d</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">nil</span></span>
|
|
||||||
Optional param to string.format
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">e</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">nil</span></span>
|
|
||||||
Optional param to string.format
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">f</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">nil</span></span>
|
|
||||||
Optional param to string.format
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">g</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">nil</span></span>
|
|
||||||
Optional param to string.format
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">LangText</span></span>
|
|
||||||
Current instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "node"></a>
|
|
||||||
<strong>node</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Text node
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/LangText.html#node">node</a></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_change"></a>
|
|
||||||
<strong>on_change</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On change text callback
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_change</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "text"></a>
|
|
||||||
<strong>text</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The text component
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">text</span>
|
|
||||||
<span class="types"><span class="type">Text</span></span>
|
|
||||||
<a href="../modules/Text.html#">Text</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>
|
|
@ -1,147 +0,0 @@
|
|||||||
<!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><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/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><strong>Layout</strong></li>
|
|
||||||
<li><a href="../modules/Progress.html">Progress</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>Layout</code></h1>
|
|
||||||
<p>Layout management on node</p>
|
|
||||||
<p> <a href="https://insality.github.io/druid/druid/index.html?example=general_layout" target="_blank"><b>Example Link</b></a></p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Fields">Fields</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#mode">mode</a></td>
|
|
||||||
<td class="summary">Current layout mode</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#node">node</a></td>
|
|
||||||
<td class="summary">Layout node</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "mode"></a>
|
|
||||||
<strong>mode</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Current layout mode
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<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>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "node"></a>
|
|
||||||
<strong>node</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Layout node
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Layout.html#node">node</a></span>
|
|
||||||
|
|
||||||
</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>
|
|
@ -1,299 +0,0 @@
|
|||||||
<!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="#Functions">Functions</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/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><strong>PinKnob</strong></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>PinKnob</code></h1>
|
|
||||||
<p>Druid pin knob custom component.</p>
|
|
||||||
<p>
|
|
||||||
It's simple rotating input element</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#init">init(self, callback, template, nodes)</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/PinKnob.html#">PinKnob</a> constructor</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_angle">set_angle(self, cur_value, min, max)</a></td>
|
|
||||||
<td class="summary">Set current and min/max angles for component</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_friction">set_friction(self, value)</a></td>
|
|
||||||
<td class="summary">Set current and min/max angles for component</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<h2><a href="#Fields">Fields</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#druid">druid</a></td>
|
|
||||||
<td class="summary">The component druid instance</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#is_drag">is_drag</a></td>
|
|
||||||
<td class="summary">Is currently under user control</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#node">node</a></td>
|
|
||||||
<td class="summary">The pin node</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, callback, template, nodes)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/PinKnob.html#">PinKnob</a> constructor
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">PinKnob</span></span>
|
|
||||||
<a href="../modules/PinKnob.html#">PinKnob</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">callback</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
Callback(self, value) on value changed
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">template</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
The template string name
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">nodes</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
|
||||||
Nodes table from gui.clone_tree
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_angle"></a>
|
|
||||||
<strong>set_angle(self, cur_value, min, max)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set current and min/max angles for component
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">PinKnob</span></span>
|
|
||||||
<a href="../modules/PinKnob.html#">PinKnob</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">cur_value</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
The new value for pin knob
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">min</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
The minimum value for pin knob
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">max</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
The maximum value for pin knob
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">PinKnob</span></span>
|
|
||||||
<a href="../modules/PinKnob.html#">PinKnob</a>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_friction"></a>
|
|
||||||
<strong>set_friction(self, value)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set current and min/max angles for component
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">PinKnob</span></span>
|
|
||||||
<a href="../modules/PinKnob.html#">PinKnob</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">value</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
The spin speed multiplier. Default: 1
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">PinKnob</span></span>
|
|
||||||
<a href="../modules/PinKnob.html#">PinKnob</a>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "druid"></a>
|
|
||||||
<strong>druid</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The component druid instance
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">druid</span>
|
|
||||||
<span class="types"><span class="type">DruidInstance</span></span>
|
|
||||||
<a href="../modules/DruidInstance.html#">DruidInstance</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "is_drag"></a>
|
|
||||||
<strong>is_drag</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Is currently under user control
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">is_drag</span>
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "node"></a>
|
|
||||||
<strong>node</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The pin node
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/PinKnob.html#node">node</a></span>
|
|
||||||
|
|
||||||
</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>
|
|
@ -1,569 +0,0 @@
|
|||||||
<!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="#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/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><strong>Progress</strong></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>Progress</code></h1>
|
|
||||||
<p>Druid component to handle the progress bars.</p>
|
|
||||||
<p>
|
|
||||||
<b># Overview #</b>
|
|
||||||
<p> <b># Notes #</b>
|
|
||||||
<p> • Progress Node should be fully filled in your GUI scene node. It will be the progress maximum size
|
|
||||||
<p> • Progress correct working with Slice9 nodes, it trying to set size by _set_size_ first, if it is not possible, it set up sizing via _set_scale_
|
|
||||||
<p> • Progress bar can fill only by vertical or horizontal size. If you want make diagonal progress bar, just rotate node in GUI scene
|
|
||||||
<p> • If you have glitchy or dark texture bug with progress bar, try to disable mipmaps in your texture profiles
|
|
||||||
<p>
|
|
||||||
<a href="https://insality.github.io/druid/druid/index.html?example=general_progress_bar" target="_blank"><b>Example Link</b></a></p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#empty">empty(self)</a></td>
|
|
||||||
<td class="summary">Empty a progress bar</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#fill">fill(self)</a></td>
|
|
||||||
<td class="summary">Fill a progress bar and stop progress animation</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get">get(self)</a></td>
|
|
||||||
<td class="summary">Return current progress bar value</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#init">init(self, node, key, init_value)</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/Progress.html#">Progress</a> constructor</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>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_to">set_to(self, to)</a></td>
|
|
||||||
<td class="summary">Instant fill progress bar to value</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#to">to(self, to, callback)</a></td>
|
|
||||||
<td class="summary">Start animation of a progress bar</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="#key">key</a></td>
|
|
||||||
<td class="summary">The progress bar direction.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#max_size">max_size</a></td>
|
|
||||||
<td class="summary">Maximum size of progress bar</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#node">node</a></td>
|
|
||||||
<td class="summary">Progress bar fill node</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_change">on_change</a></td>
|
|
||||||
<td class="summary">On progress bar change callback(self, new_value)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#scale">scale</a></td>
|
|
||||||
<td class="summary">Current progress bar scale</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#size">size</a></td>
|
|
||||||
<td class="summary">Current progress bar size</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#slice">slice</a></td>
|
|
||||||
<td class="summary">Progress bar slice9 settings</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "empty"></a>
|
|
||||||
<strong>empty(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Empty a progress bar
|
|
||||||
|
|
||||||
|
|
||||||
<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>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "fill"></a>
|
|
||||||
<strong>fill(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Fill a progress bar and stop progress animation
|
|
||||||
|
|
||||||
|
|
||||||
<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>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get"></a>
|
|
||||||
<strong>get(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return current progress bar value
|
|
||||||
|
|
||||||
|
|
||||||
<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>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "init"></a>
|
|
||||||
<strong>init(self, node, key, init_value)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/Progress.html#">Progress</a> constructor
|
|
||||||
|
|
||||||
|
|
||||||
<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">node</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="../modules/Progress.html#node">node</a></span>
|
|
||||||
Node name or GUI Node itself.
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">key</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
Progress bar direction: const.SIDE.X or const.SIDE.Y
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">init_value</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
Initial value of progress bar. Default: 1
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</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>
|
|
||||||
<strong>set_steps(self, steps, callback)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set points on progress bar to fire the callback
|
|
||||||
|
|
||||||
|
|
||||||
<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">steps</span>
|
|
||||||
<span class="types"><span class="type">number[]</span></span>
|
|
||||||
Array of progress bar values
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">callback</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
Callback on intersect step value
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example">progress:set_steps({<span class="number">0</span>, <span class="number">0.3</span>, <span class="number">0.6</span>, <span class="number">1</span>}, <span class="keyword">function</span>(self, step) <span class="keyword">end</span>)</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_to"></a>
|
|
||||||
<strong>set_to(self, to)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Instant fill progress bar to value
|
|
||||||
|
|
||||||
|
|
||||||
<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">to</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Progress bar value, from 0 to 1
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "to"></a>
|
|
||||||
<strong>to(self, to, callback)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Start animation of a progress bar
|
|
||||||
|
|
||||||
|
|
||||||
<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">to</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
value between 0..1
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">callback</span>
|
|
||||||
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
|
||||||
Callback on animation ends
|
|
||||||
</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">SPEED</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
Progress bas fill rate. More -> faster. Default: 5
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">MIN_DELTA</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
Minimum step to fill progress bar. Default: 0.005
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "key"></a>
|
|
||||||
<strong>key</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The progress bar direction.
|
|
||||||
<p> The values are: "x" or "y". (const.SIDE.X or const.SIDE.Y)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">key</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "max_size"></a>
|
|
||||||
<strong>max_size</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Maximum size of progress bar
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">max_size</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "node"></a>
|
|
||||||
<strong>node</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Progress bar fill node
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Progress.html#node">node</a></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_change"></a>
|
|
||||||
<strong>on_change</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On progress bar change callback(self, new_value)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_change</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "scale"></a>
|
|
||||||
<strong>scale</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Current progress bar scale
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">scale</span>
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "size"></a>
|
|
||||||
<strong>size</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Current progress bar size
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">size</span>
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "slice"></a>
|
|
||||||
<strong>slice</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Progress bar slice9 settings
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">slice</span>
|
|
||||||
<span class="types"><span class="type">vector4</span></span>
|
|
||||||
|
|
||||||
</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>
|
|
@ -1,259 +0,0 @@
|
|||||||
<!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="#Functions">Functions</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/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/Progress.html">Progress</a></li>
|
|
||||||
<li><strong>RadioGroup</strong></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>RadioGroup</code></h1>
|
|
||||||
<p>Radio group module</p>
|
|
||||||
<p> <a href="https://insality.github.io/druid/druid/index.html?example=general_checkboxes" target="_blank"><b>Example Link</b></a></p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_state">get_state(self)</a></td>
|
|
||||||
<td class="summary">Return radio group state</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#init">init(self, nodes, callback, click_nodes)</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/RadioGroup.html#">RadioGroup</a> constructor</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_state">set_state(self, index, is_instant)</a></td>
|
|
||||||
<td class="summary">Set radio group state</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<h2><a href="#Fields">Fields</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#checkboxes">checkboxes</a></td>
|
|
||||||
<td class="summary">Array of checkbox components</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_radio_click">on_radio_click</a></td>
|
|
||||||
<td class="summary">On any checkbox click</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "get_state"></a>
|
|
||||||
<strong>get_state(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return radio group state
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">RadioGroup</span></span>
|
|
||||||
<a href="../modules/RadioGroup.html#">RadioGroup</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Index in radio group
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "init"></a>
|
|
||||||
<strong>init(self, nodes, callback, click_nodes)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/RadioGroup.html#">RadioGroup</a> constructor
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">RadioGroup</span></span>
|
|
||||||
<a href="../modules/RadioGroup.html#">RadioGroup</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">nodes</span>
|
|
||||||
<span class="types"><span class="type">node[]</span></span>
|
|
||||||
Array of gui node
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">callback</span>
|
|
||||||
<span class="types"><span class="type">function</span></span>
|
|
||||||
Radio callback
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">click_nodes</span>
|
|
||||||
<span class="types"><span class="type">node[]</span> or <span class="type">nil</span></span>
|
|
||||||
Array of trigger nodes, by default equals to nodes. Default - nodes
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_state"></a>
|
|
||||||
<strong>set_state(self, index, is_instant)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set radio group state
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">RadioGroup</span></span>
|
|
||||||
<a href="../modules/RadioGroup.html#">RadioGroup</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">index</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Index in radio group
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">is_instant</span>
|
|
||||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
|
||||||
If is instant state change
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "checkboxes"></a>
|
|
||||||
<strong>checkboxes</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Array of checkbox components
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">checkboxes</span>
|
|
||||||
<span class="types"><span class="type">Checkbox[]</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_radio_click"></a>
|
|
||||||
<strong>on_radio_click</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On any checkbox click
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_radio_click</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>
|
|
@ -1,567 +0,0 @@
|
|||||||
<!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="#Functions">Functions</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/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/Progress.html">Progress</a></li>
|
|
||||||
<li><strong>RichInput</strong></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>RichInput</code></h1>
|
|
||||||
<p>Druid Rich Input custom component.</p>
|
|
||||||
<p>
|
|
||||||
It's wrapper on Input component with cursor and placeholder text</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_text">get_text(self)</a></td>
|
|
||||||
<td class="summary">Set input field text</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#init">init(self, template, nodes)</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/RichInput.html#">RichInput</a> constructor</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#select">select(self)</a></td>
|
|
||||||
<td class="summary">Select input field</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_allowed_characters">set_allowed_characters(self, characters)</a></td>
|
|
||||||
<td class="summary">Set allowed charaters for input field.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_font">set_font(self, font)</a></td>
|
|
||||||
<td class="summary">Set input field font</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_placeholder">set_placeholder(self, placeholder_text)</a></td>
|
|
||||||
<td class="summary">Set placeholder text</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_text">set_text(self, text)</a></td>
|
|
||||||
<td class="summary">Set input field text</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<h2><a href="#Fields">Fields</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#cursor">cursor</a></td>
|
|
||||||
<td class="summary">On input field text change to empty string callback(self, input_text)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#cursor_position">cursor_position</a></td>
|
|
||||||
<td class="summary">On input field text change to empty string callback(self, input_text)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#cursor_text">cursor_text</a></td>
|
|
||||||
<td class="summary">On input field text change to empty string callback(self, input_text)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#drag">drag</a></td>
|
|
||||||
<td class="summary">On input field text change to empty string callback(self, input_text)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#druid">druid</a></td>
|
|
||||||
<td class="summary">The component druid instance</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#input">input</a></td>
|
|
||||||
<td class="summary">On input field text change callback(self, input_text)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#input_text">input_text</a></td>
|
|
||||||
<td class="summary">On input field text change to empty string callback(self, input_text)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#placeholder">placeholder</a></td>
|
|
||||||
<td class="summary">On input field text change to empty string callback(self, input_text)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#root">root</a></td>
|
|
||||||
<td class="summary">Root node</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#text_position">text_position</a></td>
|
|
||||||
<td class="summary">On input field text change to empty string callback(self, input_text)</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "get_text"></a>
|
|
||||||
<strong>get_text(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set input field text
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">RichInput</span></span>
|
|
||||||
<a href="../modules/RichInput.html#">RichInput</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "init"></a>
|
|
||||||
<strong>init(self, template, nodes)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/RichInput.html#">RichInput</a> constructor
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">RichInput</span></span>
|
|
||||||
<a href="../modules/RichInput.html#">RichInput</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">template</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
The template string name
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">nodes</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
|
||||||
Nodes table from gui.clone_tree
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "select"></a>
|
|
||||||
<strong>select(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Select input field
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">RichInput</span></span>
|
|
||||||
<a href="../modules/RichInput.html#">RichInput</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_allowed_characters"></a>
|
|
||||||
<strong>set_allowed_characters(self, characters)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set allowed charaters for input field.
|
|
||||||
See: https://defold.com/ref/stable/string/
|
|
||||||
ex: [%a%d] for alpha and numeric
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">RichInput</span></span>
|
|
||||||
<a href="../modules/RichInput.html#">RichInput</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">characters</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
Regulax exp. for validate user input
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">RichInput</span></span>
|
|
||||||
Current instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_font"></a>
|
|
||||||
<strong>set_font(self, font)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set input field font
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">RichInput</span></span>
|
|
||||||
<a href="../modules/RichInput.html#">RichInput</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">font</span>
|
|
||||||
<span class="types"><span class="type">hash</span></span>
|
|
||||||
The font hash
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">druid.input</span></span>
|
|
||||||
Current input instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_placeholder"></a>
|
|
||||||
<strong>set_placeholder(self, placeholder_text)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set placeholder text
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">RichInput</span></span>
|
|
||||||
<a href="../modules/RichInput.html#">RichInput</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">placeholder_text</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
The placeholder text
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_text"></a>
|
|
||||||
<strong>set_text(self, text)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set input field text
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">RichInput</span></span>
|
|
||||||
<a href="../modules/RichInput.html#">RichInput</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">text</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
The input text
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">druid.input</span></span>
|
|
||||||
Current input instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "cursor"></a>
|
|
||||||
<strong>cursor</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On input field text change to empty string callback(self, input_text)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">cursor</span>
|
|
||||||
<span class="types"><span class="type">node</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "cursor_position"></a>
|
|
||||||
<strong>cursor_position</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On input field text change to empty string callback(self, input_text)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">cursor_position</span>
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "cursor_text"></a>
|
|
||||||
<strong>cursor_text</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On input field text change to empty string callback(self, input_text)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">cursor_text</span>
|
|
||||||
<span class="types"><span class="type">node</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "drag"></a>
|
|
||||||
<strong>drag</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On input field text change to empty string callback(self, input_text)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">drag</span>
|
|
||||||
<span class="types"><span class="type">druid.drag</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "druid"></a>
|
|
||||||
<strong>druid</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The component druid instance
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">druid</span>
|
|
||||||
<span class="types"><span class="type">DruidInstance</span></span>
|
|
||||||
<a href="../modules/DruidInstance.html#">DruidInstance</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "input"></a>
|
|
||||||
<strong>input</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On input field text change callback(self, input_text)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">input</span>
|
|
||||||
<span class="types"><span class="type">Input</span></span>
|
|
||||||
<a href="../modules/Input.html#">Input</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "input_text"></a>
|
|
||||||
<strong>input_text</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On input field text change to empty string callback(self, input_text)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">input_text</span>
|
|
||||||
<span class="types"><span class="type">druid.text</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "placeholder"></a>
|
|
||||||
<strong>placeholder</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On input field text change to empty string callback(self, input_text)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">placeholder</span>
|
|
||||||
<span class="types"><span class="type">druid.text</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "root"></a>
|
|
||||||
<strong>root</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Root node
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">root</span>
|
|
||||||
<span class="types"><span class="type">node</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "text_position"></a>
|
|
||||||
<strong>text_position</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On input field text change to empty string callback(self, input_text)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">text_position</span>
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
|
|
||||||
</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>
|
|
@ -1,560 +0,0 @@
|
|||||||
<!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="#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/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/Progress.html">Progress</a></li>
|
|
||||||
<li><a href="../modules/RichInput.html">RichInput</a></li>
|
|
||||||
<li><strong>RichText</strong></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>RichText</code></h1>
|
|
||||||
<p>Druid Rich Text Custom Component.</p>
|
|
||||||
<p>
|
|
||||||
<b># Overview #</b>
|
|
||||||
<p> This custom component is inspired by <a href="https://github.com/britzl/defold-richtext" target="_blank">defold-richtext</a> by britzl.
|
|
||||||
It uses a similar syntax for tags but currently supports fewer tags.
|
|
||||||
<p> Create Rich Text on your GUI Text Node. All properties of the text node will be used as default for the text.
|
|
||||||
<p> <b># Notes #</b>
|
|
||||||
<p> • Nested tags are supported
|
|
||||||
<p> <a href="https://insality.github.io/druid/druid/index.html?example=custom_rich_text" target="_blank"><b>Example Link</b></a></p>
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><pre class="example">local RichText = require("druid.custom.rich_text.rich_text")
|
|
||||||
...
|
|
||||||
self.rich_text = self.druid:new(RichText, "rich_text")
|
|
||||||
self.rich_text:set_text("Hello, Druid Rich Text!")
|
|
||||||
</pre></li>
|
|
||||||
<li><pre class="example">type druid.rich_text.word = {
|
|
||||||
node: Node,
|
|
||||||
relative_scale: number,
|
|
||||||
color: vector4,
|
|
||||||
position: vector3,
|
|
||||||
offset: vector3,
|
|
||||||
scale: vector3,
|
|
||||||
size: vector3,
|
|
||||||
metrics: druid.rich_text.metrics,
|
|
||||||
pivot: Pivot,
|
|
||||||
text: string,
|
|
||||||
shadow: vector4,
|
|
||||||
outline: vector4,
|
|
||||||
font: string,
|
|
||||||
image: druid.rich_text.image,
|
|
||||||
br: boolean,
|
|
||||||
nobr: boolean,
|
|
||||||
}
|
|
||||||
|
|
||||||
type druid.rich_text.word.image = {
|
|
||||||
texture: string,
|
|
||||||
anim: string,
|
|
||||||
width: number,
|
|
||||||
height: number,
|
|
||||||
}
|
|
||||||
|
|
||||||
type druid.rich_text.lines_metrics = {
|
|
||||||
text_width: number,
|
|
||||||
text_height: number,
|
|
||||||
lines: table<number, druid.rich_text.metrics>,
|
|
||||||
}
|
|
||||||
|
|
||||||
type druid.rich_text.metrics = {
|
|
||||||
width: number,
|
|
||||||
height: number,
|
|
||||||
offset_x: number|nil,
|
|
||||||
offset_y: number|nil,
|
|
||||||
node_size: vector3|nil @For images only,
|
|
||||||
}
|
|
||||||
</pre></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#characters">characters(self, word)</a></td>
|
|
||||||
<td class="summary">Split a word into it's characters</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#clear">clear()</a></td>
|
|
||||||
<td class="summary">Clear all created words.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_line_metric">get_line_metric()</a></td>
|
|
||||||
<td class="summary">Get current line metrics</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_text">get_text(self)</a></td>
|
|
||||||
<td class="summary">Get current text</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_words">get_words()</a></td>
|
|
||||||
<td class="summary">Get all current words.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#init">init(self, text_node, value)</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/RichText.html#">RichText</a> constructor</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_text">set_text(self, text)</a></td>
|
|
||||||
<td class="summary">Set text for Rich Text</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#tagged">tagged(self, tag)</a></td>
|
|
||||||
<td class="summary">Get all words, which has a passed tag.</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="#druid">druid</a></td>
|
|
||||||
<td class="summary">The component druid instance</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#root">root</a></td>
|
|
||||||
<td class="summary">The root node of the Rich Text</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#text_prefab">text_prefab</a></td>
|
|
||||||
<td class="summary">The text prefab node</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "characters"></a>
|
|
||||||
<strong>characters(self, word)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Split a word into it's characters
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">RichText</span></span>
|
|
||||||
<a href="../modules/RichText.html#">RichText</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">word</span>
|
|
||||||
<span class="types"><span class="type">druid.rich_text.word</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">druid.rich_text.word[]</span></span>
|
|
||||||
characters
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "clear"></a>
|
|
||||||
<strong>clear()</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Clear all created words.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_line_metric"></a>
|
|
||||||
<strong>get_line_metric()</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Get current line metrics
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">druid.rich_text.lines_metrics</span></span>
|
|
||||||
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_text"></a>
|
|
||||||
<strong>get_text(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Get current text
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">RichText</span></span>
|
|
||||||
<a href="../modules/RichText.html#">RichText</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
text
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_words"></a>
|
|
||||||
<strong>get_words()</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Get all current words.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
|
||||||
druid.rich_text.word[]
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "init"></a>
|
|
||||||
<strong>init(self, text_node, value)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/RichText.html#">RichText</a> constructor
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">RichText</span></span>
|
|
||||||
<a href="../modules/RichText.html#">RichText</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">text_node</span>
|
|
||||||
<span class="types"><span class="type">node</span> or <a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
The text node to make Rich Text
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">value</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">nil</span></span>
|
|
||||||
The initial text value. Default will be gui.get_text(text_node)
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_text"></a>
|
|
||||||
<strong>set_text(self, text)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set text for Rich Text
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">RichText</span></span>
|
|
||||||
<a href="../modules/RichText.html#">RichText</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">text</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">nil</span></span>
|
|
||||||
The text to set
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
<li>
|
|
||||||
<span class="types"><span class="type">druid.rich_text.word[]</span></span>
|
|
||||||
words</li>
|
|
||||||
<li>
|
|
||||||
<span class="types"><span class="type">druid.rich_text.lines_metrics</span></span>
|
|
||||||
line_metrics</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example">• color: Change text color
|
|
||||||
|
|
||||||
<color=red>Foobar</color>
|
|
||||||
<color=<span class="number">1.0</span>,<span class="number">0</span>,<span class="number">0</span>,<span class="number">1.0</span>>Foobar</color>
|
|
||||||
<color=#ff0000>Foobar</color>
|
|
||||||
<color=#ff0000ff>Foobar</color>
|
|
||||||
|
|
||||||
• shadow: Change text shadow
|
|
||||||
|
|
||||||
<shadow=red>Foobar</shadow>
|
|
||||||
<shadow=<span class="number">1.0</span>,<span class="number">0</span>,<span class="number">0</span>,<span class="number">1.0</span>>Foobar</shadow>
|
|
||||||
<shadow=#ff0000>Foobar</shadow>
|
|
||||||
<shadow=#ff0000ff>Foobar</shadow>
|
|
||||||
|
|
||||||
• outline: Change text shadow
|
|
||||||
|
|
||||||
<outline=red>Foobar</outline>
|
|
||||||
<outline=<span class="number">1.0</span>,<span class="number">0</span>,<span class="number">0</span>,<span class="number">1.0</span>>Foobar</outline>
|
|
||||||
<outline=#ff0000>Foobar</outline>
|
|
||||||
<outline=#ff0000ff>Foobar</outline>
|
|
||||||
|
|
||||||
• font: Change font
|
|
||||||
|
|
||||||
<font=MyCoolFont>Foobar</font>
|
|
||||||
|
|
||||||
• size: Change text size, relative to default size
|
|
||||||
|
|
||||||
<size=<span class="number">2</span>>Twice as large</size>
|
|
||||||
|
|
||||||
• br: Insert a line <span class="keyword">break</span>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
• nobr: Prevent the text from breaking
|
|
||||||
|
|
||||||
Words <nobr>inside tag</nobr> won't <span class="keyword">break</span>
|
|
||||||
|
|
||||||
• img: Display image
|
|
||||||
|
|
||||||
<img=texture:image/>
|
|
||||||
<img=texture:image,size/>
|
|
||||||
<img=texture:image,width,height/></pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "tagged"></a>
|
|
||||||
<strong>tagged(self, tag)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Get all words, which has a passed tag.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">RichText</span></span>
|
|
||||||
<a href="../modules/RichText.html#">RichText</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">tag</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">druid.rich_text.word[]</span></span>
|
|
||||||
words
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</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">COLORS</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a> or <span class="type">nil</span></span>
|
|
||||||
Rich Text color aliases. Default: {}
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">ADJUST_STEPS</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
Amount steps of attemps text adjust by height. Default: 20
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">ADJUST_SCALE_DELTA</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
Scale step on each height adjust step. Default: 0.02
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "druid"></a>
|
|
||||||
<strong>druid</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The component druid instance
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">druid</span>
|
|
||||||
<span class="types"><span class="type">DruidInstance</span></span>
|
|
||||||
<a href="../modules/DruidInstance.html#">DruidInstance</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "root"></a>
|
|
||||||
<strong>root</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The root node of the Rich Text
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">root</span>
|
|
||||||
<span class="types"><span class="type">node</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "text_prefab"></a>
|
|
||||||
<strong>text_prefab</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The text prefab node
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">text_prefab</span>
|
|
||||||
<span class="types"><span class="type">node</span></span>
|
|
||||||
|
|
||||||
</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>
|
|
File diff suppressed because it is too large
Load Diff
@ -1,531 +0,0 @@
|
|||||||
<!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="#Functions">Functions</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/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/Progress.html">Progress</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><strong>Slider</strong></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>Slider</code></h1>
|
|
||||||
<p>Druid slider component</p>
|
|
||||||
<p> <a href="https://insality.github.io/druid/druid/index.html?example=general_sliders" target="_blank"><b>Example Link</b></a></p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#init">init(self, node, end_pos, callback)</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/Slider.html#">Slider</a> constructor</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#is_enabled">is_enabled(self)</a></td>
|
|
||||||
<td class="summary">Check if Slider component is enabled</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set">set(self, value, is_silent)</a></td>
|
|
||||||
<td class="summary">Set value for slider</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_enabled">set_enabled(self, is_enabled)</a></td>
|
|
||||||
<td class="summary">Set Slider input enabled or disabled</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_input_node">set_input_node(self, input_node)</a></td>
|
|
||||||
<td class="summary">Set input zone for slider.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_steps">set_steps(self, steps)</a></td>
|
|
||||||
<td class="summary">Set slider steps.</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<h2><a href="#Fields">Fields</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#dist">dist</a></td>
|
|
||||||
<td class="summary">Length between start and end position</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#end_pos">end_pos</a></td>
|
|
||||||
<td class="summary">End pin node position</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#is_drag">is_drag</a></td>
|
|
||||||
<td class="summary">Current drag state</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#node">node</a></td>
|
|
||||||
<td class="summary">Slider pin node</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_change_value">on_change_value</a></td>
|
|
||||||
<td class="summary">On change value callback(self, value)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#pos">pos</a></td>
|
|
||||||
<td class="summary">Current pin node position</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#start_pos">start_pos</a></td>
|
|
||||||
<td class="summary">Start pin node position</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#target_pos">target_pos</a></td>
|
|
||||||
<td class="summary">Targer pin node position</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#value">value</a></td>
|
|
||||||
<td class="summary">Current slider value</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, end_pos, callback)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/Slider.html#">Slider</a> constructor
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Slider</span></span>
|
|
||||||
<a href="../modules/Slider.html#">Slider</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Slider.html#node">node</a></span>
|
|
||||||
Gui pin node
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">end_pos</span>
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
The end position of slider
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">callback</span>
|
|
||||||
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
|
||||||
On slider change callback
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "is_enabled"></a>
|
|
||||||
<strong>is_enabled(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Check if Slider component is enabled
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Slider</span></span>
|
|
||||||
<a href="../modules/Slider.html#">Slider</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set"></a>
|
|
||||||
<strong>set(self, value, is_silent)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set value for slider
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Slider</span></span>
|
|
||||||
<a href="../modules/Slider.html#">Slider</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">value</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Value from 0 to 1
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">is_silent</span>
|
|
||||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
|
||||||
Don't trigger event if true
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_enabled"></a>
|
|
||||||
<strong>set_enabled(self, is_enabled)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set Slider input enabled or disabled
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Slider</span></span>
|
|
||||||
<a href="../modules/Slider.html#">Slider</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">is_enabled</span>
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_input_node"></a>
|
|
||||||
<strong>set_input_node(self, input_node)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set input zone for slider.
|
|
||||||
User can touch any place of node, pin instantly will
|
|
||||||
move at this position and node drag will start.
|
|
||||||
This function require the Defold version 1.3.0+
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Slider</span></span>
|
|
||||||
<a href="../modules/Slider.html#">Slider</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">input_node</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Slider.html#node">node</a>, <a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">nil</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">Slider</span></span>
|
|
||||||
<a href="../modules/Slider.html#">Slider</a>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_steps"></a>
|
|
||||||
<strong>set_steps(self, steps)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set slider steps. Pin node will
|
|
||||||
apply closest step position
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Slider</span></span>
|
|
||||||
<a href="../modules/Slider.html#">Slider</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">steps</span>
|
|
||||||
<span class="types"><span class="type">number[]</span></span>
|
|
||||||
Array of steps
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">Slider</span></span>
|
|
||||||
<a href="../modules/Slider.html#">Slider</a>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Usage:</h3>
|
|
||||||
<ul>
|
|
||||||
<pre class="example">slider:set_steps({<span class="number">0</span>, <span class="number">0.2</span>, <span class="number">0.6</span>, <span class="number">1</span>})</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "dist"></a>
|
|
||||||
<strong>dist</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Length between start and end position
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">dist</span>
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "end_pos"></a>
|
|
||||||
<strong>end_pos</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
End pin node position
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">end_pos</span>
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "is_drag"></a>
|
|
||||||
<strong>is_drag</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Current drag state
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">is_drag</span>
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "node"></a>
|
|
||||||
<strong>node</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Slider pin node
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Slider.html#node">node</a></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_change_value"></a>
|
|
||||||
<strong>on_change_value</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On change value callback(self, value)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_change_value</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "pos"></a>
|
|
||||||
<strong>pos</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Current pin node position
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">pos</span>
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "start_pos"></a>
|
|
||||||
<strong>start_pos</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Start pin node position
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">start_pos</span>
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "target_pos"></a>
|
|
||||||
<strong>target_pos</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Targer pin node position
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">target_pos</span>
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "value"></a>
|
|
||||||
<strong>value</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Current slider value
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">value</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
|
|
||||||
</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>
|
|
File diff suppressed because it is too large
Load Diff
@ -1,288 +0,0 @@
|
|||||||
<!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="#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/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/Progress.html">Progress</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><strong>Swipe</strong></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>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> <a href="https://insality.github.io/druid/druid/index.html?example=general_swipe" target="_blank"><b>Example Link</b></a></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">The <a href="../modules/Swipe.html#">Swipe</a> constructor</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>
|
|
||||||
The <a href="../modules/Swipe.html#">Swipe</a> constructor
|
|
||||||
|
|
||||||
|
|
||||||
<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>, <a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">nil</span></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> or <span class="type">nil</span></span>
|
|
||||||
Maximum time for swipe trigger. Default: 0.4
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">SWIPE_THRESHOLD</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
Minimum distance for swipe trigger. Default: 50
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">SWIPE_TRIGGER_ON_MOVE</span>
|
|
||||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
|
||||||
If true, trigger on swipe moving, not only release action. Default: 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> or <span class="type">nil</span></span>
|
|
||||||
|
|
||||||
</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>
|
|
@ -1,942 +0,0 @@
|
|||||||
<!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="#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/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/Progress.html">Progress</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><strong>Text</strong></li>
|
|
||||||
<li><a href="../modules/Timer.html">Timer</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
|
|
||||||
<h1>Module <code>Text</code></h1>
|
|
||||||
<p>Component for Wrapping GUI Text Nodes: Druid Text
|
|
||||||
<p> ## Overview ##
|
|
||||||
<p> Druid Text is a component that provides various adjustment modes for text nodes.</p>
|
|
||||||
<p> It allows text to be scaled down to fit within the size of the text node.
|
|
||||||
<p> ## Notes ##
|
|
||||||
<p> • The text pivot can be changed using the text:set_pivot method.
|
|
||||||
The anchoring will be inside the text node's area size.
|
|
||||||
<p> • There are several text adjustment types available. The default is DOWNSCALE.
|
|
||||||
You can change the default adjustment type in the Text style. Refer to the example below to see all available adjustment types:
|
|
||||||
<p> - const.TEXT_ADJUST.DOWNSCALE: Changes the text's scale to fit within the text node's size.
|
|
||||||
<p> - const.TEXT_ADJUST.TRIM: Trims the text with a postfix (default: "...", can be overridden in styles)
|
|
||||||
to fit within the text node's size.
|
|
||||||
<p> - const.TEXT_ADJUST.NO_ADJUST: No adjustment is applied, similar
|
|
||||||
to the default Defold Text Node behavior.
|
|
||||||
<p> - const.TEXT_ADJUST.DOWNSCALE_LIMITED: Changes the text's scale
|
|
||||||
with a limited downscale. You can set the minimum scale using the text:set_minimal_scale() function.
|
|
||||||
<p> - const.TEXT_ADJUST.SCROLL: Changes the text's pivot to imitate scrolling within the text box.
|
|
||||||
For better effect, use with a stencil node.
|
|
||||||
<p> - const.TEXT_ADJUST.SCALE_THEN_SCROLL: Combines two modes: limited downscale first, then scroll.
|
|
||||||
<p> <a href="https://insality.github.io/druid/druid/index.html?example=texts_general" target="_blank"><b>Example Link</b></a></p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_text_adjust">get_text_adjust(self, adjust_type)</a></td>
|
|
||||||
<td class="summary">Return current text adjust type</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_text_index_by_width">get_text_index_by_width(self, width)</a></td>
|
|
||||||
<td class="summary">Get chars count by width</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#get_text_size">get_text_size(self, text)</a></td>
|
|
||||||
<td class="summary">Calculate text width with font with respect to trailing space</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#init">init(self, node, value, adjust_type)</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/Text.html#">Text</a> constructor</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#is_multiline">is_multiline(self)</a></td>
|
|
||||||
<td class="summary">Return true, if text with line break</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_alpha">set_alpha(self, alpha)</a></td>
|
|
||||||
<td class="summary">Set alpha</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_color">set_color(self, color)</a></td>
|
|
||||||
<td class="summary">Set color</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_minimal_scale">set_minimal_scale(self, minimal_scale)</a></td>
|
|
||||||
<td class="summary">Set minimal scale for DOWNSCALE_LIMITED or SCALE_THEN_SCROLL adjust types</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_pivot">set_pivot(self, pivot)</a></td>
|
|
||||||
<td class="summary">Set text pivot.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_scale">set_scale(self, scale)</a></td>
|
|
||||||
<td class="summary">Set scale</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_size">set_size(self, size)</a></td>
|
|
||||||
<td class="summary">Set text area size</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_text_adjust">set_text_adjust(self, adjust_type, minimal_scale)</a></td>
|
|
||||||
<td class="summary">Set text adjust, refresh the current text visuals, if needed</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_to">set_to(self, set_to)</a></td>
|
|
||||||
<td class="summary">Set text to text field</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="#adjust_type">adjust_type</a></td>
|
|
||||||
<td class="summary">Current text size adjust settings</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#color">color</a></td>
|
|
||||||
<td class="summary">Current text color</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#last_value">last_value</a></td>
|
|
||||||
<td class="summary">The last text value</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#node">node</a></td>
|
|
||||||
<td class="summary">Text node</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#node_id">node_id</a></td>
|
|
||||||
<td class="summary">The node id of text node</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_set_pivot">on_set_pivot</a></td>
|
|
||||||
<td class="summary">On change pivot callback(self, pivot)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_set_text">on_set_text</a></td>
|
|
||||||
<td class="summary">On set text callback(self, text)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_update_text_scale">on_update_text_scale</a></td>
|
|
||||||
<td class="summary">On adjust text size callback(self, new_scale, text_metrics)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#pos">pos</a></td>
|
|
||||||
<td class="summary">Current text position</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#scale">scale</a></td>
|
|
||||||
<td class="summary">Current text node scale</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#start_scale">start_scale</a></td>
|
|
||||||
<td class="summary">Initial text node scale</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#start_size">start_size</a></td>
|
|
||||||
<td class="summary">Initial text node size</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#text_area">text_area</a></td>
|
|
||||||
<td class="summary">Current text node available are</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "get_text_adjust"></a>
|
|
||||||
<strong>get_text_adjust(self, adjust_type)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return current text adjust type
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">adjust_type</span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
The current text adjust type
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_text_index_by_width"></a>
|
|
||||||
<strong>get_text_index_by_width(self, width)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Get chars count by width
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Text</span></span>
|
|
||||||
<a href="../modules/Text.html#">Text</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">width</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Chars count
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "get_text_size"></a>
|
|
||||||
<strong>get_text_size(self, text)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Calculate text width with font with respect to trailing space
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Text</span></span>
|
|
||||||
<a href="../modules/Text.html#">Text</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">text</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
|nil
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
<li>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Width</li>
|
|
||||||
<li>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Height</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "init"></a>
|
|
||||||
<strong>init(self, node, value, adjust_type)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/Text.html#">Text</a> constructor
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Text</span></span>
|
|
||||||
<a href="../modules/Text.html#">Text</a>
|
|
||||||
</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 <a class="type" href="../modules/Text.html#node">node</a></span>
|
|
||||||
Node name or GUI Text Node itself
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">value</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">nil</span></span>
|
|
||||||
Initial text. Default value is node text from GUI scene. Default: nil
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">adjust_type</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">nil</span></span>
|
|
||||||
Adjust type for text. By default is DOWNSCALE. Look const.TEXT_ADJUST for reference. Default: DOWNSCALE
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "is_multiline"></a>
|
|
||||||
<strong>is_multiline(self)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Return true, if text with line break
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Text</span></span>
|
|
||||||
<a href="../modules/Text.html#">Text</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
|
||||||
Is text node with line break
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_alpha"></a>
|
|
||||||
<strong>set_alpha(self, alpha)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set alpha
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Text</span></span>
|
|
||||||
<a href="../modules/Text.html#">Text</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">alpha</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Alpha for node
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">Text</span></span>
|
|
||||||
Current text instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_color"></a>
|
|
||||||
<strong>set_color(self, color)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set color
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Text</span></span>
|
|
||||||
<a href="../modules/Text.html#">Text</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">color</span>
|
|
||||||
<span class="types"><span class="type">vector4</span></span>
|
|
||||||
Color for node
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">Text</span></span>
|
|
||||||
Current text instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_minimal_scale"></a>
|
|
||||||
<strong>set_minimal_scale(self, minimal_scale)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set minimal scale for DOWNSCALE_LIMITED or SCALE_THEN_SCROLL adjust types
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Text</span></span>
|
|
||||||
<a href="../modules/Text.html#">Text</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">minimal_scale</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
If pass nil - not use minimal scale
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">Text</span></span>
|
|
||||||
Current text instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_pivot"></a>
|
|
||||||
<strong>set_pivot(self, pivot)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set text pivot. Text will re-anchor inside text area
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Text</span></span>
|
|
||||||
<a href="../modules/Text.html#">Text</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">pivot</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
The gui.PIVOT_* constant
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">Text</span></span>
|
|
||||||
Current text instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_scale"></a>
|
|
||||||
<strong>set_scale(self, scale)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set scale
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Text</span></span>
|
|
||||||
<a href="../modules/Text.html#">Text</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">scale</span>
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
Scale for node
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">Text</span></span>
|
|
||||||
Current text instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_size"></a>
|
|
||||||
<strong>set_size(self, size)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set text area size
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Text</span></span>
|
|
||||||
<a href="../modules/Text.html#">Text</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">size</span>
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
The new text area size
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">Text</span></span>
|
|
||||||
Current text instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_text_adjust"></a>
|
|
||||||
<strong>set_text_adjust(self, adjust_type, minimal_scale)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set text adjust, refresh the current text visuals, if needed
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Text</span></span>
|
|
||||||
<a href="../modules/Text.html#">Text</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">adjust_type</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">nil</span></span>
|
|
||||||
See const.TEXT_ADJUST. If pass nil - use current adjust type
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">minimal_scale</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
If pass nil - not use minimal scale
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">Text</span></span>
|
|
||||||
Current text instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_to"></a>
|
|
||||||
<strong>set_to(self, set_to)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set text to text field
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Text</span></span>
|
|
||||||
<a href="../modules/Text.html#">Text</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">set_to</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
Text for node
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">Text</span></span>
|
|
||||||
Current text instance
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</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">TRIM_POSTFIX</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">nil</span></span>
|
|
||||||
The postfix for TRIM adjust type. Default: ...
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">DEFAULT_ADJUST</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">nil</span></span>
|
|
||||||
The default adjust type for any text component. Default: DOWNSCALE
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">ADJUST_STEPS</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">nil</span></span>
|
|
||||||
Amount of iterations for text adjust by height. Default: 20
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">ADJUST_SCALE_DELTA</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">nil</span></span>
|
|
||||||
Scale step on each height adjust step. Default: 0.02
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "adjust_type"></a>
|
|
||||||
<strong>adjust_type</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Current text size adjust settings
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">adjust_type</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "color"></a>
|
|
||||||
<strong>color</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Current text color
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">color</span>
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "last_value"></a>
|
|
||||||
<strong>last_value</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The last text value
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">last_value</span>
|
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "node"></a>
|
|
||||||
<strong>node</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Text node
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Text.html#node">node</a></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "node_id"></a>
|
|
||||||
<strong>node_id</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The node id of text node
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">node_id</span>
|
|
||||||
<span class="types"><span class="type">hash</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_set_pivot"></a>
|
|
||||||
<strong>on_set_pivot</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On change pivot callback(self, pivot)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_set_pivot</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_set_text"></a>
|
|
||||||
<strong>on_set_text</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On set text callback(self, text)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_set_text</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_update_text_scale"></a>
|
|
||||||
<strong>on_update_text_scale</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On adjust text size callback(self, new_scale, text_metrics)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_update_text_scale</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "pos"></a>
|
|
||||||
<strong>pos</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Current text position
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">pos</span>
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "scale"></a>
|
|
||||||
<strong>scale</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Current text node scale
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">scale</span>
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "start_scale"></a>
|
|
||||||
<strong>start_scale</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Initial text node scale
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">start_scale</span>
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "start_size"></a>
|
|
||||||
<strong>start_size</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Initial text node size
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">start_size</span>
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "text_area"></a>
|
|
||||||
<strong>text_area</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Current text node available are
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">text_area</span>
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
|
||||||
|
|
||||||
</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>
|
|
@ -1,409 +0,0 @@
|
|||||||
<!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="#Functions">Functions</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/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/Progress.html">Progress</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><strong>Timer</strong></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
|
|
||||||
<h1>Module <code>Timer</code></h1>
|
|
||||||
<p>Component to handle GUI timers.</p>
|
|
||||||
<p>
|
|
||||||
Timer updating by game delta time. If game is not focused -
|
|
||||||
timer will be not updated.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#init">init(self, node, seconds_from, seconds_to, callback)</a></td>
|
|
||||||
<td class="summary">The <a href="../modules/Timer.html#">Timer</a> constructor</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_interval">set_interval(self, from, to)</a></td>
|
|
||||||
<td class="summary">Set time interval</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_state">set_state(self, is_on)</a></td>
|
|
||||||
<td class="summary">Called when update</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#set_to">set_to(self, set_to)</a></td>
|
|
||||||
<td class="summary">Set text to text field</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<h2><a href="#Fields">Fields</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#from">from</a></td>
|
|
||||||
<td class="summary">Initial timer value</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#node">node</a></td>
|
|
||||||
<td class="summary">Trigger node</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_set_enabled">on_set_enabled</a></td>
|
|
||||||
<td class="summary">On timer change enabled state callback(self, is_enabled)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_tick">on_tick</a></td>
|
|
||||||
<td class="summary">On timer tick.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_timer_end">on_timer_end</a></td>
|
|
||||||
<td class="summary">On timer end callback</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#target">target</a></td>
|
|
||||||
<td class="summary">Target timer value</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#value">value</a></td>
|
|
||||||
<td class="summary">Current timer value</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, seconds_from, seconds_to, callback)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
The <a href="../modules/Timer.html#">Timer</a> constructor
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Timer</span></span>
|
|
||||||
<a href="../modules/Timer.html#">Timer</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Timer.html#node">node</a></span>
|
|
||||||
Gui text node
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">seconds_from</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
Start timer value in seconds
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">seconds_to</span>
|
|
||||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
|
||||||
End timer value in seconds
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">callback</span>
|
|
||||||
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
|
||||||
Function on timer end
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_interval"></a>
|
|
||||||
<strong>set_interval(self, from, to)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set time interval
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Timer</span></span>
|
|
||||||
<a href="../modules/Timer.html#">Timer</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">from</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Start time in seconds
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">to</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Target time in seconds
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_state"></a>
|
|
||||||
<strong>set_state(self, is_on)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Called when update
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Timer</span></span>
|
|
||||||
<a href="../modules/Timer.html#">Timer</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">is_on</span>
|
|
||||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
|
||||||
Timer enable state
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "set_to"></a>
|
|
||||||
<strong>set_to(self, set_to)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Set text to text field
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">self</span>
|
|
||||||
<span class="types"><span class="type">Timer</span></span>
|
|
||||||
<a href="../modules/Timer.html#">Timer</a>
|
|
||||||
</li>
|
|
||||||
<li><span class="parameter">set_to</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
Value in seconds
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "from"></a>
|
|
||||||
<strong>from</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Initial timer value
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">from</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "node"></a>
|
|
||||||
<strong>node</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Trigger node
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><a class="type" href="../modules/Timer.html#node">node</a></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_set_enabled"></a>
|
|
||||||
<strong>on_set_enabled</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On timer change enabled state callback(self, is_enabled)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_set_enabled</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_tick"></a>
|
|
||||||
<strong>on_tick</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On timer tick. Fire every second callback(self, value)
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_tick</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "on_timer_end"></a>
|
|
||||||
<strong>on_timer_end</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
On timer end callback
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">on_timer_end</span>
|
|
||||||
<span class="types"><span class="type">DruidEvent</span></span>
|
|
||||||
(self, Timer) <a href="../modules/DruidEvent.html#">DruidEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "target"></a>
|
|
||||||
<strong>target</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Target timer value
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">target</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "value"></a>
|
|
||||||
<strong>value</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Current timer value
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">value</span>
|
|
||||||
<span class="types"><span class="type">number</span></span>
|
|
||||||
|
|
||||||
</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>
|
|
@ -1,95 +0,0 @@
|
|||||||
<!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>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/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/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>
|
|
||||||
<li><strong>druid.extended.layout</strong></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
|
|
||||||
<h1>Module <code>druid.extended.layout</code></h1>
|
|
||||||
<p>Druid layout module
|
|
||||||
<p> <b># Overview #</b>
|
|
||||||
<p> Layout component works like Dynamic Grid before - for aligning elements in a row or column.</p>
|
|
||||||
<p> Works like a Figma layout.
|
|
||||||
<p> <b># Notes</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>
|
|
@ -1,93 +0,0 @@
|
|||||||
<!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>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/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>
|
|
||||||
<li><strong>druid.system.utf8</strong></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
|
|
||||||
<h1>Module <code>druid.system.utf8</code></h1>
|
|
||||||
<p></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>
|
|
Loading…
x
Reference in New Issue
Block a user