mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 10:27:47 +02:00
253 lines
16 KiB
HTML
253 lines
16 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
|
<head>
|
|
<title>Defold Druid UI Library</title>
|
|
<link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" />
|
|
</head>
|
|
<body>
|
|
|
|
<div id="container">
|
|
|
|
<div id="product">
|
|
<div id="product_logo"></div>
|
|
<div id="product_name"><big><b></b></big></div>
|
|
<div id="product_description"></div>
|
|
</div> <!-- id="product" -->
|
|
|
|
|
|
<div id="main">
|
|
|
|
|
|
<!-- Menu -->
|
|
|
|
<div id="navigation">
|
|
<br/>
|
|
<h1>Druid</h1>
|
|
|
|
<ul>
|
|
<li><a href="../index.html">Index</a></li>
|
|
</ul>
|
|
|
|
|
|
|
|
<h2>Topics</h2>
|
|
<ul class="">
|
|
<li><a href="../topics/01-components.md.html">01-components</a></li>
|
|
<li><a href="../topics/02-creating_custom_components.md.html">Creating custom components</a></li>
|
|
<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><strong>Druid 0.3.0:</strong></li>
|
|
<li><a href="../topics/faq.md.html">faq</a></li>
|
|
<li><a href="../topics/README.md.html">README</a></li>
|
|
</ul>
|
|
<h2>Modules</h2>
|
|
<ul class="nowrap">
|
|
<li><a href="../modules/druid.back_handler.html">druid.back_handler</a></li>
|
|
<li><a href="../modules/druid.blocker.html">druid.blocker</a></li>
|
|
<li><a href="../modules/druid.button.html">druid.button</a></li>
|
|
<li><a href="../modules/druid.drag.html">druid.drag</a></li>
|
|
<li><a href="../modules/druid.hover.html">druid.hover</a></li>
|
|
<li><a href="../modules/druid.scroll.html">druid.scroll</a></li>
|
|
<li><a href="../modules/druid.static_grid.html">druid.static_grid</a></li>
|
|
<li><a href="../modules/druid.swipe.html">druid.swipe</a></li>
|
|
<li><a href="../modules/druid.text.html">druid.text</a></li>
|
|
<li><a href="../modules/component.html">component</a></li>
|
|
<li><a href="../modules/druid.html">druid</a></li>
|
|
<li><a href="../modules/druid_event.html">druid_event</a></li>
|
|
<li><a href="../modules/druid.checkbox.html">druid.checkbox</a></li>
|
|
<li><a href="../modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
|
|
<li><a href="../modules/druid.dynamic_grid.html">druid.dynamic_grid</a></li>
|
|
<li><a href="../modules/druid.input.html">druid.input</a></li>
|
|
<li><a href="../modules/druid.lang_text.html">druid.lang_text</a></li>
|
|
<li><a href="../modules/druid.progress.html">druid.progress</a></li>
|
|
<li><a href="../modules/druid.radio_group.html">druid.radio_group</a></li>
|
|
<li><a href="../modules/druid.slider.html">druid.slider</a></li>
|
|
<li><a href="../modules/druid.timer.html">druid.timer</a></li>
|
|
<li><a href="../modules/druid.helper.html">druid.helper</a></li>
|
|
<li><a href="../modules/druid_instance.html">druid_instance</a></li>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div id="content">
|
|
|
|
|
|
<h3>Druid 0.3.0:</h3>
|
|
|
|
<ul>
|
|
<li><p><code>Druid:final()</code> now is important function for correct working</p></li>
|
|
<li><p>Add <em>swipe</em> basic component</p>
|
|
|
|
<pre>
|
|
- Swipe component handle simple swipe gestures on node. It has single callback with direction on swipe. You can adjust a several parameters of swipe <span class="keyword">in</span> druid style.
|
|
- Swipe can be triggered on action.released <span class="keyword">or</span> <span class="keyword">while</span> user is make swiping (<span class="keyword">in</span> process)
|
|
- Add swipe example at main Druid example. Try swipe left/right to switch example pages.
|
|
</pre>
|
|
</li>
|
|
<li><p>Add <em>input</em> basic component</p>
|
|
|
|
<pre>
|
|
- Input component handle user text input. Input contains from button <span class="keyword">and</span> text components. Button needed <span class="keyword">for</span> selecting/unselecting input field
|
|
- Long click on input field <span class="keyword">for</span> clear <span class="keyword">and</span> <span class="global">select</span> input field (clearing can be disable via styles)
|
|
- Click outside of button to unselect input field
|
|
- On focus lost (game minimized) input field will be unselected
|
|
- You can setup max length of the text
|
|
- You can setup allowed characters. On add <span class="keyword">not</span> allowed characters <span class="backtick"><code>on_input_wrong</code></span> will be called. By default it cause simple shake animation
|
|
- The keyboard <span class="keyword">for</span> input will <span class="keyword">not</span> show on mobile HTML5. So input field <span class="keyword">in</span> mobile HTML5 is <span class="keyword">not</span> working now
|
|
- To make work different keyboard <span class="global">type</span>, make sure value <span class="keyword">in</span> game.project Android:InputMethod set to HiddenInputField (https://defold.com/manuals/project-settings/#input-method)
|
|
</pre>
|
|
</li>
|
|
<li><p>Add two functions to basic component: <code>increase_input_priority</code> and <code>reset_input_priority</code>. It used to process component input first in current input stack (there is two input stacks now: INPUT and INPUT_HIGH). Example: on selecting input field, it increase input self priority until it be unselected</p></li>
|
|
<li><p>Add two new component interests: <code>on_focus_gain</code> and <code>on_focus_lost</code></p></li>
|
|
<li><p>Add global druid events:</p>
|
|
|
|
<pre>
|
|
- on_window_callback: call <span class="backtick"><code>druid.on_window_callback(event)</code></span> <span class="keyword">for</span> on_focus_gain/lost correct work
|
|
- on_language_change: call <span class="backtick"><code>druid.on_language_change()</code></span> (#<span class="number">38</span>) <span class="keyword">for</span> update all druid instances lang components
|
|
- on_layout_change: call <span class="backtick"><code>druid.on_layout_change()</code></span> (#<span class="number">37</span>) <span class="keyword">for</span> update all gui layouts (unimplemented now)
|
|
</pre>
|
|
</li>
|
|
<li><p>Add button <code>on_click_outside</code> event. You can subscribe on this event in button. Was needed for Input component (click outside to deselect input field)</p></li>
|
|
<li><p>Add <em>start</em>pos_ field to button component</p></li>
|
|
<li><p>Changed input binding settings. Add esc, enter, text and marked_text. Backspace now is different from android back button event. Check the README setup section</p></li>
|
|
<li><p>Renamed <em>on</em>change<em>language</em> -> <em>on</em>language<em>change</em> component interest</p></li>
|
|
<li><p>Add several examples to druid-assets respository (see live example here): https://insality.github.io/druid-assets/)</p></li>
|
|
<li><p>Known issues:</p>
|
|
|
|
<pre>
|
|
- Adjusting text size by height works wrong. Adjusting single line texting works fine
|
|
- Space is <span class="keyword">not</span> working <span class="keyword">in</span> HTML5
|
|
</pre>
|
|
|
|
<h3>Druid 0.4.0:</h3></li>
|
|
<li><p>Add <em>Drag</em> basic component</p>
|
|
|
|
<pre>
|
|
- Drag component allow you detect dragging on GUI node
|
|
- Drag will be processed even the cursor is outside of node, <span class="keyword">if</span> drag is already started
|
|
- Drag provides correct handle of several touches. Drag can switch between them (no more scroll gliches with position)
|
|
- Drag have <span class="global">next</span> events:
|
|
- on_touch_start (self)
|
|
- on_touch_end (self)
|
|
- on_drag_start (self)
|
|
- on_drag (self, dx, dy)
|
|
- on_drag_end (self)
|
|
- You can restriction side of dragging by changing _drag.can_x_ <span class="keyword">and</span> _drag.can_y_ fields
|
|
- You can setup drag deadzone to detect, when dragging is started (_by default <span class="number">10</span> pixels_)
|
|
</pre>
|
|
</li>
|
|
<li><p>[Breaking changes] Druid <em>Scroll</em> component fully reworked. Input logic moved to <em>Drag</em> component</p>
|
|
|
|
<pre>
|
|
- Update scroll documentation
|
|
- Change constructor order params
|
|
- Change _scroll:set_border_ to _scroll:set_size_
|
|
- Scroll now contains from view <span class="keyword">and</span> content node
|
|
- _View node_ - static node, which size determine the <span class="string">"camera"</span> zone
|
|
- _Content node_ - dynamic node, moving by _Scroll_ component
|
|
- Scroll will be disabled only <span class="keyword">if</span> content size equals to view size (by width <span class="keyword">or</span> height separatly)
|
|
- You can adjust start scroll size via _.gui_ scene. Just setup correct node size
|
|
- Different anchoring is supported (<span class="keyword">for</span> easier layouting)
|
|
- Function _scroll_to_ now accept position relative to _content node_. It's more easier <span class="keyword">for</span> handling. _Example:_ <span class="keyword">if</span> you have children node of _content_node_, you can pass this node position to scroll to this.
|
|
- **Resolve #<span class="number">52</span>**: _Content node size_ now can be less than _view node size_. In this case, content will be scrolled only inside _view size_ (can be disabled via style field: _SMALL_CONTENT_SCROLL_)
|
|
- **Fix #<span class="number">50</span>**: If style.SOFT_ZONE_SIZE equals to [<span class="number">0.</span>.<span class="number">1</span>], scroll can be disappeared
|
|
</pre>
|
|
</li>
|
|
<li><p>Druid <em>Grid</em> Update</p>
|
|
|
|
<pre>
|
|
- Anchor by default equals to node pivot (so, more component settings <span class="keyword">in</span> _.gui_ settings) (#<span class="number">51</span>)
|
|
- Function <span class="backtick"><code>grid:clear</code></span> now don't delete any GUI nodes. Druid will <span class="keyword">not</span> care about <span class="backtick"><code>gui.delete_node</code></span> logic anymore (#<span class="number">56</span>)
|
|
</pre>
|
|
</li>
|
|
<li><p>Druid <em>Hover</em> component now have two <em>hover</em> events (#49):</p>
|
|
|
|
<pre>
|
|
- _on_hover_ is usual hover event. Trigger only <span class="keyword">if</span> touch <span class="keyword">or</span> mouse action_id pressed on node
|
|
- _on_mouse_hover_ action on node without action_id (desktop mouse over). Works only on desktop platform
|
|
</pre>
|
|
</li>
|
|
<li><p>Styles update:</p>
|
|
|
|
<pre>
|
|
- Styles <span class="global">table</span> now can be empty, every component have their default style values
|
|
- Remove <span class="backtick"><code>component:get_style</code></span> <span class="keyword">function</span>. Now you can only set styles
|
|
- To get style values <span class="keyword">in</span> component, add <span class="backtick"><code>component:on_style_change</code></span> <span class="keyword">function</span>. It's invoked on <span class="backtick"><a href="../modules/component.html#set_style">component:set_style</a></span> <span class="keyword">function</span>
|
|
- You can look up default values inside <span class="backtick"><code>component:on_style_change</code></span> <span class="keyword">function</span> <span class="keyword">or</span> style component API on [Druid API](https://insality.github.<span class="global">io</span>/druid/index.html)
|
|
</pre>
|
|
</li>
|
|
<li><p>Druid update:</p>
|
|
|
|
<pre>
|
|
- Now <span class="keyword">function</span> <span class="backtick"><code>druid:remove</code></span> remove instance <span class="keyword">and</span> all instance children components. No more manual deleting child components (#<span class="number">41</span>)
|
|
</pre>
|
|
</li>
|
|
<li><p><strong>Fix:</strong> Blocker component bug (blocker had very high priority, so it's block even button components, created after blocker)</p></li>
|
|
<li><p><strong>Fix #58:</strong> Bug, when druid instance should be always named <a href="../modules/druid.html#">druid</a> (ex: <code>self.druid = druid.new(self)</code>)</p></li>
|
|
<li><p><strong>Fix #53:</strong> Bug with final <em>Druid instance</em> without any components</p></li>
|
|
</ul>
|
|
|
|
|
|
<h3>Druid 0.5.0:</h3>
|
|
|
|
<p>Besides a lot of fixes (thanks for feedback!) two components was add: <em>StaticGrid</em> and <em>DynamicGrid</em> instead of usual <em>Grid</em> component (it is deprecated now).
|
|
Add <em>component:set</em>input<em>enabled</em> for basic component class. So you can enable/disable user input for any component.
|
|
Finaly implemented <em>on</em>layout<em>changed</em> support. Druid components now will try keep their data between layout changing! You also can use this callback in your custom components.
|
|
Also check <em>component.template.lua</em> what you can use for your own custom components!</p>
|
|
|
|
<ul>
|
|
<li><strong>#77</strong> Grid update:
|
|
|
|
<pre>
|
|
- The _grid_ component now is __deprecated__. Use _static_grid_ instead. Druid will show you deprecated message, <span class="keyword">if</span> you still using _grid_ component
|
|
- __[BREAKING]__ Remove the _grid:set_offset_ grid functions. To adjust the distance between nodes inside grid - setup correct node sizes
|
|
- Add _static_grid_ component
|
|
- The behaviour like previous _grid_ component
|
|
- Have constant element size, so have ability to precalculate positions, indexes <span class="keyword">and</span> size of content
|
|
- By default, <span class="keyword">not</span> shifting elements on removing element. Add _is_shift_ flag to _static_grid:remove_ <span class="keyword">function</span>
|
|
- This grid can spawn elements with several rows <span class="keyword">and</span> columns
|
|
- Add _dynamic_grid_ component
|
|
- Can have different element size. So have no ability to precalculate stuff like _static_grid_
|
|
- This grid can't have gaps between elements. You will get the <span class="global">error</span>, <span class="keyword">if</span> spawn element far away from other elements
|
|
- The grid can spawn elements only <span class="keyword">in</span> row <span class="keyword">or</span> <span class="keyword">in</span> column
|
|
- The grid node should have __West__, __East__, __South__ <span class="keyword">or</span> __North__ pivot (vertical <span class="keyword">or</span> horizontal element placement)
|
|
- Able to shift nodes left <span class="keyword">or</span> right on _grid:add_ / _grid:remove_ functions
|
|
</pre>
|
|
</li>
|
|
<li>Scroll update:
|
|
|
|
<pre>
|
|
- Add _scroll:set_vertical_scroll_ <span class="keyword">and</span> _scroll:set_horizontal_scroll_ <span class="keyword">for</span> disable scroll sides
|
|
- Add _scroll:bind_grid_ <span class="keyword">function</span>. Now is possible to bind Druid Grid component (Static <span class="keyword">or</span> Dynamic) to the scroll <span class="keyword">for</span> auto refresh the scroll size on grid nodes changing
|
|
</pre>
|
|
</li>
|
|
<li><strong>#37</strong> Add <em>on</em>layout<em>change</em> support. Druid will keep and restore GUI component data between changing game layout. Override function <em>on</em>layout<em>change</em> in your custom components to do stuff you need.</li>
|
|
<li><strong>#85</strong> Move several components from <code>base</code> folder to <code>extended</code>. In future to use them, you have to register them manually. This is done for decrease build size by excluding unused components</li>
|
|
<li><strong>Fix #61:</strong> Button component: fix button animation node creation</li>
|
|
<li><strong>Fix #64:</strong> Hover component: wrong mouse_hover default state</li>
|
|
<li><strong>Fix #71:</strong> Blocker: blocker now correct block mouse hover event</li>
|
|
<li><strong>Fix #72:</strong> Fix <code>return nil</code> in some <code>on_input</code> functions</li>
|
|
<li><strong>Fix #74:</strong> <strong>[BREAKING]</strong> Fix typo: strech -> stretch. Scroll function <code>set_extra_stretch_size</code> renamed</li>
|
|
<li><strong>Fix #76:</strong> Add params for lang text localization component</li>
|
|
<li><strong>Fix #79:</strong> Fix <em>druid:remove</em> inside on_input callback</li>
|
|
<li><strong>Fix #80:</strong> Fix <em>hover:set</em>enable_ typo function call</li>
|
|
<li><strong>Fix #88:</strong> Add <em>component:set</em>input<em>enabled</em> function to enable/disable input for druid component. Now you can disable input of any druid component, even complex (with other components inside)</li>
|
|
<li>Add <code>component.template.lua</code> as template for Druid custom component</li>
|
|
<li>Update the example app</li>
|
|
</ul>
|
|
|
|
|
|
|
|
</div> <!-- id="content" -->
|
|
</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-09-29 23:46:16 </i>
|
|
</div> <!-- id="about" -->
|
|
</div> <!-- id="container" -->
|
|
</body>
|
|
</html>
|