mirror of
https://github.com/Insality/druid
synced 2025-06-27 10:27:48 +02:00
Update
This commit is contained in:
parent
f36986ed1f
commit
69cf28e408
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
[](https://github.com/sponsors/insality) [](https://ko-fi.com/insality) [](https://www.buymeacoffee.com/insality)
|
[](https://github.com/sponsors/insality) [](https://ko-fi.com/insality) [](https://www.buymeacoffee.com/insality)
|
||||||
|
|
||||||
**Druid** - powerful **Defold** component UI framework that empowers developers to create stunning and customizable GUIs by leveraging a wide range of embedded components or effortlessly designing their own game-specific components.
|
**Druid** - a powerful, flexible and easy to use **Defold** component UI framework. Contains a wide range of components and features to create stunning and customizable GUIs. Provides a powerful way to create, compose and manage your custom components and scenes.
|
||||||
|
|
||||||
## Druid Example
|
## Druid Example
|
||||||
|
|
||||||
|
@ -213,8 +213,6 @@ max_time_step = 0.5
|
|||||||
|
|
||||||
[druid]
|
[druid]
|
||||||
no_auto_input = 0
|
no_auto_input = 0
|
||||||
no_stencil_check = 0
|
|
||||||
no_auto_template = 0
|
|
||||||
input_text = text
|
input_text = text
|
||||||
input_touch = touch
|
input_touch = touch
|
||||||
input_marked_text = marked_text
|
input_marked_text = marked_text
|
||||||
|
0
docs_md/widgets.md
Normal file
0
docs_md/widgets.md
Normal file
@ -16,7 +16,7 @@ local component = require("druid.component")
|
|||||||
---@field on_mouse_hover fun(self, node, hover_state)|nil
|
---@field on_mouse_hover fun(self, node, hover_state)|nil
|
||||||
---@field on_set_enabled fun(self, node, enabled_state)|nil
|
---@field on_set_enabled fun(self, node, enabled_state)|nil
|
||||||
|
|
||||||
---Clickable node with various interaction callbacks
|
---Druid component to make clickable node with various interaction callbacks
|
||||||
---@class druid.button: druid.component
|
---@class druid.button: druid.component
|
||||||
---@field on_click event function(self, custom_args, button_instance)
|
---@field on_click event function(self, custom_args, button_instance)
|
||||||
---@field on_pressed event function(self, custom_args, button_instance)
|
---@field on_pressed event function(self, custom_args, button_instance)
|
||||||
@ -218,7 +218,7 @@ end
|
|||||||
|
|
||||||
---Set additional button click area.
|
---Set additional button click area.
|
||||||
---Useful to restrict click outside out stencil node or scrollable content.
|
---Useful to restrict click outside out stencil node or scrollable content.
|
||||||
---This functions calls automatically if you don't disable it in game.project: druid.no_stencil_check
|
---If button node placed inside stencil node, it will be automatically set to this stencil node.
|
||||||
---@param zone node|string|nil Gui node
|
---@param zone node|string|nil Gui node
|
||||||
---@return druid.button self
|
---@return druid.button self
|
||||||
function M:set_click_zone(zone)
|
function M:set_click_zone(zone)
|
||||||
|
@ -89,6 +89,7 @@ local WRAPPED_WIDGETS = {}
|
|||||||
|
|
||||||
---Set a widget to the current game object. The game object can acquire the widget by calling `bindings.get_widget`
|
---Set a widget to the current game object. The game object can acquire the widget by calling `bindings.get_widget`
|
||||||
---It wraps with events only top level functions cross-context, so you will have no access to nested widgets functions
|
---It wraps with events only top level functions cross-context, so you will have no access to nested widgets functions
|
||||||
|
---Only one widget can be set per game object.
|
||||||
---@param widget druid.widget
|
---@param widget druid.widget
|
||||||
function M.set_widget(widget)
|
function M.set_widget(widget)
|
||||||
local object = msg.url()
|
local object = msg.url()
|
||||||
@ -113,6 +114,7 @@ function M.set_widget(widget)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
---Get a binded widget to the current game object.
|
||||||
---@param object_url string|userdata|url|nil Root object, if nil current object will be used
|
---@param object_url string|userdata|url|nil Root object, if nil current object will be used
|
||||||
---@return druid.widget|nil
|
---@return druid.widget|nil
|
||||||
function M.get_widget(object_url)
|
function M.get_widget(object_url)
|
||||||
|
@ -3,7 +3,7 @@ local component = require("druid.component")
|
|||||||
|
|
||||||
local druid_logo_panthera = require("example.components.druid_logo.druid_logo_panthera")
|
local druid_logo_panthera = require("example.components.druid_logo.druid_logo_panthera")
|
||||||
|
|
||||||
---@class druid_logo: druid.component
|
---@class examples.druid_logo: druid.component
|
||||||
---@field root druid.container
|
---@field root druid.container
|
||||||
---@field text_description druid.text
|
---@field text_description druid.text
|
||||||
---@field druid druid.instance
|
---@field druid druid.instance
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
local component = require("druid.component")
|
local component = require("druid.component")
|
||||||
|
|
||||||
---@class example_scene: druid.component
|
---@class examples.example_scene: druid.component
|
||||||
---@field root druid.container
|
---@field root druid.container
|
||||||
---@field text_debug_info druid.text
|
---@field text_debug_info druid.text
|
||||||
---@field text_gui_path druid.text
|
---@field text_gui_path druid.text
|
||||||
|
@ -36,8 +36,6 @@ game_binding = /builtins/input/all.input_bindingc
|
|||||||
|
|
||||||
[druid]
|
[druid]
|
||||||
no_auto_input = 0
|
no_auto_input = 0
|
||||||
no_stencil_check = 0
|
|
||||||
no_auto_template = 0
|
|
||||||
input_text = text
|
input_text = text
|
||||||
input_touch = touch
|
input_touch = touch
|
||||||
input_marked_text = marked_text
|
input_marked_text = marked_text
|
||||||
|
Loading…
x
Reference in New Issue
Block a user