mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 10:02:18 +02:00
Update annotations
This commit is contained in:
@@ -83,6 +83,10 @@
|
||||
|
||||
<h2><a href="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#add">add(self, data, index, shift_policy)</a></td>
|
||||
<td class="summary">Add element to DataList.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#clear">clear(self)</a></td>
|
||||
<td class="summary">Clear the DataList and refresh visuals</td>
|
||||
@@ -112,6 +116,14 @@
|
||||
<td class="summary">Druid System on_remove function</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#remove">remove(self, index, shift_policy)</a></td>
|
||||
<td class="summary">Remove element from DataList.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#remove_by_data">remove_by_data(self, data, shift_policy)</a></td>
|
||||
<td class="summary">Remove element from DataList by data value.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#scroll_to_index">scroll_to_index(self, index)</a></td>
|
||||
<td class="summary">Instant scroll to element with passed index</td>
|
||||
</tr>
|
||||
@@ -167,6 +179,39 @@
|
||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "add"></a>
|
||||
<strong>add(self, data, index, shift_policy)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Add element to DataList. Currenly untested
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">DataList</span></span>
|
||||
<a href="../modules/DataList.html#">DataList</a>
|
||||
</li>
|
||||
<li><span class="parameter">data</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
|
||||
</li>
|
||||
<li><span class="parameter">index</span>
|
||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
||||
|
||||
</li>
|
||||
<li><span class="parameter">shift_policy</span>
|
||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
||||
The constant from const.SHIFT.*
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "clear"></a>
|
||||
<strong>clear(self)</strong>
|
||||
@@ -347,6 +392,64 @@
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "remove"></a>
|
||||
<strong>remove(self, index, shift_policy)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Remove element from DataList. Currenly untested
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">DataList</span></span>
|
||||
<a href="../modules/DataList.html#">DataList</a>
|
||||
</li>
|
||||
<li><span class="parameter">index</span>
|
||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
||||
|
||||
</li>
|
||||
<li><span class="parameter">shift_policy</span>
|
||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
||||
The constant from const.SHIFT.*
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "remove_by_data"></a>
|
||||
<strong>remove_by_data(self, data, shift_policy)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Remove element from DataList by data value. Currenly untested
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">self</span>
|
||||
<span class="types"><span class="type">DataList</span></span>
|
||||
<a href="../modules/DataList.html#">DataList</a>
|
||||
</li>
|
||||
<li><span class="parameter">data</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
|
||||
</li>
|
||||
<li><span class="parameter">shift_policy</span>
|
||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
||||
The constant from const.SHIFT.*
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "scroll_to_index"></a>
|
||||
|
@@ -81,19 +81,7 @@
|
||||
<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> Create Rich Text on your GUI Text Node. All properties of the text node will be used as default for the text.
|
||||
<p> <b># Notes #</b>
|
||||
<p> • Nested tags are supported
|
||||
<p> <a href="https://insality.github.io/druid/druid/index.html?example=custom_rich_text" target="_blank"><b>Example Link</b></a></p>
|
||||
@@ -119,7 +107,6 @@ self.rich_text:set_text("Hello, Druid Rich Text!")
|
||||
outline: vector4,
|
||||
font: string,
|
||||
image: druid.rich_text.image,
|
||||
default_animation: string,
|
||||
br: boolean,
|
||||
nobr: boolean,
|
||||
}
|
||||
|
Reference in New Issue
Block a user