Add files via upload
This commit is contained in:
+241
@@ -0,0 +1,241 @@
|
||||
------------------------------------------------------------
|
||||
-- pfUI-DQB
|
||||
-- config.lua
|
||||
--
|
||||
-- Default configuration for DQB.
|
||||
-- GUI registration is handled by gui.lua.
|
||||
------------------------------------------------------------
|
||||
|
||||
local DQB = pfUI and pfUI.dqb
|
||||
|
||||
if not DQB then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
-- Default configuration
|
||||
------------------------------------------------------------
|
||||
|
||||
function DQB:InitializeConfig()
|
||||
|
||||
--------------------------------------------------------
|
||||
-- Root
|
||||
--------------------------------------------------------
|
||||
|
||||
if not pfUI_config then
|
||||
pfUI_config = {}
|
||||
end
|
||||
|
||||
if not pfUI_config.dqb then
|
||||
pfUI_config.dqb = {}
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- GENERAL
|
||||
--------------------------------------------------------
|
||||
|
||||
if not pfUI_config.dqb.general then
|
||||
pfUI_config.dqb.general = {}
|
||||
end
|
||||
|
||||
local general = pfUI_config.dqb.general
|
||||
|
||||
if general.enable == nil then
|
||||
general.enable = "1"
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- QUEST & GOSSIP
|
||||
--------------------------------------------------------
|
||||
|
||||
if not pfUI_config.dqb.questgossip then
|
||||
pfUI_config.dqb.questgossip = {}
|
||||
end
|
||||
|
||||
local questgossip = pfUI_config.dqb.questgossip
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- Presets
|
||||
--------------------------------------------------------
|
||||
|
||||
if questgossip.pfui_style == nil then
|
||||
questgossip.pfui_style = "0"
|
||||
end
|
||||
|
||||
if questgossip.fix_fonts == nil then
|
||||
questgossip.fix_fonts = "0"
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- Custom
|
||||
--------------------------------------------------------
|
||||
|
||||
if not questgossip.custom then
|
||||
questgossip.custom = {}
|
||||
end
|
||||
|
||||
local custom = questgossip.custom
|
||||
|
||||
if custom.remove_parchment == nil then
|
||||
custom.remove_parchment = "1"
|
||||
end
|
||||
|
||||
if custom.background_color == nil then
|
||||
custom.background_color = "0,0,0,0.85"
|
||||
end
|
||||
|
||||
if custom.background_alpha == nil then
|
||||
custom.background_alpha = "0.85"
|
||||
end
|
||||
|
||||
if custom.font == nil then
|
||||
custom.font = "Interface\\AddOns\\pfUI\\fonts\\Myriad-Pro.ttf"
|
||||
end
|
||||
|
||||
if custom.title_color == nil then
|
||||
custom.title_color = "1,0.84,0"
|
||||
end
|
||||
|
||||
if custom.text_color == nil then
|
||||
custom.text_color = "1,1,1"
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- QUEST LOG
|
||||
--------------------------------------------------------
|
||||
|
||||
if not pfUI_config.dqb.questlog then
|
||||
pfUI_config.dqb.questlog = {}
|
||||
end
|
||||
|
||||
local questlog = pfUI_config.dqb.questlog
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- Presets
|
||||
--------------------------------------------------------
|
||||
|
||||
if questlog.pfui_style == nil then
|
||||
questlog.pfui_style = "0"
|
||||
end
|
||||
|
||||
if questlog.fix_fonts == nil then
|
||||
questlog.fix_fonts = "0"
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- Custom
|
||||
--------------------------------------------------------
|
||||
|
||||
if not questlog.custom then
|
||||
questlog.custom = {}
|
||||
end
|
||||
|
||||
local custom = questlog.custom
|
||||
|
||||
if custom.remove_parchment == nil then
|
||||
custom.remove_parchment = "1"
|
||||
end
|
||||
|
||||
if custom.background_color == nil then
|
||||
custom.background_color = "0,0,0,0.85"
|
||||
end
|
||||
|
||||
if custom.background_alpha == nil then
|
||||
custom.background_alpha = "0.85"
|
||||
end
|
||||
|
||||
if custom.font == nil then
|
||||
custom.font = "Interface\\AddOns\\pfUI\\fonts\\Myriad-Pro.ttf"
|
||||
end
|
||||
|
||||
if custom.title_color == nil then
|
||||
custom.title_color = "1,0.84,0"
|
||||
end
|
||||
|
||||
if custom.text_color == nil then
|
||||
custom.text_color = "1,1,1"
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- BOOKS
|
||||
--------------------------------------------------------
|
||||
--
|
||||
-- Books corresponds to the original pfUI itemtext.lua.
|
||||
--------------------------------------------------------
|
||||
|
||||
if not pfUI_config.dqb.books then
|
||||
pfUI_config.dqb.books = {}
|
||||
end
|
||||
|
||||
local books = pfUI_config.dqb.books
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- Presets
|
||||
--------------------------------------------------------
|
||||
|
||||
if books.pfui_style == nil then
|
||||
books.pfui_style = "0"
|
||||
end
|
||||
|
||||
if books.fix_fonts == nil then
|
||||
books.fix_fonts = "0"
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- Custom
|
||||
--------------------------------------------------------
|
||||
|
||||
if not books.custom then
|
||||
books.custom = {}
|
||||
end
|
||||
|
||||
local custom = books.custom
|
||||
|
||||
if custom.remove_parchment == nil then
|
||||
custom.remove_parchment = "1"
|
||||
end
|
||||
|
||||
if custom.background_color == nil then
|
||||
custom.background_color = "0,0,0,0.85"
|
||||
end
|
||||
|
||||
if custom.background_alpha == nil then
|
||||
custom.background_alpha = "0.85"
|
||||
end
|
||||
|
||||
if custom.font == nil then
|
||||
custom.font = "Interface\\AddOns\\pfUI\\fonts\\Myriad-Pro.ttf"
|
||||
end
|
||||
|
||||
if custom.title_color == nil then
|
||||
custom.title_color = "1,0.84,0"
|
||||
end
|
||||
|
||||
if custom.text_color == nil then
|
||||
custom.text_color = "1,1,1"
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- MERCHANT
|
||||
--------------------------------------------------------
|
||||
--
|
||||
-- Kept untouched for now.
|
||||
--------------------------------------------------------
|
||||
|
||||
if not pfUI_config.dqb.merchant then
|
||||
pfUI_config.dqb.merchant = {}
|
||||
end
|
||||
|
||||
end
|
||||
@@ -0,0 +1,287 @@
|
||||
```lua
|
||||
------------------------------------------------------------
|
||||
-- pfUI-DQB
|
||||
-- core.lua
|
||||
--
|
||||
-- Main core and module system for pfUI-DQB.
|
||||
------------------------------------------------------------
|
||||
|
||||
local addonName = "pfUI-DQB"
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
-- pfUI-DQB requires pfUI
|
||||
------------------------------------------------------------
|
||||
|
||||
if not pfUI then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
-- Main namespace
|
||||
------------------------------------------------------------
|
||||
|
||||
pfUI.dqb = pfUI.dqb or {}
|
||||
|
||||
local DQB = pfUI.dqb
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
-- Basic information
|
||||
------------------------------------------------------------
|
||||
|
||||
DQB.name = addonName
|
||||
DQB.version = "0.1.1"
|
||||
|
||||
DQB.config = DQB.config or {}
|
||||
DQB.modules = DQB.modules or {}
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
-- Module system
|
||||
------------------------------------------------------------
|
||||
|
||||
function DQB:RegisterModule(name, func)
|
||||
|
||||
if not name or not func then
|
||||
return
|
||||
end
|
||||
|
||||
self.modules[name] = func
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
-- Configuration helpers
|
||||
------------------------------------------------------------
|
||||
|
||||
function DQB:GetGlobalConfig(key, default)
|
||||
|
||||
if not pfUI_config
|
||||
or not pfUI_config.global
|
||||
or pfUI_config.global[key] == nil then
|
||||
|
||||
return default
|
||||
end
|
||||
|
||||
return pfUI_config.global[key]
|
||||
end
|
||||
|
||||
|
||||
function DQB:GetConfig(module, key, default)
|
||||
|
||||
if not pfUI_config
|
||||
or not pfUI_config.dqb
|
||||
or not pfUI_config.dqb[module]
|
||||
or pfUI_config.dqb[module][key] == nil then
|
||||
|
||||
return default
|
||||
end
|
||||
|
||||
return pfUI_config.dqb[module][key]
|
||||
end
|
||||
|
||||
|
||||
function DQB:SetConfig(module, key, value)
|
||||
|
||||
if not pfUI_config then
|
||||
pfUI_config = {}
|
||||
end
|
||||
|
||||
if not pfUI_config.dqb then
|
||||
pfUI_config.dqb = {}
|
||||
end
|
||||
|
||||
if not pfUI_config.dqb[module] then
|
||||
pfUI_config.dqb[module] = {}
|
||||
end
|
||||
|
||||
pfUI_config.dqb[module][key] = value
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
-- Enable / Disable
|
||||
------------------------------------------------------------
|
||||
|
||||
function DQB:IsEnabled()
|
||||
|
||||
return self:GetConfig(
|
||||
"general",
|
||||
"enable",
|
||||
"1"
|
||||
) == "1"
|
||||
|
||||
end
|
||||
|
||||
|
||||
function DQB:SetEnabled(enabled)
|
||||
|
||||
if enabled then
|
||||
|
||||
self:SetConfig(
|
||||
"general",
|
||||
"enable",
|
||||
"1"
|
||||
)
|
||||
|
||||
else
|
||||
|
||||
self:SetConfig(
|
||||
"general",
|
||||
"enable",
|
||||
"0"
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
-- Debug
|
||||
------------------------------------------------------------
|
||||
|
||||
function DQB:Debug(message)
|
||||
|
||||
if DEFAULT_CHAT_FRAME then
|
||||
|
||||
DEFAULT_CHAT_FRAME:AddMessage(
|
||||
"|cff33ffccpf|cffffffffUI-DQB|r: "
|
||||
.. tostring(message)
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
-- Initialize modules
|
||||
------------------------------------------------------------
|
||||
|
||||
function DQB:Initialize()
|
||||
|
||||
self:Debug(
|
||||
"initialized v" .. tostring(self.version)
|
||||
)
|
||||
|
||||
|
||||
self:Debug(
|
||||
"status: "
|
||||
.. (self:IsEnabled() and "enabled" or "disabled")
|
||||
)
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- Do not initialize modules when DQB is disabled
|
||||
--------------------------------------------------------
|
||||
|
||||
if not self:IsEnabled() then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- Load registered modules
|
||||
--------------------------------------------------------
|
||||
|
||||
for name, module in pairs(self.modules) do
|
||||
|
||||
if module then
|
||||
|
||||
local success, errorMessage = pcall(module)
|
||||
|
||||
if not success then
|
||||
|
||||
self:Debug(
|
||||
"module '" ..
|
||||
tostring(name) ..
|
||||
"' failed: " ..
|
||||
tostring(errorMessage)
|
||||
)
|
||||
|
||||
else
|
||||
|
||||
self:Debug(
|
||||
"module '" ..
|
||||
tostring(name) ..
|
||||
"' loaded"
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
-- Initialize after SavedVariables are available
|
||||
------------------------------------------------------------
|
||||
|
||||
local loader = CreateFrame("Frame")
|
||||
|
||||
loader:RegisterEvent("VARIABLES_LOADED")
|
||||
|
||||
|
||||
loader:SetScript("OnEvent", function()
|
||||
|
||||
--------------------------------------------------------
|
||||
-- Make sure this is our expected event
|
||||
--------------------------------------------------------
|
||||
|
||||
if event ~= "VARIABLES_LOADED" then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- pfUI must exist
|
||||
--------------------------------------------------------
|
||||
|
||||
if not pfUI then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- Initialize configuration
|
||||
--------------------------------------------------------
|
||||
|
||||
if DQB.InitializeConfig then
|
||||
|
||||
DQB:InitializeConfig()
|
||||
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- Initialize GUI
|
||||
--------------------------------------------------------
|
||||
|
||||
if DQB.InitializeGUI then
|
||||
|
||||
DQB:InitializeGUI()
|
||||
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- Initialize DQB modules
|
||||
--------------------------------------------------------
|
||||
|
||||
DQB:Initialize()
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- Only execute once
|
||||
--------------------------------------------------------
|
||||
|
||||
this:UnregisterAllEvents()
|
||||
|
||||
end)
|
||||
```
|
||||
@@ -0,0 +1,660 @@
|
||||
------------------------------------------------------------
|
||||
-- pfUI-DQB
|
||||
-- gui.lua
|
||||
--
|
||||
-- Registers DQB configuration inside pfUI's GUI.
|
||||
------------------------------------------------------------
|
||||
|
||||
local DQB = pfUI and pfUI.dqb
|
||||
|
||||
if not DQB then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
-- Create DQB configuration menu
|
||||
------------------------------------------------------------
|
||||
|
||||
function DQB:CreateGUI()
|
||||
|
||||
--------------------------------------------------------
|
||||
-- Make sure pfUI GUI is available
|
||||
--------------------------------------------------------
|
||||
|
||||
if not pfUI.gui then
|
||||
return
|
||||
end
|
||||
|
||||
--------------------------------------------------------
|
||||
-- Make sure our configuration exists
|
||||
--------------------------------------------------------
|
||||
|
||||
if self.InitializeConfig then
|
||||
self:InitializeConfig()
|
||||
end
|
||||
|
||||
if not pfUI_config or not pfUI_config.dqb then
|
||||
return
|
||||
end
|
||||
|
||||
--------------------------------------------------------
|
||||
-- pfUI GUI helpers
|
||||
--------------------------------------------------------
|
||||
|
||||
local CreateConfig = pfUI.gui.CreateConfig
|
||||
local CreateGUIEntry = pfUI.gui.CreateGUIEntry
|
||||
|
||||
if not CreateConfig or not CreateGUIEntry then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- CUSTOM OPACITY SLIDER
|
||||
--------------------------------------------------------
|
||||
--
|
||||
-- pfUI's CreateConfig does not provide a slider widget.
|
||||
-- We therefore create the normal pfUI configuration row
|
||||
-- first and replace its EditBox with our own Slider.
|
||||
--
|
||||
-- This keeps the exact same positioning/layout used by
|
||||
-- the rest of pfUI's GUI.
|
||||
--------------------------------------------------------
|
||||
|
||||
local function CreateOpacitySlider(caption, category, config)
|
||||
|
||||
----------------------------------------------------
|
||||
-- Create the normal pfUI config row.
|
||||
----------------------------------------------------
|
||||
|
||||
local frame = CreateConfig(
|
||||
nil,
|
||||
caption,
|
||||
category,
|
||||
config,
|
||||
"text"
|
||||
)
|
||||
|
||||
if not frame then
|
||||
return
|
||||
end
|
||||
|
||||
----------------------------------------------------
|
||||
-- Hide the normal text input.
|
||||
----------------------------------------------------
|
||||
|
||||
if frame.input then
|
||||
frame.input:Hide()
|
||||
end
|
||||
|
||||
|
||||
----------------------------------------------------
|
||||
-- Create slider.
|
||||
----------------------------------------------------
|
||||
|
||||
local slider = CreateFrame(
|
||||
"Slider",
|
||||
nil,
|
||||
frame
|
||||
)
|
||||
|
||||
slider:SetWidth(180)
|
||||
slider:SetHeight(10)
|
||||
|
||||
slider:SetOrientation("HORIZONTAL")
|
||||
|
||||
slider:SetMinMaxValues(0, 1)
|
||||
|
||||
----------------------------------------------------
|
||||
-- IMPORTANT:
|
||||
-- Set the thumb texture BEFORE GetThumbTexture().
|
||||
----------------------------------------------------
|
||||
|
||||
if pfUI.media and pfUI.media["img:col"] then
|
||||
slider:SetThumbTexture(
|
||||
pfUI.media["img:col"]
|
||||
)
|
||||
end
|
||||
|
||||
----------------------------------------------------
|
||||
-- Position slider.
|
||||
----------------------------------------------------
|
||||
|
||||
slider:SetPoint(
|
||||
"RIGHT",
|
||||
frame,
|
||||
"RIGHT",
|
||||
-38,
|
||||
0
|
||||
)
|
||||
|
||||
|
||||
----------------------------------------------------
|
||||
-- Try to apply pfUI slider skin.
|
||||
--
|
||||
-- SkinSlider expects a valid thumb texture.
|
||||
-- If anything is unavailable, we simply keep the
|
||||
-- normal slider instead of generating an error.
|
||||
----------------------------------------------------
|
||||
|
||||
if pfUI.api and pfUI.api.SkinSlider then
|
||||
local thumb = slider:GetThumbTexture()
|
||||
|
||||
if thumb then
|
||||
pfUI.api.SkinSlider(slider)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
----------------------------------------------------
|
||||
-- Current value.
|
||||
----------------------------------------------------
|
||||
|
||||
local value = tonumber(category[config])
|
||||
|
||||
if not value then
|
||||
value = 0.85
|
||||
end
|
||||
|
||||
if value < 0 then
|
||||
value = 0
|
||||
elseif value > 1 then
|
||||
value = 1
|
||||
end
|
||||
|
||||
slider:SetValue(value)
|
||||
|
||||
|
||||
----------------------------------------------------
|
||||
-- Value text.
|
||||
----------------------------------------------------
|
||||
|
||||
local valueText = frame:CreateFontString(
|
||||
nil,
|
||||
"OVERLAY"
|
||||
)
|
||||
|
||||
valueText:SetFont(
|
||||
pfUI.font_default,
|
||||
pfUI_config.global.font_size - 1,
|
||||
"OUTLINE"
|
||||
)
|
||||
|
||||
valueText:SetJustifyH("RIGHT")
|
||||
|
||||
valueText:SetWidth(34)
|
||||
|
||||
valueText:SetPoint(
|
||||
"RIGHT",
|
||||
frame,
|
||||
"RIGHT",
|
||||
0,
|
||||
0
|
||||
)
|
||||
|
||||
valueText:SetText(
|
||||
math.floor(value * 100 + 0.5) .. "%"
|
||||
)
|
||||
|
||||
|
||||
----------------------------------------------------
|
||||
-- Slider value changed.
|
||||
----------------------------------------------------
|
||||
|
||||
slider:SetScript(
|
||||
"OnValueChanged",
|
||||
function()
|
||||
|
||||
local raw = this:GetValue()
|
||||
|
||||
------------------------------------------------
|
||||
-- Round to 5%.
|
||||
------------------------------------------------
|
||||
|
||||
local newValue =
|
||||
math.floor(raw * 20 + 0.5) / 20
|
||||
|
||||
if newValue < 0 then
|
||||
newValue = 0
|
||||
elseif newValue > 1 then
|
||||
newValue = 1
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------
|
||||
-- Prevent unnecessary recursion.
|
||||
------------------------------------------------
|
||||
|
||||
if math.abs(raw - newValue) > 0.001 then
|
||||
|
||||
this:SetValue(newValue)
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------
|
||||
-- Save value.
|
||||
------------------------------------------------
|
||||
|
||||
category[config] = string.format(
|
||||
"%.2f",
|
||||
newValue
|
||||
)
|
||||
|
||||
|
||||
------------------------------------------------
|
||||
-- Update visible percentage.
|
||||
------------------------------------------------
|
||||
|
||||
if valueText then
|
||||
valueText:SetText(
|
||||
math.floor(newValue * 100 + 0.5)
|
||||
.. "%"
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------
|
||||
-- Tell pfUI that configuration changed.
|
||||
------------------------------------------------
|
||||
|
||||
if pfUI.events
|
||||
and pfUI.events.TriggerEvent then
|
||||
|
||||
pfUI.events:TriggerEvent(
|
||||
"config:changed",
|
||||
category,
|
||||
config
|
||||
)
|
||||
|
||||
else
|
||||
|
||||
pfUI.gui.settingChanged = true
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
----------------------------------------------------
|
||||
-- Mouse wheel support.
|
||||
----------------------------------------------------
|
||||
|
||||
slider:EnableMouseWheel(true)
|
||||
|
||||
slider:SetScript(
|
||||
"OnMouseWheel",
|
||||
function()
|
||||
|
||||
local current = this:GetValue()
|
||||
|
||||
local step = 0.05
|
||||
|
||||
if arg1 > 0 then
|
||||
current = current + step
|
||||
else
|
||||
current = current - step
|
||||
end
|
||||
|
||||
if current < 0 then
|
||||
current = 0
|
||||
elseif current > 1 then
|
||||
current = 1
|
||||
end
|
||||
|
||||
this:SetValue(current)
|
||||
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
----------------------------------------------------
|
||||
-- Store references.
|
||||
----------------------------------------------------
|
||||
|
||||
frame.input = slider
|
||||
frame.value = valueText
|
||||
|
||||
return frame
|
||||
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- GENERAL
|
||||
--------------------------------------------------------
|
||||
|
||||
CreateGUIEntry(
|
||||
"DQB",
|
||||
"General",
|
||||
function()
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Enable DQB",
|
||||
pfUI_config.dqb.general,
|
||||
"enable",
|
||||
"checkbox"
|
||||
)
|
||||
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- QUEST & GOSSIP
|
||||
--------------------------------------------------------
|
||||
|
||||
CreateGUIEntry(
|
||||
"DQB",
|
||||
"Quest & Gossip",
|
||||
function()
|
||||
|
||||
------------------------------------------------
|
||||
-- PRESETS
|
||||
------------------------------------------------
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Remove Blizzard Skin and apply pfUI Style",
|
||||
pfUI_config.dqb.questgossip,
|
||||
"pfui_style",
|
||||
"checkbox"
|
||||
)
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Fix Fonts",
|
||||
pfUI_config.dqb.questgossip,
|
||||
"fix_fonts",
|
||||
"checkbox"
|
||||
)
|
||||
|
||||
|
||||
------------------------------------------------
|
||||
-- CUSTOM
|
||||
------------------------------------------------
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Remove Blizzard Parchment Texture",
|
||||
pfUI_config.dqb.questgossip.custom,
|
||||
"remove_parchment",
|
||||
"checkbox"
|
||||
)
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Background Color",
|
||||
pfUI_config.dqb.questgossip.custom,
|
||||
"background_color",
|
||||
"color"
|
||||
)
|
||||
|
||||
CreateOpacitySlider(
|
||||
"Background Opacity",
|
||||
pfUI_config.dqb.questgossip.custom,
|
||||
"background_alpha"
|
||||
)
|
||||
|
||||
------------------------------------------------
|
||||
-- USE PFUI FONT DROPDOWN
|
||||
------------------------------------------------
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Fonts",
|
||||
pfUI_config.dqb.questgossip.custom,
|
||||
"font",
|
||||
"dropdown",
|
||||
pfUI.gui.dropdowns.fonts
|
||||
)
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Title Color",
|
||||
pfUI_config.dqb.questgossip.custom,
|
||||
"title_color",
|
||||
"color"
|
||||
)
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Text Color",
|
||||
pfUI_config.dqb.questgossip.custom,
|
||||
"text_color",
|
||||
"color"
|
||||
)
|
||||
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- QUEST LOG
|
||||
--------------------------------------------------------
|
||||
|
||||
CreateGUIEntry(
|
||||
"DQB",
|
||||
"Quest Log",
|
||||
function()
|
||||
|
||||
------------------------------------------------
|
||||
-- PRESETS
|
||||
------------------------------------------------
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Remove Blizzard Skin and apply pfUI Style",
|
||||
pfUI_config.dqb.questlog,
|
||||
"pfui_style",
|
||||
"checkbox"
|
||||
)
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Fix Fonts",
|
||||
pfUI_config.dqb.questlog,
|
||||
"fix_fonts",
|
||||
"checkbox"
|
||||
)
|
||||
|
||||
|
||||
------------------------------------------------
|
||||
-- CUSTOM
|
||||
------------------------------------------------
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Remove Blizzard Parchment Texture",
|
||||
pfUI_config.dqb.questlog.custom,
|
||||
"remove_parchment",
|
||||
"checkbox"
|
||||
)
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Background Color",
|
||||
pfUI_config.dqb.questlog.custom,
|
||||
"background_color",
|
||||
"color"
|
||||
)
|
||||
|
||||
CreateOpacitySlider(
|
||||
"Background Opacity",
|
||||
pfUI_config.dqb.questlog.custom,
|
||||
"background_alpha"
|
||||
)
|
||||
|
||||
------------------------------------------------
|
||||
-- USE PFUI FONT DROPDOWN
|
||||
------------------------------------------------
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Fonts",
|
||||
pfUI_config.dqb.questlog.custom,
|
||||
"font",
|
||||
"dropdown",
|
||||
pfUI.gui.dropdowns.fonts
|
||||
)
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Title Color",
|
||||
pfUI_config.dqb.questlog.custom,
|
||||
"title_color",
|
||||
"color"
|
||||
)
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Text Color",
|
||||
pfUI_config.dqb.questlog.custom,
|
||||
"text_color",
|
||||
"color"
|
||||
)
|
||||
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- BOOKS
|
||||
--------------------------------------------------------
|
||||
--
|
||||
-- Books corresponds to the original pfUI itemtext.lua.
|
||||
--------------------------------------------------------
|
||||
|
||||
CreateGUIEntry(
|
||||
"DQB",
|
||||
"Books",
|
||||
function()
|
||||
|
||||
------------------------------------------------
|
||||
-- PRESETS
|
||||
------------------------------------------------
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Remove Blizzard Skin and apply pfUI Style",
|
||||
pfUI_config.dqb.books,
|
||||
"pfui_style",
|
||||
"checkbox"
|
||||
)
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Fix Fonts",
|
||||
pfUI_config.dqb.books,
|
||||
"fix_fonts",
|
||||
"checkbox"
|
||||
)
|
||||
|
||||
|
||||
------------------------------------------------
|
||||
-- CUSTOM
|
||||
------------------------------------------------
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Remove Blizzard Parchment Texture",
|
||||
pfUI_config.dqb.books.custom,
|
||||
"remove_parchment",
|
||||
"checkbox"
|
||||
)
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Background Color",
|
||||
pfUI_config.dqb.books.custom,
|
||||
"background_color",
|
||||
"color"
|
||||
)
|
||||
|
||||
CreateOpacitySlider(
|
||||
"Background Opacity",
|
||||
pfUI_config.dqb.books.custom,
|
||||
"background_alpha"
|
||||
)
|
||||
|
||||
------------------------------------------------
|
||||
-- USE PFUI FONT DROPDOWN
|
||||
------------------------------------------------
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Fonts",
|
||||
pfUI_config.dqb.books.custom,
|
||||
"font",
|
||||
"dropdown",
|
||||
pfUI.gui.dropdowns.fonts
|
||||
)
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Title Color",
|
||||
pfUI_config.dqb.books.custom,
|
||||
"title_color",
|
||||
"color"
|
||||
)
|
||||
|
||||
CreateConfig(
|
||||
nil,
|
||||
"Text Color",
|
||||
pfUI_config.dqb.books.custom,
|
||||
"text_color",
|
||||
"color"
|
||||
)
|
||||
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- MERCHANT
|
||||
--------------------------------------------------------
|
||||
--
|
||||
-- Intentionally not configured yet.
|
||||
-- Merchant remains untouched for now.
|
||||
--------------------------------------------------------
|
||||
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
-- Compatibility with core.lua
|
||||
------------------------------------------------------------
|
||||
|
||||
function DQB:InitializeGUI()
|
||||
self:CreateGUI()
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
-- Initialize GUI after pfUI has loaded
|
||||
------------------------------------------------------------
|
||||
|
||||
local event = CreateFrame("Frame")
|
||||
|
||||
event:RegisterEvent("ADDON_LOADED")
|
||||
|
||||
event:SetScript("OnEvent", function()
|
||||
|
||||
if arg1 == "pfUI" then
|
||||
|
||||
if DQB.InitializeConfig then
|
||||
DQB:InitializeConfig()
|
||||
end
|
||||
|
||||
if DQB.CreateGUI then
|
||||
DQB:CreateGUI()
|
||||
end
|
||||
|
||||
event:UnregisterEvent("ADDON_LOADED")
|
||||
end
|
||||
|
||||
end)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
## Interface: 11200
|
||||
## Title: |cff33ffccpf|cffffffffUI|cffaaaaaa [Dialog, QuestLog & Books]
|
||||
## Author: jKalfis
|
||||
## Notes: Quest & Gossip, Quest Log and Books visual enhancements for pfUI.
|
||||
## Version: 0.1.1
|
||||
## Dependencies: pfUI
|
||||
|
||||
core.lua
|
||||
config.lua
|
||||
gui.lua
|
||||
modules\gossipquest.lua
|
||||
Reference in New Issue
Block a user