Skip to content

Commit

Permalink
Merge pull request #275 from Insality/update
Browse files Browse the repository at this point in the history
Prepare for release 12
  • Loading branch information
Insality authored Oct 16, 2024
2 parents 217b901 + 40bda1b commit 032eb4a
Show file tree
Hide file tree
Showing 103 changed files with 4,042 additions and 13,456 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Build && Run
run: |
deployer_url="https://raw.githubusercontent.com/Insality/defold-deployer/1/deployer.sh"
curl -s ${deployer_url} | bash -s lbd --headless --settings ./unit_test.txt
curl -s ${deployer_url} | bash -s lbd --headless --settings ./test/test.ini
- name: Upload test report
run: bash <(curl -s https://codecov.io/bash)
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ Thumbs.db
builtins
dist
deployer_version_settings.txt

.deployer_cache
bob*.jar
manifest.private.der
manifest.public.der
56 changes: 0 additions & 56 deletions .luacheckrc

This file was deleted.

38 changes: 38 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"Lua.diagnostics.globals": [
"init",
"final",
"update",
"on_message",
"on_input",
"describe",
"before",
"after",
"it",
"utf8",
"defos",
"clipboard",
"editor"
],
"Lua.workspace.checkThirdParty": false,
"Lua.diagnostics.neededFileStatus": {
"undefined-field": "Any",
"assign-type-mismatch": "Any",
"missing-return": "Any",
"missing-fields": "Any",
"return-type-mismatch": "Any",
"lowercase-global": "Any"
},
"Lua.workspace.ignoreDir": [
".vscode",
"test/tests/*.lua",
"utils/annotations_manual.lua"
],
"Lua.runtime.pathStrict": true,
"Lua.diagnostics.libraryFiles": "Enable",
"Lua.runtime.version": "Lua 5.1",
"Lua.workspace.library": [
"~/Library/Application Support/Code/User/globalStorage/astronachos.defold",
"~/Library/Application Support/Code/User/workspaceStorage/72e25b7e0fdc873ee6f7baa61edbd6b1/astronachos.defold"
]
}
32 changes: 19 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

[![](media/druid_logo.png)](https://insality.github.io/druid/)

[![Github-sponsors](https://img.shields.io/badge/sponsor-30363D?style=for-the-badge&logo=GitHub-Sponsors&logoColor=#EA4AAA)](https://github.com/sponsors/insality) [![Ko-Fi](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/insality) [![BuyMeACoffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/insality)
[![GitHub release (latest by date)](https://img.shields.io/github/v/tag/insality/druid?style=for-the-badge&label=Release)](https://github.com/Insality/druid/tags)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/insality/druid/ci-workflow.yml?branch=master&style=for-the-badge)](https://github.com/Insality/druid/actions)
[![codecov](https://img.shields.io/codecov/c/github/Insality/druid?style=for-the-badge)](https://codecov.io/gh/Insality/druid)

[![GitHub release (latest by date)](https://img.shields.io/github/v/release/insality/druid)](https://github.com/Insality/druid/releases)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/insality/druid/ci-workflow.yml?branch=master)](https://github.com/Insality/druid/actions)
[![codecov](https://codecov.io/gh/Insality/druid/branch/master/graph/badge.svg)](https://codecov.io/gh/Insality/druid)
[![Github-sponsors](https://img.shields.io/badge/sponsor-30363D?style=for-the-badge&logo=GitHub-Sponsors&logoColor=#EA4AAA)](https://github.com/sponsors/insality) [![Ko-Fi](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/insality) [![BuyMeACoffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/insality)

**Druid** - powerful **Defold** component UI framework that empowers developers to create stunning and customizable GUIs by leveraging a wide range of embedded components or effortlessly designing their own game-specific components.

Expand All @@ -17,18 +17,26 @@ Try the [**HTML5 version**](https://insality.github.io/druid/druid/) of the **Dr

To integrate the **Druid** extension into your own project, add this project as a [dependency](https://www.defold.com/manuals/libraries/) in your **Defold** game. Open your `game.project` file and add the following line to the dependencies field under the project section:

**Druid v0.11.0**
**Druid v0.12.0**

> [https://github.com/Insality/druid/archive/refs/tags/0.11.0.zip](https://github.com/Insality/druid/archive/refs/tags/0.11.0.zip)
> [https://github.com/Insality/druid/archive/refs/tags/0.12.0.zip](https://github.com/Insality/druid/archive/refs/tags/0.12.0.zip)
Here is a list of [all releases](https://github.com/Insality/druid/releases).

Size: **67.16 KB**

> The size metrics exlcude the extended components, which are including only on demand.
### Library Size

> **Note:** The library size is calculated based on the build report per platform. The extended components are exlcuded, which are including only on demand.
| Platform | Library Size |
| ---------------- | ------------- |
| HTML5 | **38.96 KB** |
| Desktop / Mobile | **65.97 KB** |


### Input Bindings
**Druid** utilizes the `/builtins/input/all.input_binding` input bindings. For custom input bindings, refer to the Input Binding section in the **_[Advanced Setup](docs_md/advanced-setup.md#input-bindings)_**.

**Druid** utilizes the `/builtins/input/all.input_binding` input bindings. Either use this file for your project by setting the `Runtime -> Input -> Game Binding` field in the `game.project` input section to `/builtins/input/all.input_binding`, or add the specific bindings you need to your game's input binding file. For custom input bindings, refer to the Input Binding section in the [Advanced Setup](https://github.com/Insality/druid/blob/master/docs_md/advanced-setup.md#input-bindings).


## Usage
Expand Down Expand Up @@ -140,7 +148,7 @@ druid.register("data_list", data_list)
| **[Slider](https://insality.github.io/druid/modules/Slider.html)** | Logic over GUI Node. Handle draggable node with position restrictions. | [Slider Example](https://insality.github.io/druid/druid/?example=general_sliders) | <img src="media/preview/slider.gif" width="200" height="100"> |
| **[Timer](https://insality.github.io/druid/modules/Timer.html)** | Logic over GUI Text. Handle basic timer functions. || <img src="media/preview/timer.gif" width="200" height="100"> |
| **[Hotkey](https://insality.github.io/druid/modules/Hotkey.html)** | Allow to set callbacks for keyboard hotkeys with key modificators. | [Hotkey Example](https://insality.github.io/druid/druid/?example=general_hotkey) | <img src="media/preview/hotkey.gif" width="200" height="100"> |
| **[Layout](https://insality.github.io/druid/modules/Layout.html)** | Logic over GUI Node. Handle node size depends on layout mode and screen aspect ratio. Contains helpers to build more complex UI layout. | [Layout Example](https://insality.github.io/druid/druid/?example=general_layout) | <img src="media/preview/layout.gif" width="200" height="100"> |
| **[Layout](https://insality.github.io/druid/modules/Layout.html)** | Logic over GUI Node. Arrange nodes inside layout node with margin/paddings settings. | [Layout Example](https://insality.github.io/druid/druid/?example=general_layout) | <img src="media/preview/layout.gif" width="200" height="100"> |

For a complete overview, see: **_[components.md](docs_md/01-components.md)_**.

Expand Down Expand Up @@ -173,8 +181,6 @@ Each example page provides a direct link to the corresponding example code, maki

Or refer directly to the [**example folder**](https://github.com/Insality/druid/tree/develop/example) for code examples demonstrating how to use **Druid**.

If you want to see examples of GUIs created with Druid, please refer to the [game_examples.md](docs_md/game_examples.md) file.

## Documentation

To better understand **Druid**, read the following documentation:
Expand Down Expand Up @@ -214,4 +220,4 @@ For a complete history of the development of **Druid**, please check the [change

Your donation helps me stay engaged in creating valuable projects for **Defold**. If you appreciate what I'm doing, please consider supporting me!

[![Github-sponsors](https://img.shields.io/badge/sponsor-30363D?style=for-the-badge&logo=GitHub-Sponsors&logoColor=#EA4AAA)](https://github.com/sponsors/insality) [![Ko-Fi](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/insality) [![BuyMeACoffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/insality)
[![Github-sponsors](https://img.shields.io/badge/sponsor-30363D?style=for-the-badge&logo=GitHub-Sponsors&logoColor=#EA4AAA)](https://github.com/sponsors/insality) [![Ko-Fi](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/insality) [![BuyMeACoffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/insality)
1 change: 0 additions & 1 deletion config.ld
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ description='Documentation for Druid Framework'
file={"./druid",
exclude = {
"./druid/styles/",
"./druid/system/middleclass.lua",
"./druid/templates/",
"./druid/annotations.lua",
"./druid/custom/rich_text/module",
Expand Down
1 change: 1 addition & 0 deletions deployer_build_stats.csv
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ date,sha,version,build_size,build_time,platform,mode,is_cache_using,commits_coun
2023-08-05T16:31:19Z,37fff52aa59feb20f761ef4d340d9f677743d54b,0.11.693,2456,43,js-web,release,true,693
2023-08-05T16:41:25Z,d7dd4a86b81d73d345ad7e136de9c2c488bc4d8b,0.11.694,2452,43,js-web,release,true,694
2023-10-20T08:23:33Z,9132dc477b645d674ec21efbfcf85f48ef0ea8a6,0.11.718,2544,47,js-web,release,true,718
2024-10-15T16:54:05Z,ea80c874f6c0ea175b317d01ac45c567db9179c7,0.11.0,1840,24,js-web,release,true,796
3 changes: 1 addition & 2 deletions docs/modules/BackHandler.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,8 @@ <h3>Usage:</h3>

<ul>
<li><span class="parameter">params</span>
<span class="types"><span class="type">any</span></span>
<span class="types"><span class="type">any</span> or <span class="type">nil</span></span>

(<em>optional</em>)
</li>
</ul>

Expand Down
12 changes: 10 additions & 2 deletions docs/modules/BaseComponent.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ <h2><a href="#Functions">Functions</a></h2>
<td class="summary">Context used as first arg in all Druid events</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get_druid">get_druid(self)</a></td>
<td class="name" nowrap><a href="#get_druid">get_druid(self, template, nodes)</a></td>
<td class="summary">Get Druid instance for inner component creation.</td>
</tr>
<tr>
Expand Down Expand Up @@ -226,7 +226,7 @@ <h3>Returns:</h3>
</dd>
<dt>
<a name = "get_druid"></a>
<strong>get_druid(self)</strong>
<strong>get_druid(self, template, nodes)</strong>
</dt>
<dd>
Get Druid instance for inner component creation.
Expand All @@ -238,6 +238,14 @@ <h3>Parameters:</h3>
<span class="types"><span class="type">BaseComponent</span></span>
<a href="../modules/BaseComponent.html#">BaseComponent</a>
</li>
<li><span class="parameter">template</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">nil</span></span>
The template name
</li>
<li><span class="parameter">nodes</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a> or <span class="type">nil</span></span>
The nodes table
</li>
</ul>

<h3>Returns:</h3>
Expand Down
33 changes: 14 additions & 19 deletions docs/modules/Button.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ <h3>Usage:</h3>
print(&quot;Also the button component is passed in callback params&quot;)
end

local custom_args = &quot;any variable to pass inside callback&quot;
local custom_args = &quot;Any variable to pass inside callback&quot;
local button = self.druid:new_button(&quot;button_name&quot;, on_button_click, custom_args)
</pre>
</ul>
Expand Down Expand Up @@ -153,7 +153,7 @@ <h2><a href="#Fields">Fields</a></h2>
</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>
<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>
Expand Down Expand Up @@ -360,7 +360,7 @@ <h3>Parameters:</h3>
<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> or <span class="type">nil</span></span>
<span class="types"><a class="type" href="../modules/Button.html#node">node</a>, <a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">nil</span></span>
Gui node
</li>
</ul>
Expand Down Expand Up @@ -433,7 +433,7 @@ <h3>Parameters:</h3>
<a href="../modules/Button.html#">Button</a>
</li>
<li><span class="parameter">key</span>
<span class="types"><span class="type">hash</span></span>
<span class="types"><span class="type">hash</span> or <a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
The action_id of the input key
</li>
</ul>
Expand Down Expand Up @@ -508,19 +508,16 @@ <h2 class="section-header "><a name="Tables"></a>Tables</h2>
<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)
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
Minimum time to trigger on_hold_callback. Default: 0.4
</li>
<li><span class="parameter">AUTOHOLD_TRIGGER</span>
<span class="types"><span class="type">number</span></span>
Maximum hold time to trigger button release while holding
(<em>default</em> 0.8)
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
Maximum hold time to trigger button release while holding. Default: 0.8
</li>
<li><span class="parameter">DOUBLETAP_TIME</span>
<span class="types"><span class="type">number</span></span>
Time between double taps
(<em>default</em> 0.4)
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
Time between double taps. Default: 0.4
</li>
<li><span class="parameter">on_click</span>
<span class="types"><span class="type">function</span></span>
Expand Down Expand Up @@ -565,9 +562,8 @@ <h2 class="section-header "><a name="Fields"></a>Fields</h2>

<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)
<span class="types"><a class="type" href="../modules/Button.html#node">node</a> or <span class="type">nil</span></span>
Default node
</li>
</ul>

Expand All @@ -581,14 +577,13 @@ <h2 class="section-header "><a name="Fields"></a>Fields</h2>
<strong>click_zone</strong>
</dt>
<dd>
Additional button click area, defined by another GUI Node
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>
<span class="types"><a class="type" href="../modules/Button.html#node">node</a> or <span class="type">nil</span></span>

(<em>optional</em>)
</li>
</ul>

Expand Down
15 changes: 6 additions & 9 deletions docs/modules/Checkbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ <h2><a href="#Functions">Functions</a></h2>
<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="name" nowrap><a href="#init">init(self, node, callback, click_node, initial_state)</a></td>
<td class="summary">The <a href="../modules/Checkbox.html#">Checkbox</a> constructor</td>
</tr>
<tr>
Expand Down Expand Up @@ -158,7 +158,7 @@ <h3>Returns:</h3>
</dd>
<dt>
<a name = "init"></a>
<strong>init(self, node, callback[, click_node=node[, initial_state=false]])</strong>
<strong>init(self, node, callback, click_node, initial_state)</strong>
</dt>
<dd>
The <a href="../modules/Checkbox.html#">Checkbox</a> constructor
Expand All @@ -179,14 +179,12 @@ <h3>Parameters:</h3>
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)
<span class="types"><a class="type" href="../modules/Checkbox.html#node">node</a> or <span class="type">nil</span></span>
Trigger node, by default equals to node. Default: node
</li>
<li><span class="parameter">initial_state</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
The initial state of checkbox, default - false
(<em>default</em> false)
</li>
</ul>

Expand Down Expand Up @@ -289,9 +287,8 @@ <h2 class="section-header "><a name="Fields"></a>Fields</h2>

<ul>
<li><span class="parameter">click_node</span>
<span class="types"><a class="type" href="../modules/Checkbox.html#node">node</a></span>
<span class="types"><a class="type" href="../modules/Checkbox.html#node">node</a> or <span class="type">nil</span></span>

(<em>default</em> node)
</li>
</ul>

Expand Down
Loading

0 comments on commit 032eb4a

Please sign in to comment.