diff --git a/README.md b/README.md index c06cbbf..c40d6f2 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![Github-sponsors](https://img.shields.io/badge/sponsor-30363D?style=for-the-badge&logo=GitHub-Sponsors&logoColor=#EA4AAA)](https://github.com/sponsors/insality) [![Ko-Fi](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/insality) [![BuyMeACoffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](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 @@ -265,4 +265,4 @@ For a complete history of the development of **Druid**, please check the [change Your donation helps me stay engaged in creating valuable projects for **Defold**. If you appreciate what I'm doing, please consider supporting me! -[![Github-sponsors](https://img.shields.io/badge/sponsor-30363D?style=for-the-badge&logo=GitHub-Sponsors&logoColor=#EA4AAA)](https://github.com/sponsors/insality) [![Ko-Fi](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/insality) [![BuyMeACoffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/insality) \ No newline at end of file +[![Github-sponsors](https://img.shields.io/badge/sponsor-30363D?style=for-the-badge&logo=GitHub-Sponsors&logoColor=#EA4AAA)](https://github.com/sponsors/insality) [![Ko-Fi](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/insality) [![BuyMeACoffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/insality) diff --git a/docs/druid/archive/game0.projectc b/docs/druid/archive/game0.projectc index e94fa93..cbd8123 100644 --- a/docs/druid/archive/game0.projectc +++ b/docs/druid/archive/game0.projectc @@ -123,7 +123,7 @@ max_count = 16 launch_screen = /builtins/manifests/ios/LaunchScreen.storyboardc pre_renderered_icons = 0 bundle_identifier = example.unnamed -bundle_name = +bundle_name = infoplist = /builtins/manifests/ios/Info.plist privacymanifest = /builtins/manifests/ios/PrivacyInfo.xcprivacy default_language = en @@ -134,28 +134,28 @@ version_code = 817 minimum_sdk_version = 19 target_sdk_version = 34 package = com.insality.druid -gcm_sender_id = +gcm_sender_id = manifest = /builtins/manifests/android/AndroidManifest.xml iap_provider = GooglePlay input_method = HiddenInputField immersive_mode = 0 display_cutout = 1 debuggable = 0 -proguard = +proguard = extract_native_libs = 1 [osx] -app_icon = +app_icon = infoplist = /builtins/manifests/osx/Info.plist privacymanifest = /builtins/manifests/osx/PrivacyInfo.xcprivacy bundle_identifier = example.unnamed -bundle_name = +bundle_name = bundle_version = 1 default_language = en localizations = en [windows] -app_icon = +app_icon = [html5] custom_heap_size = 0 @@ -164,7 +164,7 @@ htmlfile = /builtins/manifests/web/engine_template.html cssfile = /builtins/manifests/web/dark_theme.css splash_image = /media/druid_logo.png archive_location_prefix = archive -archive_location_suffix = +archive_location_suffix = engine_arguments = --verify-graphics-calls=false wasm_streaming = 0 show_fullscreen_button = 0 @@ -179,7 +179,7 @@ max_particle_count = 0 [network] http_timeout = 0 -ssl_certificates = +ssl_certificates = http_thread_count = 4 http_cache_enabled = 1 @@ -213,8 +213,6 @@ max_time_step = 0.5 [druid] no_auto_input = 0 -no_stencil_check = 0 -no_auto_template = 0 input_text = text input_touch = touch input_marked_text = marked_text @@ -227,7 +225,7 @@ input_scroll_up = mouse_wheel_up input_scroll_down = mouse_wheel_down [native_extension] -app_manifest = +app_manifest = [saver] autosave_timer = 2 diff --git a/docs_md/widgets.md b/docs_md/widgets.md new file mode 100644 index 0000000..e69de29 diff --git a/druid/base/button.lua b/druid/base/button.lua index fd849df..8f143d4 100755 --- a/druid/base/button.lua +++ b/druid/base/button.lua @@ -16,7 +16,7 @@ local component = require("druid.component") ---@field on_mouse_hover fun(self, node, hover_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 ---@field on_click 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. ---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 ---@return druid.button self function M:set_click_zone(zone) diff --git a/druid/druid.lua b/druid/druid.lua index 5a2c2fa..63684af 100644 --- a/druid/druid.lua +++ b/druid/druid.lua @@ -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` ---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 function M.set_widget(widget) local object = msg.url() @@ -113,6 +114,7 @@ function M.set_widget(widget) 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 ---@return druid.widget|nil function M.get_widget(object_url) diff --git a/example/components/druid_logo/druid_logo.lua b/example/components/druid_logo/druid_logo.lua index d1d9efe..5f70ba0 100644 --- a/example/components/druid_logo/druid_logo.lua +++ b/example/components/druid_logo/druid_logo.lua @@ -3,7 +3,7 @@ local component = require("druid.component") 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 text_description druid.text ---@field druid druid.instance diff --git a/example/components/example_scene/example_scene.lua b/example/components/example_scene/example_scene.lua index cc81eca..f8751b3 100644 --- a/example/components/example_scene/example_scene.lua +++ b/example/components/example_scene/example_scene.lua @@ -1,6 +1,6 @@ local component = require("druid.component") ----@class example_scene: druid.component +---@class examples.example_scene: druid.component ---@field root druid.container ---@field text_debug_info druid.text ---@field text_gui_path druid.text diff --git a/game.project b/game.project index e233e1c..4c12388 100644 --- a/game.project +++ b/game.project @@ -36,8 +36,6 @@ game_binding = /builtins/input/all.input_bindingc [druid] no_auto_input = 0 -no_stencil_check = 0 -no_auto_template = 0 input_text = text input_touch = touch input_marked_text = marked_text @@ -60,7 +58,7 @@ cssfile = /builtins/manifests/web/dark_theme.css show_console_banner = 0 [native_extension] -app_manifest = +app_manifest = [graphics] texture_profiles = /builtins/graphics/default.texture_profiles