mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 18:12:19 +02:00
Add druid events in components
This commit is contained in:
23
example/kenney/page/button.lua
Normal file
23
example/kenney/page/button.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
local sprite_change_style = {}
|
||||
|
||||
local M = {}
|
||||
|
||||
|
||||
local function setup_buttons(self)
|
||||
self.druid:new_button("button_usual/button")
|
||||
|
||||
local custom_style = self.druid:new_button("button_custom_style/button")
|
||||
custom_style:set_style(sprite_change_style)
|
||||
|
||||
-- HOVER_IMAGE and DEFAULT_IMAGE - from our custom style params
|
||||
custom_style.HOVER_IMAGE = "button_yellow"
|
||||
custom_style.DEFAULT_IMAGE = "button_blue"
|
||||
end
|
||||
|
||||
|
||||
function M.setup_page(self)
|
||||
setup_buttons(self)
|
||||
end
|
||||
|
||||
|
||||
return M
|
8
example/kenney/page/scroll.lua
Normal file
8
example/kenney/page/scroll.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
local M = {}
|
||||
|
||||
|
||||
function M.setup_page(self)
|
||||
end
|
||||
|
||||
|
||||
return M
|
Reference in New Issue
Block a user