Update config.lua
This commit is contained in:
+1
-43
@@ -1,21 +1,14 @@
|
|||||||
------------------------------------------------------------
|
|
||||||
-- pfUI-DQB
|
-- pfUI-DQB
|
||||||
-- config.lua
|
-- config.lua
|
||||||
--
|
|
||||||
-- Default configuration for DQB.
|
-- Default configuration for DQB.
|
||||||
-- GUI registration is handled by gui.lua.
|
-- GUI registration is handled by gui.lua.
|
||||||
------------------------------------------------------------
|
|
||||||
|
|
||||||
local DQB = pfUI and pfUI.dqb
|
local DQB = pfUI and pfUI.dqb
|
||||||
|
|
||||||
if not DQB then
|
if not DQB then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
------------------------------------------------------------
|
|
||||||
-- Helpers
|
-- Helpers
|
||||||
------------------------------------------------------------
|
|
||||||
|
|
||||||
local function GetPFUIFont()
|
local function GetPFUIFont()
|
||||||
if pfUI and pfUI.font_default then
|
if pfUI and pfUI.font_default then
|
||||||
return pfUI.font_default
|
return pfUI.font_default
|
||||||
@@ -50,20 +43,14 @@ local function GetPFUIBackgroundAlpha()
|
|||||||
return "0.75"
|
return "0.75"
|
||||||
end
|
end
|
||||||
|
|
||||||
------------------------------------------------------------
|
|
||||||
-- Module defaults
|
-- Module defaults
|
||||||
------------------------------------------------------------
|
|
||||||
|
|
||||||
local function InitializeModule(module)
|
local function InitializeModule(module)
|
||||||
|
|
||||||
if not module then
|
if not module then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------------------------------------------------
|
|
||||||
-- No style selected by default.
|
-- No style selected by default.
|
||||||
--------------------------------------------------------
|
|
||||||
|
|
||||||
if module.use_pfui_style == nil then
|
if module.use_pfui_style == nil then
|
||||||
module.use_pfui_style = "0"
|
module.use_pfui_style = "0"
|
||||||
end
|
end
|
||||||
@@ -72,18 +59,12 @@ local function InitializeModule(module)
|
|||||||
module.use_custom_style = "0"
|
module.use_custom_style = "0"
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------------------------------------------------
|
|
||||||
-- pfUI Style
|
-- pfUI Style
|
||||||
--------------------------------------------------------
|
|
||||||
|
|
||||||
if module.pfui_background_alpha == nil then
|
if module.pfui_background_alpha == nil then
|
||||||
module.pfui_background_alpha = GetPFUIBackgroundAlpha()
|
module.pfui_background_alpha = GetPFUIBackgroundAlpha()
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------------------------------------------------
|
|
||||||
-- Custom Style
|
-- Custom Style
|
||||||
--------------------------------------------------------
|
|
||||||
|
|
||||||
if not module.custom then
|
if not module.custom then
|
||||||
module.custom = {}
|
module.custom = {}
|
||||||
end
|
end
|
||||||
@@ -106,13 +87,9 @@ local function InitializeModule(module)
|
|||||||
custom.font = GetPFUIFont()
|
custom.font = GetPFUIFont()
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------------------------------------------------
|
|
||||||
-- DQB visual defaults
|
-- DQB visual defaults
|
||||||
--
|
|
||||||
-- Titles = Gold
|
-- Titles = Gold
|
||||||
-- Text = White
|
-- Text = White
|
||||||
--------------------------------------------------------
|
|
||||||
|
|
||||||
if custom.title_color == nil then
|
if custom.title_color == nil then
|
||||||
custom.title_color = "1,0.82,0,1"
|
custom.title_color = "1,0.82,0,1"
|
||||||
end
|
end
|
||||||
@@ -123,10 +100,7 @@ local function InitializeModule(module)
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
------------------------------------------------------------
|
|
||||||
-- Initialize configuration
|
-- Initialize configuration
|
||||||
------------------------------------------------------------
|
|
||||||
|
|
||||||
function DQB:InitializeConfig()
|
function DQB:InitializeConfig()
|
||||||
|
|
||||||
if not pfUI_config then
|
if not pfUI_config then
|
||||||
@@ -137,10 +111,7 @@ function DQB:InitializeConfig()
|
|||||||
pfUI_config.dqb = {}
|
pfUI_config.dqb = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------------------------------------------------
|
|
||||||
-- General
|
-- General
|
||||||
--------------------------------------------------------
|
|
||||||
|
|
||||||
if not pfUI_config.dqb.general then
|
if not pfUI_config.dqb.general then
|
||||||
pfUI_config.dqb.general = {}
|
pfUI_config.dqb.general = {}
|
||||||
end
|
end
|
||||||
@@ -151,10 +122,7 @@ function DQB:InitializeConfig()
|
|||||||
general.enable = "1"
|
general.enable = "1"
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------------------------------------------------
|
|
||||||
-- Quest & Gossip
|
-- Quest & Gossip
|
||||||
--------------------------------------------------------
|
|
||||||
|
|
||||||
if not pfUI_config.dqb.questgossip then
|
if not pfUI_config.dqb.questgossip then
|
||||||
pfUI_config.dqb.questgossip = {}
|
pfUI_config.dqb.questgossip = {}
|
||||||
end
|
end
|
||||||
@@ -163,10 +131,7 @@ function DQB:InitializeConfig()
|
|||||||
pfUI_config.dqb.questgossip
|
pfUI_config.dqb.questgossip
|
||||||
)
|
)
|
||||||
|
|
||||||
--------------------------------------------------------
|
|
||||||
-- Quest Log
|
-- Quest Log
|
||||||
--------------------------------------------------------
|
|
||||||
|
|
||||||
if not pfUI_config.dqb.questlog then
|
if not pfUI_config.dqb.questlog then
|
||||||
pfUI_config.dqb.questlog = {}
|
pfUI_config.dqb.questlog = {}
|
||||||
end
|
end
|
||||||
@@ -175,10 +140,7 @@ function DQB:InitializeConfig()
|
|||||||
pfUI_config.dqb.questlog
|
pfUI_config.dqb.questlog
|
||||||
)
|
)
|
||||||
|
|
||||||
--------------------------------------------------------
|
|
||||||
-- Books
|
-- Books
|
||||||
--------------------------------------------------------
|
|
||||||
|
|
||||||
if not pfUI_config.dqb.books then
|
if not pfUI_config.dqb.books then
|
||||||
pfUI_config.dqb.books = {}
|
pfUI_config.dqb.books = {}
|
||||||
end
|
end
|
||||||
@@ -187,12 +149,8 @@ function DQB:InitializeConfig()
|
|||||||
pfUI_config.dqb.books
|
pfUI_config.dqb.books
|
||||||
)
|
)
|
||||||
|
|
||||||
--------------------------------------------------------
|
|
||||||
-- Merchant
|
-- Merchant
|
||||||
--
|
-- Reserved for later, it may be not needed.
|
||||||
-- Reserved for later.
|
|
||||||
--------------------------------------------------------
|
|
||||||
|
|
||||||
if not pfUI_config.dqb.merchant then
|
if not pfUI_config.dqb.merchant then
|
||||||
pfUI_config.dqb.merchant = {}
|
pfUI_config.dqb.merchant = {}
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user