mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 10:27:47 +02:00
Rename bounce -> default style, start make new example pages
This commit is contained in:
parent
822db35e84
commit
a81d49de9d
@ -145,7 +145,7 @@
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||||
<i style="float:right;">Last updated 2020-02-23 22:54:59 </i>
|
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -396,7 +396,7 @@
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||||
<i style="float:right;">Last updated 2020-02-23 22:54:59 </i>
|
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -151,7 +151,7 @@
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||||
<i style="float:right;">Last updated 2020-02-23 22:54:59 </i>
|
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||||
<i style="float:right;">Last updated 2020-02-23 22:54:59 </i>
|
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -328,9 +328,23 @@
|
|||||||
<span class="types"><span class="type">function</span></span>
|
<span class="types"><span class="type">function</span></span>
|
||||||
(self, node)
|
(self, node)
|
||||||
</li>
|
</li>
|
||||||
|
<li><span class="parameter">on_click_disabled</span>
|
||||||
|
<span class="types"><span class="type">function</span></span>
|
||||||
|
(self, node)
|
||||||
|
</li>
|
||||||
<li><span class="parameter">on_hover</span>
|
<li><span class="parameter">on_hover</span>
|
||||||
<span class="types"><span class="type">function</span></span>
|
<span class="types"><span class="type">function</span></span>
|
||||||
(self, node, hover_state)
|
(self, node, hover_state)
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">on_set_enabled</span>
|
||||||
|
<span class="types"><span class="type">function</span></span>
|
||||||
|
(self, node, enabled_state)
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">IS_HOVER</span>
|
||||||
|
<span class="types"><span class="type">bool</span></span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -346,7 +360,7 @@
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||||
<i style="float:right;">Last updated 2020-02-23 22:54:59 </i>
|
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||||
<i style="float:right;">Last updated 2020-02-23 22:54:59 </i>
|
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||||
<i style="float:right;">Last updated 2020-02-23 22:54:59 </i>
|
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||||
<i style="float:right;">Last updated 2020-02-23 22:54:59 </i>
|
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -226,7 +226,7 @@
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||||
<i style="float:right;">Last updated 2020-02-23 22:54:59 </i>
|
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -171,7 +171,7 @@
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||||
<i style="float:right;">Last updated 2020-02-23 22:54:59 </i>
|
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -151,7 +151,7 @@
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||||
<i style="float:right;">Last updated 2020-02-23 22:54:59 </i>
|
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -118,7 +118,7 @@
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||||
<i style="float:right;">Last updated 2020-02-23 22:54:59 </i>
|
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -296,7 +296,7 @@
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||||
<i style="float:right;">Last updated 2020-02-23 22:54:59 </i>
|
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||||
<i style="float:right;">Last updated 2020-02-23 22:54:59 </i>
|
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -276,7 +276,7 @@
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||||
<i style="float:right;">Last updated 2020-02-23 22:54:59 </i>
|
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||||
<i style="float:right;">Last updated 2020-02-23 22:54:59 </i>
|
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -235,7 +235,7 @@
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||||
<i style="float:right;">Last updated 2020-02-23 22:54:59 </i>
|
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -179,7 +179,7 @@
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||||
<i style="float:right;">Last updated 2020-02-23 22:54:59 </i>
|
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -162,7 +162,7 @@
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||||
<i style="float:right;">Last updated 2020-02-23 22:54:59 </i>
|
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -740,7 +740,7 @@
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||||
<i style="float:right;">Last updated 2020-02-23 22:54:59 </i>
|
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
--- Component to handle basic GUI button
|
--- Component to handle basic GUI button
|
||||||
-- @module druid.button
|
-- @module druid.button
|
||||||
|
|
||||||
|
--- Button gui component
|
||||||
|
--@class druid
|
||||||
|
|
||||||
--- Component events
|
--- Component events
|
||||||
-- @table Events
|
-- @table Events
|
||||||
-- @tfield druid_event on_click On release button callback
|
-- @tfield druid_event on_click On release button callback
|
||||||
@ -22,7 +25,10 @@
|
|||||||
--- Component style params
|
--- Component style params
|
||||||
-- @table Style
|
-- @table Style
|
||||||
-- @tfield function on_click (self, node)
|
-- @tfield function on_click (self, node)
|
||||||
|
-- @tfield function on_click_disabled (self, node)
|
||||||
-- @tfield function on_hover (self, node, hover_state)
|
-- @tfield function on_hover (self, node, hover_state)
|
||||||
|
-- @tfield function on_set_enabled (self, node, enabled_state)
|
||||||
|
-- @tfield bool IS_HOVER
|
||||||
|
|
||||||
local Event = require("druid.event")
|
local Event = require("druid.event")
|
||||||
local const = require("druid.const")
|
local const = require("druid.const")
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
local settings = require("druid.system.settings")
|
local settings = require("druid.system.settings")
|
||||||
local anims = require("druid.styles.bounce.anims")
|
local anims = require("druid.styles.default.anims")
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
@ -1,14 +1,16 @@
|
|||||||
local druid = require("druid.druid")
|
local druid = require("druid.druid")
|
||||||
|
|
||||||
local empty_style = require("druid.styles.empty.style")
|
local empty_style = require("druid.styles.empty.style")
|
||||||
local bounce_style = require("druid.styles.bounce.style")
|
local default_style = require("druid.styles.default.style")
|
||||||
|
|
||||||
local main_page = require("example.kenney.page.main")
|
local main_page = require("example.kenney.page.main")
|
||||||
local text_page = require("example.kenney.page.texts")
|
local text_page = require("example.kenney.page.texts")
|
||||||
|
|
||||||
local pages = {
|
local pages = {
|
||||||
"main_page",
|
"main_page",
|
||||||
"texts_page"
|
"texts_page",
|
||||||
|
"button_page",
|
||||||
|
"scroll_page",
|
||||||
}
|
}
|
||||||
|
|
||||||
local function on_control_button(self, delta)
|
local function on_control_button(self, delta)
|
||||||
@ -34,7 +36,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
function init(self)
|
function init(self)
|
||||||
druid.set_default_style(bounce_style)
|
druid.set_default_style(default_style)
|
||||||
self.druid = druid.new(self)
|
self.druid = druid.new(self)
|
||||||
|
|
||||||
init_top_panel(self)
|
init_top_panel(self)
|
||||||
|
@ -5,6 +5,8 @@ local M = {}
|
|||||||
local en = {
|
local en = {
|
||||||
main_page = "Main page",
|
main_page = "Main page",
|
||||||
texts_page = "Text page",
|
texts_page = "Text page",
|
||||||
|
button_page = "Button page",
|
||||||
|
scroll_page = "Scroll page",
|
||||||
ui_section_button = "Button",
|
ui_section_button = "Button",
|
||||||
ui_section_text = "Text",
|
ui_section_text = "Text",
|
||||||
ui_section_timer = "Timer",
|
ui_section_timer = "Timer",
|
||||||
@ -19,6 +21,8 @@ local en = {
|
|||||||
local ru = {
|
local ru = {
|
||||||
main_page = "Основное",
|
main_page = "Основное",
|
||||||
texts_page = "Текст",
|
texts_page = "Текст",
|
||||||
|
button_page = "Кнопки",
|
||||||
|
scroll_page = "Скролл",
|
||||||
ui_section_button = "Кнопка",
|
ui_section_button = "Кнопка",
|
||||||
ui_section_text = "Текст",
|
ui_section_text = "Текст",
|
||||||
ui_section_timer = "Таймер",
|
ui_section_timer = "Таймер",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user