Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Insality committed Jun 14, 2020
2 parents 5035dcb + 80ad0dc commit 5f873c2
Show file tree
Hide file tree
Showing 47 changed files with 293 additions and 98 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[![GitHub release (latest by date)](https://img.shields.io/github/v/release/insality/druid)](https://github.com/Insality/druid/releases)

**Druid** - powerful defold component UI library. Use basic **Druid** components or make your own game-specific components to make amazing GUI in your games.
**Druid** - powerful Defold component UI library. Use basic **Druid** components or make your own game-specific components to make amazing GUI in your games.


## Setup
Expand Down Expand Up @@ -184,18 +184,19 @@ function on_message(self, message_id, message, sender)
end
```

- *final* required function for correct druid lifecycle
- *on_input* used for almost all basic druid components
- *update* used for progress bar, scroll and timer base components
- *on_message* used for specific druid events, like language change or layout change
- *final* used for custom components, what have to do several action before destroy

Recommended is fully integrate al druid lifecycles functions
Recommended is fully integrate all druid lifecycles functions


## Features

- Druid input goes as stack. Last created button will checked first. So create your GUI from back
- Don't forget about `return` in `on_input`: `return self.druid:on_input()`. It need, if you have more than 1 acquire inputs (several druid, other input system, etc)
- Druid by default do _acquire_input_focus_. So you don't need do it manually. Buy only if you have components, which requires _on_input_


## Examples
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ <h2>Topics</h2>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-05-09 16:07:15 </i>
<i style="float:right;">Last updated 2020-06-14 20:13:02 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/component.html
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ <h3>Parameters:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-05-09 16:07:15 </i>
<i style="float:right;">Last updated 2020-06-14 20:13:02 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/druid.back_handler.html
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ <h3>Fields:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-05-09 16:07:15 </i>
<i style="float:right;">Last updated 2020-06-14 20:13:02 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/druid.blocker.html
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ <h3>Fields:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-05-09 16:07:15 </i>
<i style="float:right;">Last updated 2020-06-14 20:13:02 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
36 changes: 23 additions & 13 deletions docs/modules/druid.button.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ <h2><a href="#Functions">Functions</a></h2>
<td class="summary">Return button enabled state</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_click_zone">set_click_zone(zone, Self)</a></td>
<td class="name" nowrap><a href="#set_click_zone">set_click_zone(zone)</a></td>
<td class="summary">Strict button click area.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_key_trigger">set_key_trigger(key, Self)</a></td>
<td class="name" nowrap><a href="#set_key_trigger">set_key_trigger(key)</a></td>
<td class="summary">Set key-code to trigger this button</td>
</tr>
<tr>
Expand Down Expand Up @@ -185,6 +185,12 @@ <h3>Parameters:</h3>
</li>
</ul>

<h3>Returns:</h3>
<ol>

<span class="types"><span class="type">druid.button</span></span>
Current button instance
</ol>



Expand Down Expand Up @@ -212,7 +218,7 @@ <h3>Returns:</h3>
</dd>
<dt>
<a name = "set_click_zone"></a>
<strong>set_click_zone(zone, Self)</strong>
<strong>set_click_zone(zone)</strong>
</dt>
<dd>
Strict button click area. Useful for
Expand All @@ -225,20 +231,22 @@ <h3>Parameters:</h3>
<span class="types"><span class="type">node</span></span>
Gui node
</li>
<li><span class="parameter">Self</span>
<span class="types"><span class="type">druid.button</span></span>
instance to make chain calls
</li>
</ul>

<h3>Returns:</h3>
<ol>

<span class="types"><span class="type">druid.button</span></span>
Current button instance
</ol>




</dd>
<dt>
<a name = "set_key_trigger"></a>
<strong>set_key_trigger(key, Self)</strong>
<strong>set_key_trigger(key)</strong>
</dt>
<dd>
Set key-code to trigger this button
Expand All @@ -250,12 +258,14 @@ <h3>Parameters:</h3>
<span class="types"><span class="type">hash</span></span>
The action_id of the key
</li>
<li><span class="parameter">Self</span>
<span class="types"><span class="type">druid.button</span></span>
instance to make chain calls
</li>
</ul>

<h3>Returns:</h3>
<ol>

<span class="types"><span class="type">druid.button</span></span>
Current button instance
</ol>



Expand Down Expand Up @@ -438,7 +448,7 @@ <h3>Fields:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-05-09 16:07:15 </i>
<i style="float:right;">Last updated 2020-06-14 20:13:02 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/druid.checkbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ <h3>Fields:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-05-09 16:07:15 </i>
<i style="float:right;">Last updated 2020-06-14 20:13:02 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/druid.checkbox_group.html
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ <h3>Fields:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-05-09 16:07:15 </i>
<i style="float:right;">Last updated 2020-06-14 20:13:02 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/druid.drag.html
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ <h3>Fields:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-05-09 16:07:15 </i>
<i style="float:right;">Last updated 2020-06-14 20:13:02 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/druid.grid.html
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ <h3>Fields:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-05-09 16:07:15 </i>
<i style="float:right;">Last updated 2020-06-14 20:13:02 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/druid.helper.html
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ <h3>Returns:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-05-09 16:07:15 </i>
<i style="float:right;">Last updated 2020-06-14 20:13:02 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
53 changes: 52 additions & 1 deletion docs/modules/druid.hover.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ <h2><a href="#Functions">Functions</a></h2>
<td class="name" nowrap><a href="#set_click_zone">set_click_zone(zone)</a></td>
<td class="summary">Strict hover click area.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_enabled">set_enabled(state)</a></td>
<td class="summary">Set enable state of hover component.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#is_enabled">is_enabled()</a></td>
<td class="summary">Return current hover enabled state</td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
Expand Down Expand Up @@ -206,6 +214,49 @@ <h3>Parameters:</h3>



</dd>
<dt>
<a name = "set_enabled"></a>
<strong>set_enabled(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">state</span>
<span class="types"><span class="type">bool</span></span>
The hover enabled state
</li>
</ul>





</dd>
<dt>
<a name = "is_enabled"></a>
<strong>is_enabled()</strong>
</dt>
<dd>
Return current hover enabled state



<h3>Returns:</h3>
<ol>

<span class="types"><span class="type">bool</span></span>
The hover enabled state
</ol>




</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
Expand Down Expand Up @@ -243,7 +294,7 @@ <h3>Fields:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-05-09 16:07:15 </i>
<i style="float:right;">Last updated 2020-06-14 20:13:02 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/druid.html
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ <h3>Parameters:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-05-09 16:07:15 </i>
<i style="float:right;">Last updated 2020-06-14 20:13:02 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
6 changes: 3 additions & 3 deletions docs/modules/druid.input.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ <h3>Returns:</h3>
<ol>

<span class="types"><span class="type">druid.input</span></span>
Self instance to make chain calls
Current input instance
</ol>


Expand Down Expand Up @@ -223,7 +223,7 @@ <h3>Returns:</h3>
<ol>

<span class="types"><span class="type">druid.input</span></span>
Self instance to make chain calls
Current input instance
</ol>


Expand Down Expand Up @@ -388,7 +388,7 @@ <h3>Fields:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-05-09 16:07:15 </i>
<i style="float:right;">Last updated 2020-06-14 20:13:02 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/druid.lang_text.html
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ <h3>Fields:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-05-09 16:07:15 </i>
<i style="float:right;">Last updated 2020-06-14 20:13:02 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/druid.progress.html
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ <h3>Fields:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-05-09 16:07:15 </i>
<i style="float:right;">Last updated 2020-06-14 20:13:02 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/druid.radio_group.html
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ <h3>Fields:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-05-09 16:07:15 </i>
<i style="float:right;">Last updated 2020-06-14 20:13:02 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
Loading

0 comments on commit 5f873c2

Please sign in to comment.