Skip to content

Commit

Permalink
Update docs, config generations, fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Insality committed Oct 15, 2024
1 parent 2f5336f commit 5848921
Show file tree
Hide file tree
Showing 44 changed files with 1,870 additions and 1,326 deletions.
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
"test/tests/*.lua",
"utils/annotations_manual.lua"
],
"Lua.runtime.pathStrict": true,
"Lua.diagnostics.libraryFiles": "Enable",
"Lua.runtime.version": "Lua 5.1"
"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"
]
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ 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).

Expand Down
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
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
118 changes: 39 additions & 79 deletions docs/modules/DataList.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,22 +100,10 @@ <h2><a href="#Functions">Functions</a></h2>
<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">The <a href="../modules/DataList.html#">DataList</a> constructor</td>
</tr>
Expand All @@ -131,6 +119,10 @@ <h2><a href="#Functions">Functions</a></h2>
<td class="name" nowrap><a href="#set_data">set_data(self, data)</a></td>
<td class="summary">Set new data set for DataList component</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_use_cache">set_use_cache(self, is_use_cache)</a></td>
<td class="summary">Set refresh function for DataList component</td>
</tr>
</table>
<h2><a href="#Fields">Fields</a></h2>
<table class="function_list">
Expand All @@ -140,7 +132,7 @@ <h2><a href="#Fields">Fields</a></h2>
</tr>
<tr>
<td class="name" nowrap><a href="#last_index">last_index</a></td>
<td class="summary">The current visual last data index</td>
<td class="summary">The current last index of visual elements</td>
</tr>
<tr>
<td class="name" nowrap><a href="#on_element_add">on_element_add</a></td>
Expand All @@ -164,7 +156,7 @@ <h2><a href="#Fields">Fields</a></h2>
</tr>
<tr>
<td class="name" nowrap><a href="#top_index">top_index</a></td>
<td class="summary">The current visual top data index</td>
<td class="summary">The current top index of visual elements</td>
</tr>
</table>

Expand Down Expand Up @@ -276,27 +268,6 @@ <h3>Returns:</h3>



</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>
Expand All @@ -322,48 +293,6 @@ <h3>Parameters:</h3>



</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>
Expand Down Expand Up @@ -474,6 +403,37 @@ <h3>Returns:</h3>



</dd>
<dt>
<a name = "set_use_cache"></a>
<strong>set_use_cache(self, is_use_cache)</strong>
</dt>
<dd>
Set refresh function for DataList component


<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<span class="types"><span class="type">DataList</span></span>
<a href="../modules/DataList.html#">DataList</a>
</li>
<li><span class="parameter">is_use_cache</span>
<span class="types"><span class="type">boolean</span></span>
Use cache version of DataList. Requires make setup of components in on_element_add callback and clean in on_element_remove
</li>
</ul>

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

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




</dd>
</dl>
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
Expand Down Expand Up @@ -504,7 +464,7 @@ <h2 class="section-header "><a name="Fields"></a>Fields</h2>
<strong>last_index</strong>
</dt>
<dd>
The current visual last data index
The current last index of visual elements


<ul>
Expand Down Expand Up @@ -624,7 +584,7 @@ <h2 class="section-header "><a name="Fields"></a>Fields</h2>
<strong>top_index</strong>
</dt>
<dd>
The current visual top data index
The current top index of visual elements


<ul>
Expand Down
8 changes: 4 additions & 4 deletions docs/modules/Drag.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ <h2><a href="#Fields">Fields</a></h2>
</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>
<td class="summary">on drag progress callback(self, dx, dy, total_x, total_y, touch)</td>
</tr>
<tr>
<td class="name" nowrap><a href="#on_drag_end">on_drag_end</a></td>
<td class="summary">Event on drag end callback(self, total_x, total_y)</td>
<td class="summary">Event on drag end callback(self, total_x, total_y, touch)</td>
</tr>
<tr>
<td class="name" nowrap><a href="#on_drag_start">on_drag_start</a></td>
Expand Down Expand Up @@ -428,7 +428,7 @@ <h2 class="section-header "><a name="Fields"></a>Fields</h2>
<strong>on_drag</strong>
</dt>
<dd>
on drag progress callback(self, dx, dy, total_x, total_y)
on drag progress callback(self, dx, dy, total_x, total_y, touch)


<ul>
Expand All @@ -448,7 +448,7 @@ <h2 class="section-header "><a name="Fields"></a>Fields</h2>
<strong>on_drag_end</strong>
</dt>
<dd>
Event on drag end callback(self, total_x, total_y)
Event on drag end callback(self, total_x, total_y, touch)


<ul>
Expand Down
Loading

0 comments on commit 5848921

Please sign in to comment.