mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
ba7ee40510 | ||
|
d019247ae4 | ||
|
616c513fbd | ||
|
61111536a8 | ||
|
b5d2f313cc | ||
|
d0067e5496 | ||
|
58f14d0a64 |
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -33,7 +33,8 @@
|
||||
"Lua.runtime.version": "Lua 5.1",
|
||||
"Lua.workspace.library": [
|
||||
"~/Library/Application Support/Cursor/User/globalStorage/astronachos.defold",
|
||||
"~/Library/Application Support/Cursor/User/workspaceStorage/1446075a23c89451a63f0e82b2291def/astronachos.defold"
|
||||
"~/Library/Application Support/Cursor/User/workspaceStorage/1446075a23c89451a63f0e82b2291def/astronachos.defold",
|
||||
"~/Library/Application Support/Cursor/User/workspaceStorage/7975bec62a9fa9724d190779fa01ec63/astronachos.defold"
|
||||
],
|
||||
"files.exclude": {
|
||||
"**/*.gui": true
|
||||
|
@@ -39,13 +39,13 @@ Open your `game.project` file and add the following lines to the dependencies fi
|
||||
**[Druid](https://github.com/Insality/druid/)**
|
||||
|
||||
```
|
||||
https://github.com/Insality/druid/archive/refs/tags/1.1.2.zip
|
||||
https://github.com/Insality/druid/archive/refs/tags/1.1.5.zip
|
||||
```
|
||||
|
||||
**[Defold Event](https://github.com/Insality/defold-event)**
|
||||
|
||||
```
|
||||
https://github.com/Insality/defold-event/archive/refs/tags/11.zip
|
||||
https://github.com/Insality/defold-event/archive/refs/tags/12.zip
|
||||
```
|
||||
|
||||
After that, select `Project ▸ Fetch Libraries` to update [library dependencies]((https://defold.com/manuals/libraries/#setting-up-library-dependencies)). This happens automatically whenever you open a project so you will only need to do this if the dependencies change without re-opening the project.
|
||||
|
@@ -117,7 +117,17 @@ function M:set_nodes(nodes)
|
||||
nodes = gui.clone_tree(nodes) --[[@as table<hash, node>]]
|
||||
end
|
||||
|
||||
-- When we use gui.clone_tree in inner template (template inside other template)
|
||||
-- this nodes have no id. We have table: hash(correct_id) : hash("") or hash("_nodeX"
|
||||
-- It's wrong and we use this hack to fix this
|
||||
if nodes then
|
||||
for id, node in pairs(nodes) do
|
||||
gui.set_id(node, id)
|
||||
end
|
||||
end
|
||||
|
||||
self._meta.nodes = nodes
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
local component = require("druid.component")
|
||||
local helper = require("druid.helper")
|
||||
local defer = require("event.defer")
|
||||
local queues = require("event.queues")
|
||||
|
||||
---@class druid.tiling_node: druid.component
|
||||
---@field animation table
|
||||
@@ -28,7 +28,7 @@ function M:init(node)
|
||||
print("The druid.script is not found, please add it nearby to the GUI collection", msg.url())
|
||||
end)
|
||||
|
||||
defer.push("druid.get_atlas_path", {
|
||||
queues.push("druid.get_atlas_path", {
|
||||
texture_name = gui.get_texture(self.node),
|
||||
sender = msg.url(),
|
||||
}, self.on_get_atlas_path, self)
|
||||
|
@@ -3,9 +3,9 @@
|
||||
-- This one is a required to make a unified "Shaders" pipeline in the GUI scripts
|
||||
-- This required to grab a texture data with `go.get` function
|
||||
|
||||
local defer = require("event.defer")
|
||||
local queues = require("event.queues")
|
||||
|
||||
---Usage: defer.push("druid.get_atlas_path", {
|
||||
---Usage: queues.push("druid.get_atlas_path", {
|
||||
--- texture_name = gui.get_texture(self.node),
|
||||
--- sender = msg.url(),
|
||||
---}, callback, [context])
|
||||
@@ -35,10 +35,10 @@ end
|
||||
|
||||
|
||||
function init(self)
|
||||
defer.subscribe(MESSAGE_GET_ATLAS_PATH, get_atlas_path, self)
|
||||
queues.subscribe(MESSAGE_GET_ATLAS_PATH, get_atlas_path, self)
|
||||
end
|
||||
|
||||
|
||||
function final(self)
|
||||
defer.unsubscribe(MESSAGE_GET_ATLAS_PATH, get_atlas_path, self)
|
||||
queues.unsubscribe(MESSAGE_GET_ATLAS_PATH, get_atlas_path, self)
|
||||
end
|
||||
|
@@ -473,6 +473,9 @@ function M.get_text_metrics_from_node(text_node)
|
||||
options.tracking = gui.get_tracking(text_node)
|
||||
options.line_break = gui.get_line_break(text_node)
|
||||
|
||||
options.width = 0
|
||||
options.leading = 0
|
||||
|
||||
-- Gather other options only if it used in node
|
||||
if options.line_break then
|
||||
options.width = gui.get_size(text_node).x
|
||||
|
@@ -14,16 +14,16 @@ update_frequency = 60
|
||||
|
||||
[project]
|
||||
title = Druid
|
||||
version = 1.1.2
|
||||
version = 1.1.5
|
||||
publisher = Insality
|
||||
developer = Maksim Tuprikov
|
||||
custom_resources = /example/locales
|
||||
dependencies#0 = https://github.com/britzl/deftest/archive/refs/tags/2.8.0.zip
|
||||
dependencies#1 = https://github.com/Insality/defold-saver/archive/refs/heads/develop.zip
|
||||
dependencies#1 = https://github.com/Insality/defold-saver/archive/refs/tags/5.zip
|
||||
dependencies#2 = https://github.com/Insality/defold-tweener/archive/refs/tags/3.zip
|
||||
dependencies#3 = https://github.com/Insality/panthera/archive/refs/heads/develop.zip
|
||||
dependencies#3 = https://github.com/Insality/panthera/archive/refs/tags/runtime.4.zip
|
||||
dependencies#4 = https://github.com/Insality/defold-lang/archive/refs/tags/3.zip
|
||||
dependencies#5 = https://github.com/Insality/defold-event/archive/refs/heads/develop.zip
|
||||
dependencies#5 = https://github.com/Insality/defold-event/archive/refs/tags/12.zip
|
||||
dependencies#6 = https://github.com/subsoap/defos/archive/refs/tags/v2.8.0.zip
|
||||
|
||||
[library]
|
||||
|
@@ -709,3 +709,12 @@ Please support me if you like this project! It will help me keep engaged to upda
|
||||
#### Druid 1.1.2
|
||||
- [#310] Add data list matrix example (Grid 4 in row)
|
||||
- [Data List] Fix for data list element amounts issue
|
||||
|
||||
#### Druid 1.1.3
|
||||
- Fix for node_id of cloned nodes with `gui.clone_tree`
|
||||
|
||||
#### Druid 1.1.4
|
||||
- [#312] Fix for text metrics issue if returned height is 0 sometimes
|
||||
|
||||
#### Druid 1.1.5
|
||||
- Update for using `defold-event` library v12
|
||||
|
Reference in New Issue
Block a user