mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 02:17:52 +02:00
Remove all docs
This commit is contained in:
parent
03ffd943df
commit
69b3383dc4
206
docs/index.html
206
docs/index.html
@ -1,206 +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/PinKnob.html">PinKnob</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/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/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/RadioGroup.html">RadioGroup</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/PinKnob.html">PinKnob</a></td>
|
||||
<td class="summary">Druid pin knob custom component.</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/Checkbox.html">Checkbox</a></td>
|
||||
<td class="summary">Druid checkbox component</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/CheckboxGroup.html">CheckboxGroup</a></td>
|
||||
<td class="summary">Checkbox group module</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/RadioGroup.html">RadioGroup</a></td>
|
||||
<td class="summary">Radio group module</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,177 +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/Checkbox.html">Checkbox</a></li>
|
||||
<li><a href="../modules/CheckboxGroup.html">CheckboxGroup</a></li>
|
||||
<li><a href="../modules/DataList.html">DataList</a></li>
|
||||
<li><a href="../modules/Drag.html">Drag</a></li>
|
||||
<li><a href="../modules/Druid.html">Druid</a></li>
|
||||
<li><a href="../modules/DruidEvent.html">DruidEvent</a></li>
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
<li><a href="../modules/RichInput.html">RichInput</a></li>
|
||||
<li><a href="../modules/RichText.html">RichText</a></li>
|
||||
<li><a href="../modules/Scroll.html">Scroll</a></li>
|
||||
<li><a href="../modules/Slider.html">Slider</a></li>
|
||||
<li><a href="../modules/StaticGrid.html">StaticGrid</a></li>
|
||||
<li><a href="../modules/Swipe.html">Swipe</a></li>
|
||||
<li><a href="../modules/Text.html">Text</a></li>
|
||||
<li><a href="../modules/Timer.html">Timer</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>BackHandler</code></h1>
|
||||
<p>Component with event on back and backspace button.</p>
|
||||
<p>
|
||||
<b># Overview #</b>
|
||||
<p> Back Handler is recommended to put in every game window to close it
|
||||
or in main screen to call settings window.
|
||||
<p> <b># Notes #</b>
|
||||
<p> • Back Handler inheritance <a href="../modules/BaseComponent.html#">BaseComponent</a>, you can use all of its methods in addition to those described here.
|
||||
<p> • Back Handler react on release action ACTION_BACK or ACTION_BACKSPACE</p>
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">local callback = function(self, params) ... end
|
||||
|
||||
local params = {}
|
||||
local back_handler = self.druid:new_back_handler(callback, [params])
|
||||
</pre>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Fields">Fields</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#on_back">on_back</a></td>
|
||||
<td class="summary">The <a href="../modules/DruidEvent.html#">DruidEvent</a> Event on back handler action.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#params">params</a></td>
|
||||
<td class="summary">Custom args to pass in the callback</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "on_back"></a>
|
||||
<strong>on_back</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
The <a href="../modules/DruidEvent.html#">DruidEvent</a> Event on back handler action.
|
||||
<p> Trigger on input action ACTION_BACK or ACTION_BACKSPACE
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">on_back</span>
|
||||
<span class="types"><span class="type">DruidEvent</span></span>
|
||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="comment">-- Subscribe additional callbacks:
|
||||
</span>back_handler.on_back:subscribe(callback)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "params"></a>
|
||||
<strong>params</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Custom args to pass in the callback
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">params</span>
|
||||
<span class="types"><span class="type">any</span></span>
|
||||
|
||||
(<em>optional</em>)
|
||||
</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,661 +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/Checkbox.html">Checkbox</a></li>
|
||||
<li><a href="../modules/CheckboxGroup.html">CheckboxGroup</a></li>
|
||||
<li><a href="../modules/DataList.html">DataList</a></li>
|
||||
<li><a href="../modules/Drag.html">Drag</a></li>
|
||||
<li><a href="../modules/Druid.html">Druid</a></li>
|
||||
<li><a href="../modules/DruidEvent.html">DruidEvent</a></li>
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
<li><a href="../modules/RichInput.html">RichInput</a></li>
|
||||
<li><a href="../modules/RichText.html">RichText</a></li>
|
||||
<li><a href="../modules/Scroll.html">Scroll</a></li>
|
||||
<li><a href="../modules/Slider.html">Slider</a></li>
|
||||
<li><a href="../modules/StaticGrid.html">StaticGrid</a></li>
|
||||
<li><a href="../modules/Swipe.html">Swipe</a></li>
|
||||
<li><a href="../modules/Text.html">Text</a></li>
|
||||
<li><a href="../modules/Timer.html">Timer</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>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="#component:get_childrens">component:get_childrens(self)</a></td>
|
||||
<td class="summary">Return all children components, recursive</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#component:get_context">component: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="#component:get_druid">component:get_druid(self)</a></td>
|
||||
<td class="summary">Get Druid instance for inner component creation.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#component:get_input_priority">component:get_input_priority(self)</a></td>
|
||||
<td class="summary">Return component input priority</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#component:get_name">component:get_name(self)</a></td>
|
||||
<td class="summary">Return component name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#component:get_node">component: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="#component:get_parent_component">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="#component:get_parent_name">component:get_parent_name(self)</a></td>
|
||||
<td class="summary">Return parent component name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#component:get_template">component:get_template(self)</a></td>
|
||||
<td class="summary">Get current component template name.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#component:get_uid">component:get_uid(self)</a></td>
|
||||
<td class="summary">Return component UID.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#component:reset_input_priority">component: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="#component:set_input_enabled">component:set_input_enabled(self, state)</a></td>
|
||||
<td class="summary">Set component input state.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#component:set_input_priority">component:set_input_priority(self, value, is_temporary)</a></td>
|
||||
<td class="summary">Set component input priority</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#component:set_nodes">component:set_nodes(self, nodes)</a></td>
|
||||
<td class="summary">Set current component nodes.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#component:set_style">component:set_style(self, druid_style)</a></td>
|
||||
<td class="summary">Set current component style table.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#component:set_template">component:set_template(self, template)</a></td>
|
||||
<td class="summary">Set component template name.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "component:get_childrens"></a>
|
||||
<strong>component: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 = "component:get_context"></a>
|
||||
<strong>component: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 = "component:get_druid"></a>
|
||||
<strong>component:get_druid(self)</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>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">Druid</span></span>
|
||||
Druid instance with component context
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "component:get_input_priority"></a>
|
||||
<strong>component: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 = "component:get_name"></a>
|
||||
<strong>component: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 = "component:get_node"></a>
|
||||
<strong>component: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 = "component:get_parent_component"></a>
|
||||
<strong>component: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 = "component:get_parent_name"></a>
|
||||
<strong>component: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 = "component:get_template"></a>
|
||||
<strong>component: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 = "component:get_uid"></a>
|
||||
<strong>component: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 = "component:reset_input_priority"></a>
|
||||
<strong>component: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 = "component:set_input_enabled"></a>
|
||||
<strong>component: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">bool</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 = "component:set_input_priority"></a>
|
||||
<strong>component: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></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>
|
||||
<dt>
|
||||
<a name = "component:set_nodes"></a>
|
||||
<strong>component:set_nodes(self, nodes)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set current component nodes.
|
||||
Use if your component nodes was cloned with `gui.clone_tree` and you got the node tree.
|
||||
|
||||
|
||||
<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">nodes</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
BaseComponent nodes table
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">BaseComponent</span></span>
|
||||
<a href="../modules/BaseComponent.html#">BaseComponent</a>
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="keyword">local</span> nodes = gui.clone_tree(self.prefab)
|
||||
... In your component:
|
||||
self:set_nodes(nodes)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "component:set_style"></a>
|
||||
<strong>component:set_style(self, druid_style)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set current component style table.
|
||||
<p> Invoke `on_style_change` on component, if exist. Component should handle
|
||||
their style changing and store all style params
|
||||
|
||||
|
||||
<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">druid_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>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">BaseComponent</span></span>
|
||||
<a href="../modules/BaseComponent.html#">BaseComponent</a>
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "component:set_template"></a>
|
||||
<strong>component:set_template(self, template)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set component template name.
|
||||
<p> Use on all your custom components with GUI layouts used as templates.
|
||||
It will check parent template name to build full template name in self:get_node()
|
||||
|
||||
|
||||
<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></span>
|
||||
BaseComponent template name
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">BaseComponent</span></span>
|
||||
<a href="../modules/BaseComponent.html#">BaseComponent</a>
|
||||
</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,237 +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/Checkbox.html">Checkbox</a></li>
|
||||
<li><a href="../modules/CheckboxGroup.html">CheckboxGroup</a></li>
|
||||
<li><a href="../modules/DataList.html">DataList</a></li>
|
||||
<li><a href="../modules/Drag.html">Drag</a></li>
|
||||
<li><a href="../modules/Druid.html">Druid</a></li>
|
||||
<li><a href="../modules/DruidEvent.html">DruidEvent</a></li>
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
<li><a href="../modules/RichInput.html">RichInput</a></li>
|
||||
<li><a href="../modules/RichText.html">RichText</a></li>
|
||||
<li><a href="../modules/Scroll.html">Scroll</a></li>
|
||||
<li><a href="../modules/Slider.html">Slider</a></li>
|
||||
<li><a href="../modules/StaticGrid.html">StaticGrid</a></li>
|
||||
<li><a href="../modules/Swipe.html">Swipe</a></li>
|
||||
<li><a href="../modules/Text.html">Text</a></li>
|
||||
<li><a href="../modules/Timer.html">Timer</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>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"><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>
|
||||
<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">bool</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">bool</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,894 +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/Checkbox.html">Checkbox</a></li>
|
||||
<li><a href="../modules/CheckboxGroup.html">CheckboxGroup</a></li>
|
||||
<li><a href="../modules/DataList.html">DataList</a></li>
|
||||
<li><a href="../modules/Drag.html">Drag</a></li>
|
||||
<li><a href="../modules/Druid.html">Druid</a></li>
|
||||
<li><a href="../modules/DruidEvent.html">DruidEvent</a></li>
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
<li><a href="../modules/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Helper.html">Helper</a></li>
|
||||
<li><a href="../modules/Hotkey.html">Hotkey</a></li>
|
||||
<li><a href="../modules/Hover.html">Hover</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
<li><a href="../modules/RichInput.html">RichInput</a></li>
|
||||
<li><a href="../modules/RichText.html">RichText</a></li>
|
||||
<li><a href="../modules/Scroll.html">Scroll</a></li>
|
||||
<li><a href="../modules/Slider.html">Slider</a></li>
|
||||
<li><a href="../modules/StaticGrid.html">StaticGrid</a></li>
|
||||
<li><a href="../modules/Swipe.html">Swipe</a></li>
|
||||
<li><a href="../modules/Text.html">Text</a></li>
|
||||
<li><a href="../modules/Timer.html">Timer</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>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 <span class="type">Node</span></span>
|
||||
Node name or GUI Node itself
|
||||
</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></span>
|
||||
Button events custom arguments
|
||||
(<em>optional</em>)
|
||||
</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> or <span class="type">Node</span></span>
|
||||
Node to animate instead of trigger node.
|
||||
(<em>optional</em>)
|
||||
</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">bool</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></span>
|
||||
Should return true or false. If true - button can be pressed.
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
<li><span class="parameter">failure_callback</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
Function will be called on button click, if check function return false
|
||||
(<em>optional</em>)
|
||||
</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></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">bool</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></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></span>
|
||||
If true - button will be called inside html5 callback
|
||||
(<em>optional</em>)
|
||||
</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></span>
|
||||
Minimum time to trigger on_hold_callback
|
||||
(<em>default</em> 0.4)
|
||||
</li>
|
||||
<li><span class="parameter">AUTOHOLD_TRIGGER</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
Maximum hold time to trigger button release while holding
|
||||
(<em>default</em> 0.8)
|
||||
</li>
|
||||
<li><span class="parameter">DOUBLETAP_TIME</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
Time between double taps
|
||||
(<em>default</em> 0.4)
|
||||
</li>
|
||||
<li><span class="parameter">on_click</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
(self, node)
|
||||
</li>
|
||||
<li><span class="parameter">on_click_disabled</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
(self, node)
|
||||
</li>
|
||||
<li><span class="parameter">on_hover</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
(self, node, hover_state)
|
||||
</li>
|
||||
<li><span class="parameter">on_mouse_hover</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
(self, node, hover_state)
|
||||
</li>
|
||||
<li><span class="parameter">on_set_enabled</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
(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></span>
|
||||
|
||||
(<em>default</em> 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></span>
|
||||
|
||||
(<em>optional</em>)
|
||||
</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"><span class="type">Node</span></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,354 +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/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
<li><a href="../modules/RichInput.html">RichInput</a></li>
|
||||
<li><a href="../modules/RichText.html">RichText</a></li>
|
||||
<li><a href="../modules/Scroll.html">Scroll</a></li>
|
||||
<li><a href="../modules/Slider.html">Slider</a></li>
|
||||
<li><a href="../modules/StaticGrid.html">StaticGrid</a></li>
|
||||
<li><a href="../modules/Swipe.html">Swipe</a></li>
|
||||
<li><a href="../modules/Text.html">Text</a></li>
|
||||
<li><a href="../modules/Timer.html">Timer</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>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=node[, initial_state=false]])</a></td>
|
||||
<td class="summary">Component init function</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">bool</span></span>
|
||||
Checkbox state
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "init"></a>
|
||||
<strong>init(self, node, callback[, click_node=node[, initial_state=false]])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Component init function
|
||||
|
||||
|
||||
<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></span>
|
||||
Trigger node, by default equals to node
|
||||
(<em>default</em> node)
|
||||
</li>
|
||||
<li><span class="parameter">initial_state</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
The initial state of checkbox, default - false
|
||||
(<em>default</em> 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">bool</span></span>
|
||||
Checkbox state
|
||||
</li>
|
||||
<li><span class="parameter">is_silent</span>
|
||||
<span class="types"><span class="type">bool</span></span>
|
||||
Don't trigger on_change_state if true
|
||||
</li>
|
||||
<li><span class="parameter">is_instant</span>
|
||||
<span class="types"><span class="type">bool</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></span>
|
||||
|
||||
(<em>default</em> node)
|
||||
</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,261 +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/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
<li><a href="../modules/RichInput.html">RichInput</a></li>
|
||||
<li><a href="../modules/RichText.html">RichText</a></li>
|
||||
<li><a href="../modules/Scroll.html">Scroll</a></li>
|
||||
<li><a href="../modules/Slider.html">Slider</a></li>
|
||||
<li><a href="../modules/StaticGrid.html">StaticGrid</a></li>
|
||||
<li><a href="../modules/Swipe.html">Swipe</a></li>
|
||||
<li><a href="../modules/Text.html">Text</a></li>
|
||||
<li><a href="../modules/Timer.html">Timer</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>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=node])</a></td>
|
||||
<td class="summary">Component init function</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">bool[]</span></span>
|
||||
Array if checkboxes state
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "init"></a>
|
||||
<strong>init(self, nodes, callback[, click_nodes=node])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Component init function
|
||||
|
||||
|
||||
<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></span>
|
||||
Array of trigger nodes, by default equals to nodes
|
||||
(<em>default</em> node)
|
||||
</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">bool[]</span></span>
|
||||
Array of checkbox state
|
||||
</li>
|
||||
<li><span class="parameter">is_instant</span>
|
||||
<span class="types"><span class="type">boolean</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,653 +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><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/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
<li><a href="../modules/RichInput.html">RichInput</a></li>
|
||||
<li><a href="../modules/RichText.html">RichText</a></li>
|
||||
<li><a href="../modules/Scroll.html">Scroll</a></li>
|
||||
<li><a href="../modules/Slider.html">Slider</a></li>
|
||||
<li><a href="../modules/StaticGrid.html">StaticGrid</a></li>
|
||||
<li><a href="../modules/Swipe.html">Swipe</a></li>
|
||||
<li><a href="../modules/Text.html">Text</a></li>
|
||||
<li><a href="../modules/Timer.html">Timer</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>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="#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_first_index">get_first_index(self)</a></td>
|
||||
<td class="summary">Return first index from data.</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="#get_last_index">get_last_index(self)</a></td>
|
||||
<td class="summary">Return last index from data</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#get_length">get_length(self)</a></td>
|
||||
<td class="summary">Return amount of data</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#init">init(self, scroll, grid, create_function)</a></td>
|
||||
<td class="summary">Data list 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="#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>
|
||||
</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 visual last data index</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 visual top data index</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 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_first_index"></a>
|
||||
<strong>get_first_index(self)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Return first index from data. It not always equals to 1
|
||||
|
||||
|
||||
<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_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 = "get_last_index"></a>
|
||||
<strong>get_last_index(self)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Return last index from data
|
||||
|
||||
|
||||
<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_length"></a>
|
||||
<strong>get_length(self)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Return amount of data
|
||||
|
||||
|
||||
<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 = "init"></a>
|
||||
<strong>init(self, scroll, grid, create_function)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Data list 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> or <span class="type">DynamicGrid</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 = "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>
|
||||
</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> or <span class="type">DynamicGrid</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 visual last data index
|
||||
|
||||
|
||||
<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 visual top data index
|
||||
|
||||
|
||||
<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,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="#Tables">Tables</a></li>
|
||||
<li><a href="#Fields">Fields</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/BackHandler.html">BackHandler</a></li>
|
||||
<li><a href="../modules/BaseComponent.html">BaseComponent</a></li>
|
||||
<li><a href="../modules/Blocker.html">Blocker</a></li>
|
||||
<li><a href="../modules/Button.html">Button</a></li>
|
||||
<li><a href="../modules/Checkbox.html">Checkbox</a></li>
|
||||
<li><a href="../modules/CheckboxGroup.html">CheckboxGroup</a></li>
|
||||
<li><a href="../modules/DataList.html">DataList</a></li>
|
||||
<li><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/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
<li><a href="../modules/RichInput.html">RichInput</a></li>
|
||||
<li><a href="../modules/RichText.html">RichText</a></li>
|
||||
<li><a href="../modules/Scroll.html">Scroll</a></li>
|
||||
<li><a href="../modules/Slider.html">Slider</a></li>
|
||||
<li><a href="../modules/StaticGrid.html">StaticGrid</a></li>
|
||||
<li><a href="../modules/Swipe.html">Swipe</a></li>
|
||||
<li><a href="../modules/Text.html">Text</a></li>
|
||||
<li><a href="../modules/Timer.html">Timer</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>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">Drag component 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="#on_drag">on_drag</a></td>
|
||||
<td class="summary">on drag progress callback(self, dx, dy, total_x, total_y)</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)</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)</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="#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>
|
||||
Drag component 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"><span class="type">node</span></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">bool</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"><span class="type">node</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">bool</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></span>
|
||||
Distance in pixels to start dragging
|
||||
(<em>default</em> 10)
|
||||
</li>
|
||||
<li><span class="parameter">NO_USE_SCREEN_KOEF</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
If screen aspect ratio affects on drag values
|
||||
(<em>default</em> 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">bool</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">bool</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">bool</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">bool</span></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)
|
||||
|
||||
|
||||
<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)
|
||||
|
||||
|
||||
<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)
|
||||
|
||||
|
||||
<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 = "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,326 +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/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><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/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
<li><a href="../modules/RichInput.html">RichInput</a></li>
|
||||
<li><a href="../modules/RichText.html">RichText</a></li>
|
||||
<li><a href="../modules/Scroll.html">Scroll</a></li>
|
||||
<li><a href="../modules/Slider.html">Slider</a></li>
|
||||
<li><a href="../modules/StaticGrid.html">StaticGrid</a></li>
|
||||
<li><a href="../modules/Swipe.html">Swipe</a></li>
|
||||
<li><a href="../modules/Text.html">Text</a></li>
|
||||
<li><a href="../modules/Timer.html">Timer</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>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="#initialize">initialize(self[, initial_callback])</a></td>
|
||||
<td class="summary">DruidEvent constructor</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="#subscribe">subscribe(self, 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[, 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 = "initialize"></a>
|
||||
<strong>initialize(self[, initial_callback])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
DruidEvent constructor
|
||||
|
||||
|
||||
<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">initial_callback</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
Subscribe the callback on new event, if callback exist
|
||||
(<em>optional</em>)
|
||||
</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(initial_callback)</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">bool</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 = "subscribe"></a>
|
||||
<strong>subscribe(self, 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">context</span>
|
||||
<span class="types"><span class="type">Any</span></span>
|
||||
Additional context as first param to callback call, usually it's self
|
||||
(<em>optional</em>)
|
||||
</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>
|
||||
...
|
||||
<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[, 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">context</span>
|
||||
<span class="types"><span class="type">Any</span></span>
|
||||
Additional context as first param to callback call
|
||||
(<em>optional</em>)
|
||||
</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,798 +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><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/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
<li><a href="../modules/RichInput.html">RichInput</a></li>
|
||||
<li><a href="../modules/RichText.html">RichText</a></li>
|
||||
<li><a href="../modules/Scroll.html">Scroll</a></li>
|
||||
<li><a href="../modules/Slider.html">Slider</a></li>
|
||||
<li><a href="../modules/StaticGrid.html">StaticGrid</a></li>
|
||||
<li><a href="../modules/Swipe.html">Swipe</a></li>
|
||||
<li><a href="../modules/Text.html">Text</a></li>
|
||||
<li><a href="../modules/Timer.html">Timer</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>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=SHIFT.RIGHT[, is_instant=false]]])</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">Component init function</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#remove">remove(self, index[, shift_policy=SHIFT.RIGHT[, is_instant=false]])</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=SHIFT.RIGHT[, is_instant=false]]])</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></span>
|
||||
The node position. By default add as last node
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
<li><span class="parameter">shift_policy</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
How shift nodes, if required. See const.SHIFT
|
||||
(<em>default</em> SHIFT.RIGHT)
|
||||
</li>
|
||||
<li><span class="parameter">is_instant</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
If true, update node positions instantly
|
||||
(<em>default</em> false)
|
||||
</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></span>
|
||||
Index of nearby node
|
||||
(<em>optional</em>)
|
||||
</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>
|
||||
Component init function
|
||||
|
||||
|
||||
<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=SHIFT.RIGHT[, is_instant=false]])</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></span>
|
||||
How shift nodes, if required. See const.SHIFT
|
||||
(<em>default</em> SHIFT.RIGHT)
|
||||
</li>
|
||||
<li><span class="parameter">is_instant</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
If true, update node positions instantly
|
||||
(<em>default</em> false)
|
||||
</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,891 +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/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><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/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
<li><a href="../modules/RichInput.html">RichInput</a></li>
|
||||
<li><a href="../modules/RichText.html">RichText</a></li>
|
||||
<li><a href="../modules/Scroll.html">Scroll</a></li>
|
||||
<li><a href="../modules/Slider.html">Slider</a></li>
|
||||
<li><a href="../modules/StaticGrid.html">StaticGrid</a></li>
|
||||
<li><a href="../modules/Swipe.html">Swipe</a></li>
|
||||
<li><a href="../modules/Text.html">Text</a></li>
|
||||
<li><a href="../modules/Timer.html">Timer</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>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=0], ...)</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, item[, 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_web">helper.is_web()</a></td>
|
||||
<td class="summary">Check if device is HTML5</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=0])</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"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
Array to put elements from source
|
||||
</li>
|
||||
<li><span class="parameter">source</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
The source array to get elements from
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">array</span></span>
|
||||
The target array
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "helper.centrate_nodes"></a>
|
||||
<strong>helper.centrate_nodes([margin=0], ...)</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></span>
|
||||
Offset between nodes
|
||||
(<em>default</em> 0)
|
||||
</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></span>
|
||||
Offset from node position. Pass current node position to get non relative border values
|
||||
(<em>optional</em>)
|
||||
</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">gui.pivot</span></span>
|
||||
The node pivot
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">vector3</span></span>
|
||||
Vector offset with [-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">bool</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, item[, 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">item</span>
|
||||
Item to insert
|
||||
</li>
|
||||
<li><span class="parameter">index</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
Index to insert. If nil, item will be inserted at the end of array
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
<li><span class="parameter">shift_policy</span>
|
||||
<span class="types"><span class="type">const.SHIFT</span></span>
|
||||
Shift policy
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">item</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">bool</span></span>
|
||||
Is mobile
|
||||
</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">bool</span></span>
|
||||
Is web
|
||||
</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></span>
|
||||
Index to remove. If nil, item will be removed from the end of array
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
<li><span class="parameter">shift_policy</span>
|
||||
<span class="types"><span class="type">const.SHIFT</span></span>
|
||||
Shift policy
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">item</span></span>
|
||||
Removed item
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "helper.round"></a>
|
||||
<strong>helper.round(num[, num_decimal_places=0])</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></span>
|
||||
Decimal places
|
||||
(<em>default</em> 0)
|
||||
</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,315 +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/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><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/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
<li><a href="../modules/RichInput.html">RichInput</a></li>
|
||||
<li><a href="../modules/RichText.html">RichText</a></li>
|
||||
<li><a href="../modules/Scroll.html">Scroll</a></li>
|
||||
<li><a href="../modules/Slider.html">Slider</a></li>
|
||||
<li><a href="../modules/StaticGrid.html">StaticGrid</a></li>
|
||||
<li><a href="../modules/Swipe.html">Swipe</a></li>
|
||||
<li><a href="../modules/Text.html">Text</a></li>
|
||||
<li><a href="../modules/Timer.html">Timer</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>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">Component init function</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 = "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">value</span></span>
|
||||
The argument to pass into the callback function
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "init"></a>
|
||||
<strong>init(self, keys, callback[, callback_argument])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Component init function
|
||||
|
||||
|
||||
<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">value</span></span>
|
||||
The argument to pass into the callback function
|
||||
(<em>optional</em>)
|
||||
</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">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></span>
|
||||
|
||||
(<em>default</em> node)
|
||||
</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_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,404 +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><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/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
<li><a href="../modules/RichInput.html">RichInput</a></li>
|
||||
<li><a href="../modules/RichText.html">RichText</a></li>
|
||||
<li><a href="../modules/Scroll.html">Scroll</a></li>
|
||||
<li><a href="../modules/Slider.html">Slider</a></li>
|
||||
<li><a href="../modules/StaticGrid.html">StaticGrid</a></li>
|
||||
<li><a href="../modules/Swipe.html">Swipe</a></li>
|
||||
<li><a href="../modules/Text.html">Text</a></li>
|
||||
<li><a href="../modules/Timer.html">Timer</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>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)</a></td>
|
||||
<td class="summary">Component init function</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="#Fields">Fields</a></h2>
|
||||
<table class="function_list">
|
||||
<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)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Component init function
|
||||
|
||||
|
||||
<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"><span class="type">node</span></span>
|
||||
Gui node
|
||||
</li>
|
||||
<li><span class="parameter">on_hover_callback</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
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">bool</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">bool</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">bool</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"><span class="type">node</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">bool</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">bool</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">bool</span></span>
|
||||
The mouse hover state
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
||||
|
||||
<dl class="function">
|
||||
<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>
|
@ -1,744 +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/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><strong>Input</strong></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
<li><a href="../modules/RichInput.html">RichInput</a></li>
|
||||
<li><a href="../modules/RichText.html">RichText</a></li>
|
||||
<li><a href="../modules/Scroll.html">Scroll</a></li>
|
||||
<li><a href="../modules/Slider.html">Slider</a></li>
|
||||
<li><a href="../modules/StaticGrid.html">StaticGrid</a></li>
|
||||
<li><a href="../modules/Swipe.html">Swipe</a></li>
|
||||
<li><a href="../modules/Text.html">Text</a></li>
|
||||
<li><a href="../modules/Timer.html">Timer</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>Input</code></h1>
|
||||
<p>Druid input text component.</p>
|
||||
<p>
|
||||
Carry on user text input
|
||||
<p> <a href="https://insality.github.io/druid/druid/index.html?example=general_input" target="_blank"><b>Example Link</b></a></p>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<li><strong>Author</strong>: Part of code from Britzl gooey input component</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<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">Return current input field text</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#init">init(self, click_node, text_node[, keyboard_type])</a></td>
|
||||
<td class="summary">Component init function</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#reset_changes">reset_changes(self)</a></td>
|
||||
<td class="summary">Reset current input selection and return previous value</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_max_length">set_max_length(self, max_length)</a></td>
|
||||
<td class="summary">Set maximum length for input field.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#set_text">set_text(self, input_text)</a></td>
|
||||
<td class="summary">Set text for input field</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#unselect">unselect(self)</a></td>
|
||||
<td class="summary">Remove selection from input.</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="#allowerd_characters">allowerd_characters</a></td>
|
||||
<td class="summary">Pattern matching for user input</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#button">button</a></td>
|
||||
<td class="summary">Button component</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#is_empty">is_empty</a></td>
|
||||
<td class="summary">Is current input is empty now</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#is_selected">is_selected</a></td>
|
||||
<td class="summary">Is current input selected now</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#keyboard_type">keyboard_type</a></td>
|
||||
<td class="summary">Gui keyboard type for input field</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#max_length">max_length</a></td>
|
||||
<td class="summary">Max length for input text</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#on_input_empty">on_input_empty</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="#on_input_full">on_input_full</a></td>
|
||||
<td class="summary">On input field text change to max length string callback(self, input_text)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#on_input_select">on_input_select</a></td>
|
||||
<td class="summary">On input field select callback(self, button_node)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#on_input_text">on_input_text</a></td>
|
||||
<td class="summary">On input field text change callback(self, input_text)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#on_input_unselect">on_input_unselect</a></td>
|
||||
<td class="summary">On input field unselect callback(self, input_text)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#on_input_wrong">on_input_wrong</a></td>
|
||||
<td class="summary">On trying user input with not allowed character callback(self, params, button_instance)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#text">text</a></td>
|
||||
<td class="summary">Text component</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>
|
||||
Return current input field text
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Input</span></span>
|
||||
<a href="../modules/Input.html#">Input</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 current input field text
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "init"></a>
|
||||
<strong>init(self, click_node, text_node[, keyboard_type])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Component init function
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Input</span></span>
|
||||
<a href="../modules/Input.html#">Input</a>
|
||||
</li>
|
||||
<li><span class="parameter">click_node</span>
|
||||
<span class="types"><span class="type">node</span></span>
|
||||
Node to enabled input component
|
||||
</li>
|
||||
<li><span class="parameter">text_node</span>
|
||||
<span class="types"><span class="type">node</span> or <span class="type">Text</span></span>
|
||||
Text node what will be changed on user input. You can pass text component instead of text node name <a href="../modules/Text.html#">Text</a>
|
||||
</li>
|
||||
<li><span class="parameter">keyboard_type</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
Gui keyboard type for input field
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "reset_changes"></a>
|
||||
<strong>reset_changes(self)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Reset current input selection and return previous value
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Input</span></span>
|
||||
<a href="../modules/Input.html#">Input</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "select"></a>
|
||||
<strong>select(self)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Select input field. It will show the keyboard and trigger on_select events
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Input</span></span>
|
||||
<a href="../modules/Input.html#">Input</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">Input</span></span>
|
||||
<a href="../modules/Input.html#">Input</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">druid.input</span></span>
|
||||
Current input instance
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "set_max_length"></a>
|
||||
<strong>set_max_length(self, max_length)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set maximum length for input field.
|
||||
Pass nil to make input field unliminted (by default)
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Input</span></span>
|
||||
<a href="../modules/Input.html#">Input</a>
|
||||
</li>
|
||||
<li><span class="parameter">max_length</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
Maximum length for input text field
|
||||
</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_text"></a>
|
||||
<strong>set_text(self, input_text)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set text for input field
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Input</span></span>
|
||||
<a href="../modules/Input.html#">Input</a>
|
||||
</li>
|
||||
<li><span class="parameter">input_text</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
The string to apply for input field
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "unselect"></a>
|
||||
<strong>unselect(self)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Remove selection from input. It will hide the keyboard and trigger on_unselect events
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Input</span></span>
|
||||
<a href="../modules/Input.html#">Input</a>
|
||||
</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">IS_LONGTAP_ERASE</span>
|
||||
<span class="types"><span class="type">bool</span></span>
|
||||
Is long tap will erase current input data
|
||||
(<em>default</em> false)
|
||||
</li>
|
||||
<li><span class="parameter">MASK_DEFAULT_CHAR</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
Default character mask for password input
|
||||
(<em>default</em> *)
|
||||
</li>
|
||||
<li><span class="parameter">IS_UNSELECT_ON_RESELECT</span>
|
||||
<span class="types"><span class="type">bool</span></span>
|
||||
If true, call unselect on select selected input
|
||||
(<em>default</em> false)
|
||||
</li>
|
||||
<li><span class="parameter">NO_CONSUME_INPUT_WHILE_SELECTED</span>
|
||||
<span class="types"><span class="type">bool</span></span>
|
||||
If true, will not consume input while input is selected. It's allow to interact with other components while input is selected (text input still captured)
|
||||
(<em>default</em> false)
|
||||
</li>
|
||||
<li><span class="parameter">on_select</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
(self, button_node) Callback on input field selecting
|
||||
</li>
|
||||
<li><span class="parameter">on_unselect</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
(self, button_node) Callback on input field unselecting
|
||||
</li>
|
||||
<li><span class="parameter">on_input_wrong</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
(self, button_node) Callback on wrong user input
|
||||
</li>
|
||||
<li><span class="parameter">button_style</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
Custom button style for input node
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "allowerd_characters"></a>
|
||||
<strong>allowerd_characters</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Pattern matching for user input
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">allowerd_characters</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "button"></a>
|
||||
<strong>button</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Button component
|
||||
|
||||
|
||||
<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 = "is_empty"></a>
|
||||
<strong>is_empty</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Is current input is empty now
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">is_empty</span>
|
||||
<span class="types"><span class="type">bool</span></span>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "is_selected"></a>
|
||||
<strong>is_selected</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Is current input selected now
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">is_selected</span>
|
||||
<span class="types"><span class="type">bool</span></span>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "keyboard_type"></a>
|
||||
<strong>keyboard_type</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Gui keyboard type for input field
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">keyboard_type</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "max_length"></a>
|
||||
<strong>max_length</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Max length for input text
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">max_length</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "on_input_empty"></a>
|
||||
<strong>on_input_empty</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
On input field text change to empty string callback(self, input_text)
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">on_input_empty</span>
|
||||
<span class="types"><span class="type">DruidEvent</span></span>
|
||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "on_input_full"></a>
|
||||
<strong>on_input_full</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
On input field text change to max length string callback(self, input_text)
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">on_input_full</span>
|
||||
<span class="types"><span class="type">DruidEvent</span></span>
|
||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "on_input_select"></a>
|
||||
<strong>on_input_select</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
On input field select callback(self, button_node)
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">on_input_select</span>
|
||||
<span class="types"><span class="type">DruidEvent</span></span>
|
||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "on_input_text"></a>
|
||||
<strong>on_input_text</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
On input field text change callback(self, input_text)
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">on_input_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_input_unselect"></a>
|
||||
<strong>on_input_unselect</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
On input field unselect callback(self, input_text)
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">on_input_unselect</span>
|
||||
<span class="types"><span class="type">DruidEvent</span></span>
|
||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "on_input_wrong"></a>
|
||||
<strong>on_input_wrong</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
On trying user input with not allowed character callback(self, params, button_instance)
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">on_input_wrong</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>
|
||||
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,375 +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><strong>LangText</strong></li>
|
||||
<li><a href="../modules/Layout.html">Layout</a></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
<li><a href="../modules/RichInput.html">RichInput</a></li>
|
||||
<li><a href="../modules/RichText.html">RichText</a></li>
|
||||
<li><a href="../modules/Scroll.html">Scroll</a></li>
|
||||
<li><a href="../modules/Slider.html">Slider</a></li>
|
||||
<li><a href="../modules/StaticGrid.html">StaticGrid</a></li>
|
||||
<li><a href="../modules/Swipe.html">Swipe</a></li>
|
||||
<li><a href="../modules/Text.html">Text</a></li>
|
||||
<li><a href="../modules/Timer.html">Timer</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>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=downscale])</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="#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></span>
|
||||
Optional param to string.format
|
||||
(<em>optional</em>)
|
||||
</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></span>
|
||||
Optional param to string.format
|
||||
(<em>optional</em>)
|
||||
</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></span>
|
||||
Optional param to string.format
|
||||
(<em>optional</em>)
|
||||
</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></span>
|
||||
Optional param to string.format
|
||||
(<em>optional</em>)
|
||||
</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></span>
|
||||
Optional param to string.format
|
||||
(<em>optional</em>)
|
||||
</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></span>
|
||||
Optional param to string.format
|
||||
(<em>optional</em>)
|
||||
</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></span>
|
||||
Optional param to string.format
|
||||
(<em>optional</em>)
|
||||
</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=downscale])</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 <span class="type">node</span></span>
|
||||
Node name or GUI Text Node itself
|
||||
</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>
|
||||
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></span>
|
||||
Adjust type for text. By default is DOWNSCALE. Look const.TEXT_ADJUST for reference
|
||||
(<em>default</em> downscale)
|
||||
</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></span>
|
||||
Optional param to string.format
|
||||
(<em>optional</em>)
|
||||
</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></span>
|
||||
Optional param to string.format
|
||||
(<em>optional</em>)
|
||||
</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></span>
|
||||
Optional param to string.format
|
||||
(<em>optional</em>)
|
||||
</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></span>
|
||||
Optional param to string.format
|
||||
(<em>optional</em>)
|
||||
</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></span>
|
||||
Optional param to string.format
|
||||
(<em>optional</em>)
|
||||
</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></span>
|
||||
Optional param to string.format
|
||||
(<em>optional</em>)
|
||||
</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></span>
|
||||
Optional param to string.format
|
||||
(<em>optional</em>)
|
||||
</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 = "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,498 +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><strong>Layout</strong></li>
|
||||
<li><a href="../modules/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
<li><a href="../modules/RichInput.html">RichInput</a></li>
|
||||
<li><a href="../modules/RichText.html">RichText</a></li>
|
||||
<li><a href="../modules/Scroll.html">Scroll</a></li>
|
||||
<li><a href="../modules/Slider.html">Slider</a></li>
|
||||
<li><a href="../modules/StaticGrid.html">StaticGrid</a></li>
|
||||
<li><a href="../modules/Swipe.html">Swipe</a></li>
|
||||
<li><a href="../modules/Text.html">Text</a></li>
|
||||
<li><a href="../modules/Timer.html">Timer</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>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="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#fit_into_node">fit_into_node(self[, node])</a></td>
|
||||
<td class="summary">Set node for layout node to fit inside it.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#fit_into_size">fit_into_size(self, target_size)</a></td>
|
||||
<td class="summary">Set size for layout node to fit inside it</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#fit_into_window">fit_into_window(self)</a></td>
|
||||
<td class="summary">Set current size for layout node to fit inside it</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#init">init(self, node, mode[, on_size_changed_callback])</a></td>
|
||||
<td class="summary">Component init function</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#set_max_gui_upscale">set_max_gui_upscale(self, max_gui_upscale)</a></td>
|
||||
<td class="summary">Set max gui upscale for FIT adjust mode (or side).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#set_max_size">set_max_size(self, max_size)</a></td>
|
||||
<td class="summary">Set maximum size of layout node</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#set_min_size">set_min_size(self, min_size)</a></td>
|
||||
<td class="summary">Set minimal size of layout node</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#set_origin_position">set_origin_position(self, new_origin_position)</a></td>
|
||||
<td class="summary">Set new origin position of layout node.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#set_origin_size">set_origin_size(self, new_origin_size)</a></td>
|
||||
<td class="summary">Set new origin size of layout node.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<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>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#on_size_changed">on_size_changed</a></td>
|
||||
<td class="summary">On window resize callback(self, new_size)</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "fit_into_node"></a>
|
||||
<strong>fit_into_node(self[, node])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set node for layout node to fit inside it. Pass nil to reset
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Layout</span></span>
|
||||
<a href="../modules/Layout.html#">Layout</a>
|
||||
</li>
|
||||
<li><span class="parameter">node</span>
|
||||
<span class="types"><span class="type">Node</span></span>
|
||||
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">Layout</span></span>
|
||||
<a href="../modules/Layout.html#">Layout</a>
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "fit_into_size"></a>
|
||||
<strong>fit_into_size(self, target_size)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set size for layout node to fit inside it
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Layout</span></span>
|
||||
<a href="../modules/Layout.html#">Layout</a>
|
||||
</li>
|
||||
<li><span class="parameter">target_size</span>
|
||||
<span class="types"><span class="type">vector3</span></span>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">Layout</span></span>
|
||||
<a href="../modules/Layout.html#">Layout</a>
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "fit_into_window"></a>
|
||||
<strong>fit_into_window(self)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set current size for layout node to fit inside it
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Layout</span></span>
|
||||
<a href="../modules/Layout.html#">Layout</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">Layout</span></span>
|
||||
<a href="../modules/Layout.html#">Layout</a>
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "init"></a>
|
||||
<strong>init(self, node, mode[, on_size_changed_callback])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Component init function
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Layout</span></span>
|
||||
<a href="../modules/Layout.html#">Layout</a>
|
||||
</li>
|
||||
<li><span class="parameter">node</span>
|
||||
<span class="types"><a class="type" href="../modules/Layout.html#node">node</a></span>
|
||||
Gui node
|
||||
</li>
|
||||
<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>
|
||||
The layout mode (from const.LAYOUT_MODE)
|
||||
</li>
|
||||
<li><span class="parameter">on_size_changed_callback</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
The callback on window resize
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "set_max_gui_upscale"></a>
|
||||
<strong>set_max_gui_upscale(self, max_gui_upscale)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set max gui upscale for FIT adjust mode (or side). It happens on bigger render gui screen
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Layout</span></span>
|
||||
<a href="../modules/Layout.html#">Layout</a>
|
||||
</li>
|
||||
<li><span class="parameter">max_gui_upscale</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">Layout</span></span>
|
||||
<a href="../modules/Layout.html#">Layout</a>
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "set_max_size"></a>
|
||||
<strong>set_max_size(self, max_size)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set maximum size of layout node
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Layout</span></span>
|
||||
<a href="../modules/Layout.html#">Layout</a>
|
||||
</li>
|
||||
<li><span class="parameter">max_size</span>
|
||||
<span class="types"><span class="type">vector3</span></span>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">Layout</span></span>
|
||||
<a href="../modules/Layout.html#">Layout</a>
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "set_min_size"></a>
|
||||
<strong>set_min_size(self, min_size)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set minimal size of layout node
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Layout</span></span>
|
||||
<a href="../modules/Layout.html#">Layout</a>
|
||||
</li>
|
||||
<li><span class="parameter">min_size</span>
|
||||
<span class="types"><span class="type">vector3</span></span>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">Layout</span></span>
|
||||
<a href="../modules/Layout.html#">Layout</a>
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "set_origin_position"></a>
|
||||
<strong>set_origin_position(self, new_origin_position)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set new origin position of layout node. You should apply this on node movement
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Layout</span></span>
|
||||
<a href="../modules/Layout.html#">Layout</a>
|
||||
</li>
|
||||
<li><span class="parameter">new_origin_position</span>
|
||||
<span class="types"><span class="type">vector3</span></span>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">Layout</span></span>
|
||||
<a href="../modules/Layout.html#">Layout</a>
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "set_origin_size"></a>
|
||||
<strong>set_origin_size(self, new_origin_size)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set new origin size of layout node. You should apply this on node manual size change
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Layout</span></span>
|
||||
<a href="../modules/Layout.html#">Layout</a>
|
||||
</li>
|
||||
<li><span class="parameter">new_origin_size</span>
|
||||
<span class="types"><span class="type">vector3</span></span>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">Layout</span></span>
|
||||
<a href="../modules/Layout.html#">Layout</a>
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<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>
|
||||
<dt>
|
||||
<a name = "on_size_changed"></a>
|
||||
<strong>on_size_changed</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
On window resize callback(self, new_size)
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">on_size_changed</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,300 +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">Component init function</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=1])</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>
|
||||
Component init function
|
||||
|
||||
|
||||
<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=1])</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></span>
|
||||
The spin speed multiplier
|
||||
(<em>default</em> 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">bool</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,577 +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/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><strong>Progress</strong></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>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=1])</a></td>
|
||||
<td class="summary"><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=1])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
<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></span>
|
||||
Initial value of progress bar
|
||||
(<em>default</em> 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></span>
|
||||
Callback on animation ends
|
||||
(<em>optional</em>)
|
||||
</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></span>
|
||||
Progress bas fill rate. More -> faster
|
||||
(<em>default</em> 5)
|
||||
</li>
|
||||
<li><span class="parameter">MIN_DELTA</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
Minimum step to fill progress bar
|
||||
(<em>default</em> 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,261 +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/PinKnob.html">PinKnob</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=node])</a></td>
|
||||
<td class="summary">Component init function</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=node])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Component init function
|
||||
|
||||
|
||||
<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></span>
|
||||
Array of trigger nodes, by default equals to nodes
|
||||
(<em>default</em> node)
|
||||
</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></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,270 +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/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</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="#init">init(self, template, nodes)</a></td>
|
||||
<td class="summary">Component init function</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>
|
||||
</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="#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="#placeholder">placeholder</a></td>
|
||||
<td class="summary">On input field text change to max length 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 = "init"></a>
|
||||
<strong>init(self, template, nodes)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Component init function
|
||||
|
||||
|
||||
<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 = "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>
|
||||
</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 = "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 = "placeholder"></a>
|
||||
<strong>placeholder</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
On input field text change to max length string callback(self, input_text)
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">placeholder</span>
|
||||
<span class="types"><span class="type">druid.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,430 +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>
|
||||
</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><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> All parameters for the Rich Text component are adjusted in the GUI scene.
|
||||
<p> This component uses GUI component template. (/druid/custom/rich_text/rich_text.gui).
|
||||
<p> You able to customize it or make your own with the next node scructure:
|
||||
<p> root
|
||||
<p> - text_prefab
|
||||
<p> - icon_prefab
|
||||
<p> <b># Rich Text Setup #</b>
|
||||
<p> • Root node size: Set the maximum width and height of the text.
|
||||
<p> • Root anchor: Define the alignment of the Rich Text inside the root node size area.
|
||||
<p> • Text prefab: Configure all default text parameters for the text node.
|
||||
<p> • Text prefab anchor: Set the anchor for each text node (adjust this only if animating text).
|
||||
<p> • Icon prefab: Configure all default node parameters for the icon node.
|
||||
<p> • Icon prefab anchor: Set the anchor for each icon node (adjust this only if animating the icon).
|
||||
<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,
|
||||
default_animation: string,
|
||||
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="#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_words">get_words()</a></td>
|
||||
<td class="summary">Get all current words.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#init">init(self, template, nodes)</a></td>
|
||||
<td class="summary">Rich Text component 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(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>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<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_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, template, nodes)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Rich Text component 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">template</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
The Rich Text 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></span>
|
||||
The node table, if prefab was copied by gui.clone_tree()
|
||||
</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></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(tag)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Get all words, which has a passed tag.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<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></span>
|
||||
Rich Text color aliases
|
||||
(<em>default</em> {})
|
||||
</li>
|
||||
<li><span class="parameter">ADJUST_STEPS</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
Amount steps of attemps text adjust by height
|
||||
(<em>default</em> 20)
|
||||
</li>
|
||||
<li><span class="parameter">ADJUST_SCALE_DELTA</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
Scale step on each height adjust step
|
||||
(<em>default</em> 0.02)
|
||||
</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,477 +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/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><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">Component init function</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_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>
|
||||
Component init function
|
||||
|
||||
|
||||
<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></span>
|
||||
On slider change callback
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</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">bool</span></span>
|
||||
Don't trigger event if true
|
||||
(<em>optional</em>)
|
||||
</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"><span class="type">Node</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">number</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">bool</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>
|
@ -1,971 +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/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><strong>StaticGrid</strong></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>StaticGrid</code></h1>
|
||||
<p>Component to handle component's position by row and columns.</p>
|
||||
<p>
|
||||
<b># Overview #</b>
|
||||
<p> The Static Grid component allows for positioning components in rows and columns.
|
||||
It provides a static grid layout with constant node sizes, allowing for pre-calculated
|
||||
node positions and the option to include gaps between nodes.
|
||||
<p> <b># Notes #</b>
|
||||
<p> • In a static grid, the node size remains constant, enabling the calculation of node
|
||||
positions before placement. If you want add gaps between nodes, increase the root prefab size,
|
||||
including the padding and margin.
|
||||
<p> • The static grid can automatically shift elements when nodes are added or removed.
|
||||
<p> • When a node is added, the grid will set the node's parent to the specified parent_node.
|
||||
<p> • You can obtain an array of positions for each element, which can be used to set
|
||||
points of interest in a scroll component.
|
||||
<p> • The size of all elements can be retrieved for setting up the size in a scroll component.
|
||||
<p> • The grid can be bound to a scroll component for automatic resizing of the scroll content size.
|
||||
<p> • The pivot of the parent_node affects the node placement within the grid.
|
||||
<p> • A prefab node is used to determine the node size and anchor.
|
||||
<p> • You can specify a position_function for animations using the
|
||||
_static_grid:set_position_function(node, pos) callback. The default position function is gui.set_position().
|
||||
<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="#add">add(self, item[, index[, shift_policy=SHIFT.RIGHT[, is_instant=false]]])</a></td>
|
||||
<td class="summary">Add new item 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">get_index(self, pos)</a></td>
|
||||
<td class="summary">Return index for grid pos</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 StaticGrid offset, where StaticGrid content starts.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#get_pos">get_pos(self, 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)</a></td>
|
||||
<td class="summary">Return grid content size</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#init">init(self, parent, element[, in_row=1])</a></td>
|
||||
<td class="summary">The <a href="../modules/StaticGrid.html#">StaticGrid</a> constructor</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#remove">remove(self, index[, shift_policy=SHIFT.RIGHT[, is_instant=false]])</a></td>
|
||||
<td class="summary">Remove the item from the grid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#set_anchor">set_anchor(self, anchor)</a></td>
|
||||
<td class="summary">Set grid anchor.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#set_in_row">set_in_row(self, in_row)</a></td>
|
||||
<td class="summary">Set new in_row elements for 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="#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="#anchor">anchor</a></td>
|
||||
<td class="summary">Item anchor [0..1]</td>
|
||||
</tr>
|
||||
<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 nodes</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, remove or change in_row callback(self, index|nil)</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>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#pivot">pivot</a></td>
|
||||
<td class="summary">Item pivot [-0.5..0.5]</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, item[, index[, shift_policy=SHIFT.RIGHT[, is_instant=false]]])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Add new item to the grid
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">StaticGrid</span></span>
|
||||
<a href="../modules/StaticGrid.html#">StaticGrid</a>
|
||||
</li>
|
||||
<li><span class="parameter">item</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></span>
|
||||
The item position. By default add as last item
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
<li><span class="parameter">shift_policy</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
How shift nodes, if required. See const.SHIFT
|
||||
(<em>default</em> SHIFT.RIGHT)
|
||||
</li>
|
||||
<li><span class="parameter">is_instant</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
If true, update node positions instantly
|
||||
(<em>default</em> false)
|
||||
</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 static_grid.nodes array before grid:clear
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">StaticGrid</span></span>
|
||||
<a href="../modules/StaticGrid.html#">StaticGrid</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">druid.static_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">StaticGrid</span></span>
|
||||
<a href="../modules/StaticGrid.html#">StaticGrid</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">StaticGrid</span></span>
|
||||
<a href="../modules/StaticGrid.html#">StaticGrid</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"></a>
|
||||
<strong>get_index(self, pos)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Return index for grid pos
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">StaticGrid</span></span>
|
||||
<a href="../modules/StaticGrid.html#">StaticGrid</a>
|
||||
</li>
|
||||
<li><span class="parameter">pos</span>
|
||||
<span class="types"><span class="type">vector3</span></span>
|
||||
The node position 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_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">StaticGrid</span></span>
|
||||
<a href="../modules/StaticGrid.html#">StaticGrid</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 StaticGrid offset, where StaticGrid content starts.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">StaticGrid</span></span>
|
||||
<a href="../modules/StaticGrid.html#">StaticGrid</a> The StaticGrid instance
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">vector3</span></span>
|
||||
The StaticGrid offset
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "get_pos"></a>
|
||||
<strong>get_pos(self, 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">StaticGrid</span></span>
|
||||
<a href="../modules/StaticGrid.html#">StaticGrid</a>
|
||||
</li>
|
||||
<li><span class="parameter">index</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
The grid element index
|
||||
</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)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Return grid content size
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">StaticGrid</span></span>
|
||||
<a href="../modules/StaticGrid.html#">StaticGrid</a>
|
||||
</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, element[, in_row=1])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
The <a href="../modules/StaticGrid.html#">StaticGrid</a> constructor
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">StaticGrid</span></span>
|
||||
<a href="../modules/StaticGrid.html#">StaticGrid</a>
|
||||
</li>
|
||||
<li><span class="parameter">parent</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>
|
||||
The GUI Node container, where grid's items will be placed
|
||||
</li>
|
||||
<li><span class="parameter">element</span>
|
||||
<span class="types"><span class="type">node</span></span>
|
||||
Element prefab. Need to get it size
|
||||
</li>
|
||||
<li><span class="parameter">in_row</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
How many nodes in row can be placed
|
||||
(<em>default</em> 1)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "remove"></a>
|
||||
<strong>remove(self, index[, shift_policy=SHIFT.RIGHT[, is_instant=false]])</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">StaticGrid</span></span>
|
||||
<a href="../modules/StaticGrid.html#">StaticGrid</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></span>
|
||||
How shift nodes, if required. See const.SHIFT
|
||||
(<em>default</em> SHIFT.RIGHT)
|
||||
</li>
|
||||
<li><span class="parameter">is_instant</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
If true, update node positions instantly
|
||||
(<em>default</em> false)
|
||||
</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_anchor"></a>
|
||||
<strong>set_anchor(self, anchor)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set grid anchor. Default anchor is equal to anchor of grid parent node
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">StaticGrid</span></span>
|
||||
<a href="../modules/StaticGrid.html#">StaticGrid</a>
|
||||
</li>
|
||||
<li><span class="parameter">anchor</span>
|
||||
<span class="types"><span class="type">vector3</span></span>
|
||||
Anchor
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "set_in_row"></a>
|
||||
<strong>set_in_row(self, in_row)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set new in_row elements for grid
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">StaticGrid</span></span>
|
||||
<a href="../modules/StaticGrid.html#">StaticGrid</a>
|
||||
</li>
|
||||
<li><span class="parameter">in_row</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
The new in_row value
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">druid.static_grid</span></span>
|
||||
Current grid instance
|
||||
</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">StaticGrid</span></span>
|
||||
<a href="../modules/StaticGrid.html#">StaticGrid</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.static_grid</span></span>
|
||||
Current grid 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">IS_DYNAMIC_NODE_POSES</span>
|
||||
<span class="types"><span class="type">bool</span></span>
|
||||
If true, always center grid content as grid pivot sets
|
||||
(<em>default</em> false)
|
||||
</li>
|
||||
<li><span class="parameter">IS_ALIGN_LAST_ROW</span>
|
||||
<span class="types"><span class="type">bool</span></span>
|
||||
If true, always align last row of the grid as grid pivot sets
|
||||
(<em>default</em> false)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "anchor"></a>
|
||||
<strong>anchor</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Item anchor [0..1]
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">anchor</span>
|
||||
<span class="types"><span class="type">vector3</span></span>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<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 nodes
|
||||
|
||||
|
||||
<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, remove or change in_row callback(self, index|nil)
|
||||
|
||||
|
||||
<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>
|
||||
<dt>
|
||||
<a name = "pivot"></a>
|
||||
<strong>pivot</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Item pivot [-0.5..0.5]
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">pivot</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,296 +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/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><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">Component init function</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#set_click_zone">set_click_zone(self, zone)</a></td>
|
||||
<td class="summary">Strict swipe click area.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a href="#Tables">Tables</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#style">style</a></td>
|
||||
<td class="summary">Component style params.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a href="#Fields">Fields</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#click_zone">click_zone</a></td>
|
||||
<td class="summary">Restriction zone</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#node">node</a></td>
|
||||
<td class="summary">Swipe node</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#on_swipe">on_swipe</a></td>
|
||||
<td class="summary">Trigger on swipe event(self, swipe_side, dist, delta_time)</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "init"></a>
|
||||
<strong>init(self, node, on_swipe_callback)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Component init function
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Swipe</span></span>
|
||||
<a href="../modules/Swipe.html#">Swipe</a>
|
||||
</li>
|
||||
<li><span class="parameter">node</span>
|
||||
<span class="types"><a class="type" href="../modules/Swipe.html#node">node</a></span>
|
||||
Gui node
|
||||
</li>
|
||||
<li><span class="parameter">on_swipe_callback</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
Swipe callback for on_swipe_end event
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "set_click_zone"></a>
|
||||
<strong>set_click_zone(self, zone)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Strict swipe click area. Useful for
|
||||
restrict events outside stencil node
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">Swipe</span></span>
|
||||
<a href="../modules/Swipe.html#">Swipe</a>
|
||||
</li>
|
||||
<li><span class="parameter">zone</span>
|
||||
<span class="types"><a class="type" href="../modules/Swipe.html#node">node</a></span>
|
||||
Gui node
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "style"></a>
|
||||
<strong>style</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Component style params.
|
||||
You can override this component styles params in druid styles table
|
||||
or create your own style
|
||||
|
||||
|
||||
<h3>Fields:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">SWIPE_TIME</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
Maximum time for swipe trigger
|
||||
(<em>default</em> 0.4)
|
||||
</li>
|
||||
<li><span class="parameter">SWIPE_THRESHOLD</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
Minimum distance for swipe trigger
|
||||
(<em>default</em> 50)
|
||||
</li>
|
||||
<li><span class="parameter">SWIPE_TRIGGER_ON_MOVE</span>
|
||||
<span class="types"><span class="type">bool</span></span>
|
||||
If true, trigger on swipe moving, not only release action
|
||||
(<em>default</em> false)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "click_zone"></a>
|
||||
<strong>click_zone</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Restriction zone
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">click_zone</span>
|
||||
<span class="types"><a class="type" href="../modules/Swipe.html#node">node</a></span>
|
||||
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "node"></a>
|
||||
<strong>node</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Swipe node
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">node</span>
|
||||
<span class="types"><a class="type" href="../modules/Swipe.html#node">node</a></span>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "on_swipe"></a>
|
||||
<strong>on_swipe</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Trigger on swipe event(self, swipe_side, dist, delta_time)
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">on_swipe</span>
|
||||
<span class="types"><span class="type">DruidEvent</span></span>
|
||||
) <a href="../modules/DruidEvent.html#">DruidEvent</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc TESTING</a></i>
|
||||
<i style="float:right;">Last updated 2015-01-01 12:00:00 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
@ -1,851 +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/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><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_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=downscale]])</a></td>
|
||||
<td class="summary"><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_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="#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_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>
|
||||
|
||||
(<em>optional</em>)
|
||||
</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=downscale]])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
<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></span>
|
||||
Initial text. Default value is node text from GUI scene.
|
||||
(<em>optional</em>)
|
||||
</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></span>
|
||||
Adjust type for text. By default is DOWNSCALE. Look const.TEXT_ADJUST for reference
|
||||
(<em>default</em> 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">bool</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">gui.pivot</span></span>
|
||||
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_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"><span class="type">number</span></span>
|
||||
See const.TEXT_ADJUST. If pass nil - use current adjust type
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
<li><span class="parameter">minimal_scale</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
If pass nil - not use minimal scale
|
||||
(<em>optional</em>)
|
||||
</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></span>
|
||||
The postfix for TRIM adjust type
|
||||
(<em>default</em> ...)
|
||||
</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></span>
|
||||
The default adjust type for any text component
|
||||
(<em>default</em> DOWNSCALE)
|
||||
</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 = "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,415 +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/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><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=0[, callback]])</a></td>
|
||||
<td class="summary">Component init function</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=0[, callback]])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Component init function
|
||||
|
||||
|
||||
<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></span>
|
||||
Start timer value in seconds
|
||||
</li>
|
||||
<li><span class="parameter">seconds_to</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
End timer value in seconds
|
||||
(<em>default</em> 0)
|
||||
</li>
|
||||
<li><span class="parameter">callback</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
Function on timer end
|
||||
(<em>optional</em>)
|
||||
</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">bool</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,394 +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 Library</title>
|
||||
<link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
<!-- Menu -->
|
||||
|
||||
<div id="navigation">
|
||||
<br/>
|
||||
<h1>Druid</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Functions">Functions</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/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/Swipe.html">Swipe</a></li>
|
||||
<li><a href="../modules/Text.html">Text</a></li>
|
||||
<li><a href="../modules/BaseComponent.html">BaseComponent</a></li>
|
||||
<li><a href="../modules/druid.html">druid</a></li>
|
||||
<li><a href="../modules/DruidEvent.html">DruidEvent</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/DynamicGrid.html">DynamicGrid</a></li>
|
||||
<li><a href="../modules/Input.html">Input</a></li>
|
||||
<li><a href="../modules/LangText.html">LangText</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
<li><a href="../modules/Slider.html">Slider</a></li>
|
||||
<li><a href="../modules/Timer.html">Timer</a></li>
|
||||
<li><strong>druid.helper</strong></li>
|
||||
<li><a href="../modules/DruidInstance.html">DruidInstance</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>druid.helper</code></h1>
|
||||
<p>Text node or icon node can be nil</p>
|
||||
<p></p>
|
||||
|
||||
|
||||
<h2><a href="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#centrate_text_with_icon">centrate_text_with_icon([text_node][, icon_node], margin)</a></td>
|
||||
<td class="summary">Center two nodes.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#centrate_icon_with_text">centrate_icon_with_text([icon_node[, text_node[, margin=0]]])</a></td>
|
||||
<td class="summary">Center two nodes.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#centrate_nodes">centrate_nodes([margin=0[, ...]])</a></td>
|
||||
<td class="summary">Center several nodes nodes.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#is_enabled">is_enabled(node)</a></td>
|
||||
<td class="summary">Check if node is enabled in gui hierarchy.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#get_closest_stencil_node">get_closest_stencil_node(node)</a></td>
|
||||
<td class="summary">Return closest non inverted clipping parent node for node</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#get_pivot_offset">get_pivot_offset(pivot)</a></td>
|
||||
<td class="summary">Get node offset for given gui pivot</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#helper..is_mobile">helper..is_mobile()</a></td>
|
||||
<td class="summary">Check if device is mobile (Android or iOS)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#is_web">is_web()</a></td>
|
||||
<td class="summary">Check if device is HTML5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#get_border">get_border(node, offset)</a></td>
|
||||
<td class="summary">Distance from node position to his borders</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#deprecated">deprecated(message)</a></td>
|
||||
<td class="summary">Show deprecated message.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "centrate_text_with_icon"></a>
|
||||
<strong>centrate_text_with_icon([text_node][, icon_node], margin)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Center two nodes.
|
||||
Nodes will be center around 0 x position
|
||||
text_node will be first (at left side)
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">text_node</span>
|
||||
<span class="types"><span class="type">text</span></span>
|
||||
Gui text node
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
<li><span class="parameter">icon_node</span>
|
||||
<span class="types"><span class="type">box</span></span>
|
||||
Gui box node
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
<li><span class="parameter">margin</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
Offset between nodes
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "centrate_icon_with_text"></a>
|
||||
<strong>centrate_icon_with_text([icon_node[, text_node[, margin=0]]])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Center two nodes.
|
||||
Nodes will be center around 0 x position
|
||||
icon_node will be first (at left side)
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">icon_node</span>
|
||||
<span class="types"><span class="type">box</span></span>
|
||||
Gui box node
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
<li><span class="parameter">text_node</span>
|
||||
<span class="types"><span class="type">text</span></span>
|
||||
Gui text node
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
<li><span class="parameter">margin</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
Offset between nodes
|
||||
(<em>default</em> 0)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "centrate_nodes"></a>
|
||||
<strong>centrate_nodes([margin=0[, ...]])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Center several nodes nodes.
|
||||
Nodes will be center around 0 x position
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">margin</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
Offset between nodes
|
||||
(<em>default</em> 0)
|
||||
</li>
|
||||
<li><span class="parameter">...</span>
|
||||
<span class="types"><span class="type">Node</span></span>
|
||||
Any count of gui Node
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "is_enabled"></a>
|
||||
<strong>is_enabled(node)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Check if node is enabled in gui hierarchy.
|
||||
Return false, if node or any his parent is disabled
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">node</span>
|
||||
<span class="types"><span class="type">node</span></span>
|
||||
Gui node
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">bool</span></span>
|
||||
Is enabled in hierarchy
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "get_closest_stencil_node"></a>
|
||||
<strong>get_closest_stencil_node(node)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Return closest non inverted clipping parent node for 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 clipping node
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "get_pivot_offset"></a>
|
||||
<strong>get_pivot_offset(pivot)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Get node offset for given gui pivot
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">pivot</span>
|
||||
<span class="types"><span class="type">gui.pivot</span></span>
|
||||
The node pivot
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">vector3</span></span>
|
||||
Vector offset with [-1..1] values
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "helper..is_mobile"></a>
|
||||
<strong>helper..is_mobile()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Check if device is mobile (Android or iOS)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "is_web"></a>
|
||||
<strong>is_web()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Check if device is HTML5
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "get_border"></a>
|
||||
<strong>get_border(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>
|
||||
The gui node to check
|
||||
</li>
|
||||
<li><span class="parameter">offset</span>
|
||||
<span class="types"><span class="type">vector3</span></span>
|
||||
The offset to add to result
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
vector4 Vector with distance to node border: (left, top, right, down)
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "deprecated"></a>
|
||||
<strong>deprecated(message)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Show deprecated message. Once time per message
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">message</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
The deprecated message
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2022-02-12 17:16:44 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
@ -1,379 +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/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><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/PinKnob.html">PinKnob</a></li>
|
||||
<li><a href="../modules/Progress.html">Progress</a></li>
|
||||
<li><a href="../modules/RadioGroup.html">RadioGroup</a></li>
|
||||
<li><a href="../modules/RichInput.html">RichInput</a></li>
|
||||
<li><a href="../modules/RichText.html">RichText</a></li>
|
||||
<li><a href="../modules/Scroll.html">Scroll</a></li>
|
||||
<li><a href="../modules/Slider.html">Slider</a></li>
|
||||
<li><a href="../modules/StaticGrid.html">StaticGrid</a></li>
|
||||
<li><a href="../modules/Swipe.html">Swipe</a></li>
|
||||
<li><a href="../modules/Text.html">Text</a></li>
|
||||
<li><a href="../modules/Timer.html">Timer</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>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></span>
|
||||
The Druid style table to override style parameters for this Druid instance.
|
||||
(<em>optional</em>)
|
||||
</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>
|
@ -477,11 +477,12 @@ Have a good day!
|
||||
- **#219**: [System] UTF-8 performance optimization. Now Druid will try to use *utf8* native extension over lua utf8 library if exists. If you wanna use native utf8, just [add the extension](https://github.com/d954mas/defold-utf8) in your `game.project` dependency.
|
||||
- **#156**: [Button] Now button can work in HTML5 with `html5.set_interaction_listener`.
|
||||
- The API is `button:set_web_user_interaction(true)`. In HTML5 mode button have several restrictions. Basically, only the single tap event will work.
|
||||
- **#227**: Update current URL in HTML5 example
|
||||
- **#227**: [System] Update current URL in HTML5 example
|
||||
- Now if you will open the example from direct URL, it will be updated to the current URL in your browser. So now it's much easier to share the example link with each other.
|
||||
- **#183**: Documentation about [GUI in World Space](https://forum.defold.com/t/how-to-gui-in-defold/73256#gui-in-world-coordinates-49)
|
||||
- **#183**: [Docs] Documentation about [GUI in World Space](https://forum.defold.com/t/how-to-gui-in-defold/73256#gui-in-world-coordinates-49)
|
||||
- Also not only the GUI in World Space, but overall How to GUI in Defold article.
|
||||
- **#234**: [BREAKING][Blocker] Now `blocker:set_enabled` and `blocker:is_enabled` affects only inner state of component. To consume input, the blocker component should be enabled and the node itself should be enabled.
|
||||
- **#234**: [**BREAKING**] [Blocker] Now `blocker:set_enabled` and `blocker:is_enabled` affects only inner state of component. To consume input, the blocker component should be enabled and the node itself should be enabled.
|
||||
- Breaking due the changes can affect your current logic. Please if use this re-check Blocker component usage.
|
||||
- **#235**: [Drag] Fix Drag coordinates on streched screen.
|
||||
- **#236**: [Hover] Fix nil return in `hover:on_input`.
|
||||
- **#237**: [Layout] Add `layout:set_max_gui_upscale` function.
|
||||
@ -490,13 +491,12 @@ Have a good day!
|
||||
- [System] Now the documentation contains the **Druid** size. The current size as dependency is around **67KB**. It counted without extended components, which is not included by default in the build.
|
||||
|
||||
|
||||
Thanks to the my supporters:
|
||||
- [Defold Foundation](https://defold.com)
|
||||
- [Ragetto](https://forum.defold.com/u/ragetto)
|
||||
|
||||
❤️ Support ❤️
|
||||
|
||||
Please support me if you like this project! It will help me keep engaged to update **Druid** and make it even better!
|
||||
|
||||
[](https://github.com/sponsors/insality) [](https://ko-fi.com/insality) [](https://www.buymeacoffee.com/insality)
|
||||
|
||||
|
||||
Thanks for my the supporters:
|
||||
- [Defold Foundation](https://defold.com)
|
||||
- [Ragetto](https://forum.defold.com/u/ragetto)
|
||||
|
Loading…
x
Reference in New Issue
Block a user