diff --git a/druid/druid.lua b/druid/druid.lua index bdc7f9b..becfb26 100644 --- a/druid/druid.lua +++ b/druid/druid.lua @@ -4,17 +4,13 @@ -- to create your own rich components. -- @module druid - local const = require("druid.const") local druid_instance = require("druid.system.druid_instance") local settings = require("druid.system.settings") local M = {} - local log = settings.log --- Temporary, what the place for it? -local default_style = {} --- Basic components @@ -74,7 +70,7 @@ function M.new(component_script, style) -- Druid context here (who created druid) -- Usually gui_script, but can be component from self:get_druid() self._context = component_script - self._style = style or default_style + self._style = style or settings.default_style -- TODO: Find the better way to handle components -- All component list @@ -87,7 +83,7 @@ end function M.set_default_style(style) - default_style = style + settings.default_style = style end diff --git a/druid/system/settings.lua b/druid/system/settings.lua index 58b3987..2fd8bbb 100644 --- a/druid/system/settings.lua +++ b/druid/system/settings.lua @@ -4,6 +4,7 @@ local M = {} M.is_debug = false +M.default_style = nil function M.get_text(name)