mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Update ldoc
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
<li><a href="../topics/03-styles.md.html">Styles</a></li>
|
||||
<li><a href="../topics/04-druid_assets.md.html">Druid assets</a></li>
|
||||
<li><a href="../topics/05-examples.md.html">Examples</a></li>
|
||||
<li><a href="../topics/changelog.md.html">changelog</a></li>
|
||||
<li><strong>README</strong></li>
|
||||
</ul>
|
||||
<h2>Modules</h2>
|
||||
@@ -110,11 +111,14 @@
|
||||
|
||||
<ul>
|
||||
<li>Mouse trigger - <code>Button 1</code> -> <code>touch</code> <em>For basic input components</em></li>
|
||||
<li>Key trigger - <code>Backspace</code> -> <code>back</code> <em>For back</em>handler component_</li>
|
||||
<li>Key trigger - <code>Back</code> -> <code>back</code> <em>For back</em>handler component, Android back button_</li>
|
||||
<li>Key trigger - <code>Backspace</code> -> <code>key_backspace</code> <em>For back</em>handler component, input component_</li>
|
||||
<li>Key trigger - <code>Back</code> -> <code>key_back</code> <em>For back</em>handler component, Android back button, input component_</li>
|
||||
<li>Key trigger - <code>Enter</code> -> <code>key_enter</code> <em>For input component, optional</em></li>
|
||||
<li>Key trigger - <code>Esc</code> -> <code>key_esc</code> <em>For input component, optional</em></li>
|
||||
</ul>
|
||||
|
||||
<p><img src="media/input_binding.png" alt=""/></p>
|
||||
<p><img src="media/input_binding_2.png" alt=""/>
|
||||
<img src="media/input_binding_1.png" alt=""/></p>
|
||||
|
||||
|
||||
<h3>Input capturing [optional]</h3>
|
||||
@@ -144,6 +148,18 @@
|
||||
|
||||
<span class="comment">-- Used for change default druid style
|
||||
</span>druid.set_default_style(your_style)
|
||||
|
||||
<span class="comment">-- Call this function on language changing in the game,
|
||||
</span><span class="comment">-- to retranslate all lang_text components:
|
||||
</span>druid.on_languge_change()
|
||||
|
||||
<span class="comment">-- Call this function on layout changing in the game,
|
||||
</span><span class="comment">-- to reapply layouts
|
||||
</span>druid.on_layout_change()
|
||||
|
||||
<span class="comment">-- Call this function inside window.set_listener
|
||||
</span><span class="comment">-- to catch game focus lost/gained callbacks:
|
||||
</span>druid.on_window_callback(event)
|
||||
</pre>
|
||||
|
||||
|
||||
@@ -192,11 +208,15 @@
|
||||
<span class="global">print</span>(<span class="string">"Button was clicked!"</span>)
|
||||
<span class="keyword">end</span>
|
||||
|
||||
<span class="keyword">local</span> <span class="keyword">function</span> init(self)
|
||||
<span class="keyword">function</span> init(self)
|
||||
self.druid = druid.new(self)
|
||||
self.druid:new_button(<span class="string">"button_node_name"</span>, button_callback)
|
||||
<span class="keyword">end</span>
|
||||
|
||||
<span class="keyword">function</span> final(self)
|
||||
self.druid:final()
|
||||
<span class="keyword">end</span>
|
||||
|
||||
<span class="keyword">function</span> on_input(self, action_id, action)
|
||||
<span class="keyword">return</span> self.druid:on_input(action_id, action)
|
||||
<span class="keyword">end</span>
|
||||
@@ -316,7 +336,7 @@ https://insality.github.io/druid/</p>
|
||||
</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-04-17 20:13:54 </i>
|
||||
<i style="float:right;">Last updated 2020-04-18 14:39:17 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user