Update docs

This commit is contained in:
Insality 2025-04-25 20:53:58 +03:00
parent 6795934a1f
commit ec39242fb1
7 changed files with 16 additions and 16 deletions

View File

@ -1,4 +1,5 @@
---Container component ---Container component
---Experimental, not tested well, main idea is working
-- Container setup in GUI -- Container setup in GUI
-- parent container - container that contains this container. If not, then it's a window default container or parent node -- parent container - container that contains this container. If not, then it's a window default container or parent node
-- container pivot - the point of the parent container that will be used as a pivot point for positioning -- container pivot - the point of the parent container that will be used as a pivot point for positioning

View File

@ -4998,13 +4998,6 @@ nodes {
parent: "container_resize/panel_content" parent: "container_resize/panel_content"
template_node_child: true template_node_child: true
} }
nodes {
type: TYPE_TEMPLATE
id: "use_widgets"
parent: "container"
inherit_alpha: true
template: "/example/examples/container/use_widgets/use_widgets.gui"
}
nodes { nodes {
position { position {
x: -20.0 x: -20.0

View File

@ -95,6 +95,7 @@ nodes {
z: 16.0 z: 16.0
w: 16.0 w: 16.0
} }
alpha: 0.75
} }
nodes { nodes {
position { position {
@ -121,6 +122,7 @@ nodes {
z: 16.0 z: 16.0
w: 16.0 w: 16.0
} }
alpha: 0.75
} }
nodes { nodes {
position { position {
@ -149,6 +151,7 @@ nodes {
z: 16.0 z: 16.0
w: 16.0 w: 16.0
} }
alpha: 0.75
} }
nodes { nodes {
position { position {
@ -177,6 +180,7 @@ nodes {
z: 16.0 z: 16.0
w: 16.0 w: 16.0
} }
alpha: 0.75
} }
nodes { nodes {
position { position {

View File

@ -4,7 +4,6 @@ local memory_panel = require("druid.widget.memory_panel.memory_panel")
function init(self) function init(self)
self.druid = druid.new(self) self.druid = druid.new(self)
self.memory_panel = self.druid:new_widget(memory_panel, "memory_panel") self.memory_panel = self.druid:new_widget(memory_panel, "memory_panel")
end end

View File

@ -58,7 +58,7 @@ cssfile = /builtins/manifests/web/dark_theme.css
show_console_banner = 0 show_console_banner = 0
[native_extension] [native_extension]
app_manifest = app_manifest =
[graphics] [graphics]
texture_profiles = /builtins/graphics/default.texture_profiles texture_profiles = /builtins/graphics/default.texture_profiles

View File

@ -79,11 +79,15 @@ end)
You can set the text function to get the localized string by locale ID. You can set the text function to get the localized string by locale ID.
```lua ```lua
local lang = require("lang.lang")
local druid = require("druid.druid") local druid = require("druid.druid")
-- The callback should return the localized string by locale ID: function(locale_id) ... end -- You can use lang.txp function to get the localized string by locale ID
druid.set_text_function(lang.txp)
-- or custom function with your own logic
druid.set_text_function(function(locale_id) druid.set_text_function(function(locale_id)
-- return lang.get(locale_id) return my_lang_table[locale_id] or locale_id
end) end)
``` ```

View File

@ -617,7 +617,6 @@ To create a widget with a even more fast way, now you always can right click on
- Call `self.widget = self.druid:new_widget(widget_file, "template_id")` to init widget - Call `self.widget = self.druid:new_widget(widget_file, "template_id")` to init widget
- or Call `self.widget = self.druid:new_widget(widget_file, "template_id", "tempalate_id/root")` to clone root node from template and init widget from it - or Call `self.widget = self.druid:new_widget(widget_file, "template_id", "tempalate_id/root")` to clone root node from template and init widget from it
- **Completely reworked documentation** with full code annotations. Let's check the new brand [Quick API Reference](/api/quick_api_reference.md) to get familiar with **Druid**. Any documentation are generated from the code annotations, so in case to update documentation, you need to update annotations in the code directly. - **Completely reworked documentation** with full code annotations. Let's check the new brand [Quick API Reference](/api/quick_api_reference.md) to get familiar with **Druid**. Any documentation are generated from the code annotations, so in case to update documentation, you need to update annotations in the code directly.
## Breaking Changes ## Breaking Changes
@ -628,7 +627,7 @@ To create a widget with a even more fast way, now you always can right click on
This release represents a major step forward in making Druid more maintainable, readable, and powerful. Check out the full changelog for all the details! This release represents a major step forward in making Druid more maintainable, readable, and powerful. Check out the full changelog for all the details!
The [contributing guide](CONTRIBUTING.md) is created for people who want to contribute to the Druid. The [contributing guide](https://github.com/Insality/druid/blob/develop/CONTRIBUTING.md) is created for people who want to contribute to the Druid.
Thank you for using Druid and please share your feedback! Thank you for using Druid and please share your feedback!
@ -640,7 +639,7 @@ Thank you for using Druid and please share your feedback!
- The code now is fully annotated - The code now is fully annotated
- The old API website is removed - The old API website is removed
- The API now placed as a markdown files in the `api` folder of the repository - The API now placed as a markdown files in the `api` folder of the repository
- Start with [Quick API Reference](/api/quick_api_reference.md) to learn how to use Druid - Start with [Quick API Reference](https://github.com/Insality/druid/blob/develop/api/quick_api_reference.md) to learn how to use Druid
- **[BREAKING]** Remove `druid.event`, replaced with `defold-event` library. Now it required to two dependencies to use Druid. - **[BREAKING]** Remove `druid.event`, replaced with `defold-event` library. Now it required to two dependencies to use Druid.
- This allow to make more flexible features, like shaders and sync init functions between script and gui_script in various cases. - This allow to make more flexible features, like shaders and sync init functions between script and gui_script in various cases.
- You need to migrate from `require("druid.event")` to `require("event.event")` if you are using it in your project - You need to migrate from `require("druid.event")` to `require("event.event")` if you are using it in your project
@ -667,12 +666,12 @@ Thank you for using Druid and please share your feedback!
- **[System]** 🎉 No need for the `druid.register()`! Now all Druid's components are available by default and available with `self.druid:new_*` functions - **[System]** 🎉 No need for the `druid.register()`! Now all Druid's components are available by default and available with `self.druid:new_*` functions
- This means the Druid will be bigger in size, but it's much comfortable to use - This means the Druid will be bigger in size, but it's much comfortable to use
- In case you want to delete components you are not using, you can do it in fork in `druid.lua` file - In case you want to delete components you are not using, you can do it in fork in `druid.lua` file
- Read [optimize_druid_size.md](optimize_druid_size.md) to learn how to reduce the size of the Druid library if you interested - Read [optimize_druid_size.md](https://github.com/Insality/druid/blob/develop/wiki/optimize_druid_size.md) to learn how to reduce the size of the Druid library if you interested
- Any additional new widgets, utilities files will be not included until you use it - Any additional new widgets, utilities files will be not included until you use it
- You still can register your custom components to make a aliases for them. Widgets are not supported here. - You still can register your custom components to make a aliases for them. Widgets are not supported here.
- **[BREAKING]** Removed old `druid.no_stencil_check` and `druid.no_auto_template` flags. Now it's always disabled - **[BREAKING]** Removed old `druid.no_stencil_check` and `druid.no_auto_template` flags. Now it's always disabled
- **[System]** Huge code refactoring and improvements. The goal is to raise maintainability and readability of the code to help people to contribute. - **[System]** Huge code refactoring and improvements. The goal is to raise maintainability and readability of the code to help people to contribute.
- **[Docs]** Add [CONTRIBUTING.md](/CONTRIBUTING.md) file with various information to help people to contribute to the Druid. - **[Docs]** Add [CONTRIBUTING.md](https://github.com/Insality/druid/blob/develop/CONTRIBUTING.md) file with various information to help people to contribute to the Druid.
- **[Editor Scripts]** Updated editor scripts - **[Editor Scripts]** Updated editor scripts
- **[Editor Scripts]** Add "[Druid] Create Druid Widget" instead of "Create Custom Component" - **[Editor Scripts]** Add "[Druid] Create Druid Widget" instead of "Create Custom Component"
- **[Editor Scripts]** Add "[Druid] Settings" editor dialog - **[Editor Scripts]** Add "[Druid] Settings" editor dialog