mirror of
https://github.com/Insality/druid
synced 2025-09-27 10:02:19 +02:00
Update Docs & Example
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>Defold Druid UI Library</title>
|
||||
<title>Defold Druid UI Framework</title>
|
||||
<link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
@@ -47,6 +47,7 @@
|
||||
<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>
|
||||
@@ -60,13 +61,13 @@
|
||||
<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>
|
||||
<li><a href="../modules/druid.html">druid</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
@@ -74,9 +75,15 @@
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>LangText</code></h1>
|
||||
<p>Component to handle all GUI texts
|
||||
Good working with localization system</p>
|
||||
<p></p>
|
||||
<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>
|
||||
@@ -86,8 +93,8 @@
|
||||
<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, no_adjust)</a></td>
|
||||
<td class="summary">Component init function</td>
|
||||
<td class="name" nowrap><a href="#init">init(self, node, locale_id[, adjust_type=downscale])</a></td>
|
||||
<td class="summary"><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>
|
||||
@@ -181,10 +188,10 @@
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "init"></a>
|
||||
<strong>init(self, node, locale_id, no_adjust)</strong>
|
||||
<strong>init(self, node, locale_id[, adjust_type=downscale])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Component init function
|
||||
<a href="../modules/LangText.html#">LangText</a> constructor
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
@@ -194,16 +201,17 @@
|
||||
<a href="../modules/LangText.html#">LangText</a>
|
||||
</li>
|
||||
<li><span class="parameter">node</span>
|
||||
<span class="types"><span class="type">node</span></span>
|
||||
The text node
|
||||
<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">no_adjust</span>
|
||||
<span class="types"><span class="type">bool</span></span>
|
||||
If true, will not correct text size
|
||||
<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>
|
||||
|
||||
|
Reference in New Issue
Block a user