Replace event with event library

This commit is contained in:
Insality
2024-11-20 23:52:48 +02:00
parent 6552ea5cac
commit c00fb3590c
39 changed files with 324 additions and 364 deletions

View File

@@ -1,4 +1,4 @@
local event = require("druid.event")
local event = require("event.event")
local component = require("druid.component")
local container = require("example.components.container.container")
local lang_text = require("druid.extended.lang_text")
@@ -39,9 +39,9 @@ function M:init(template, nodes)
self.selected_example = nil
self.examples = {}
self.on_debug_info = event()
self.on_set_information = event()
self.add_log_text = event()
self.on_debug_info = event.create()
self.on_set_information = event.create()
self.add_log_text = event.create()
timer.delay(0.1, true, function()
self:update_debug_info()

View File

@@ -6,7 +6,7 @@ local lang_text = require("druid.extended.lang_text")
---@field root druid.container
---@field text druid.lang_text
---@field druid druid_instance
---@field on_click druid.event
---@field on_click event
local M = component.create("examples_list_view_item")
---@param template string