mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 18:37:44 +02:00
Move default style to druid settings
This commit is contained in:
parent
add6b8e301
commit
b5686af391
@ -4,17 +4,13 @@
|
|||||||
-- to create your own rich components.
|
-- to create your own rich components.
|
||||||
-- @module druid
|
-- @module druid
|
||||||
|
|
||||||
|
|
||||||
local const = require("druid.const")
|
local const = require("druid.const")
|
||||||
local druid_instance = require("druid.system.druid_instance")
|
local druid_instance = require("druid.system.druid_instance")
|
||||||
local settings = require("druid.system.settings")
|
local settings = require("druid.system.settings")
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
|
|
||||||
local log = settings.log
|
local log = settings.log
|
||||||
-- Temporary, what the place for it?
|
|
||||||
local default_style = {}
|
|
||||||
|
|
||||||
|
|
||||||
--- Basic components
|
--- Basic components
|
||||||
@ -74,7 +70,7 @@ function M.new(component_script, style)
|
|||||||
-- Druid context here (who created druid)
|
-- Druid context here (who created druid)
|
||||||
-- Usually gui_script, but can be component from self:get_druid()
|
-- Usually gui_script, but can be component from self:get_druid()
|
||||||
self._context = component_script
|
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
|
-- TODO: Find the better way to handle components
|
||||||
-- All component list
|
-- All component list
|
||||||
@ -87,7 +83,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
function M.set_default_style(style)
|
function M.set_default_style(style)
|
||||||
default_style = style
|
settings.default_style = style
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.is_debug = false
|
M.is_debug = false
|
||||||
|
M.default_style = nil
|
||||||
|
|
||||||
|
|
||||||
function M.get_text(name)
|
function M.get_text(name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user