mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
#108 Move component interests const from const.lua to component.lua
This commit is contained in:
@@ -15,8 +15,9 @@
|
||||
-- @module druid
|
||||
|
||||
local const = require("druid.const")
|
||||
local druid_instance = require("druid.system.druid_instance")
|
||||
local base_component = require("druid.component")
|
||||
local settings = require("druid.system.settings")
|
||||
local druid_instance = require("druid.system.druid_instance")
|
||||
|
||||
local default_style = require("druid.styles.default.style")
|
||||
|
||||
@@ -105,13 +106,13 @@ function M.on_window_callback(event)
|
||||
|
||||
if event == window.WINDOW_EVENT_FOCUS_LOST then
|
||||
for i = 1, #instances do
|
||||
msg.post(instances[i].url, const.ON_FOCUS_LOST)
|
||||
msg.post(instances[i].url, base_component.ON_FOCUS_LOST)
|
||||
end
|
||||
end
|
||||
|
||||
if event == window.WINDOW_EVENT_FOCUS_GAINED then
|
||||
for i = 1, #instances do
|
||||
msg.post(instances[i].url, const.ON_FOCUS_GAINED)
|
||||
msg.post(instances[i].url, base_component.ON_FOCUS_GAINED)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -123,7 +124,7 @@ function M.on_layout_change()
|
||||
local instances = get_druid_instances()
|
||||
|
||||
for i = 1, #instances do
|
||||
msg.post(instances[i].url, const.ON_LAYOUT_CHANGE)
|
||||
msg.post(instances[i].url, base_component.ON_LAYOUT_CHANGE)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -135,7 +136,7 @@ function M.on_language_change()
|
||||
local instances = get_druid_instances()
|
||||
|
||||
for i = 1, #instances do
|
||||
msg.post(instances[i].url, const.ON_LANGUAGE_CHANGE)
|
||||
msg.post(instances[i].url, base_component.ON_LANGUAGE_CHANGE)
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user