mirror of
https://github.com/Insality/druid
synced 2025-06-27 02:17:52 +02:00
Update for queue events
This commit is contained in:
parent
350770ba9e
commit
16a5d9936a
@ -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,7 +3,7 @@
|
||||
-- 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", {
|
||||
--- texture_name = gui.get_texture(self.node),
|
||||
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user