From 4156c430faa375f10c9b7e9c1028b1f56664530a Mon Sep 17 00:00:00 2001 From: jKalfis Date: Sat, 5 Sep 2026 22:09:35 +0100 Subject: [PATCH] ver. 1.0.0 First running version working. --- config.lua | 64 ++ core.lua | 192 ++++++ gui.lua | 116 ++++ modules/gossipquest.lua | 916 +++++++++++++++++++++++++++ modules/itemtext.lua | 685 ++++++++++++++++++++ modules/questlog.lua | 1324 +++++++++++++++++++++++++++++++++++++++ pfUI-DQB.toc | 13 + 7 files changed, 3310 insertions(+) create mode 100644 config.lua create mode 100644 core.lua create mode 100644 gui.lua create mode 100644 modules/gossipquest.lua create mode 100644 modules/itemtext.lua create mode 100644 modules/questlog.lua create mode 100644 pfUI-DQB.toc diff --git a/config.lua b/config.lua new file mode 100644 index 0000000..f73ac83 --- /dev/null +++ b/config.lua @@ -0,0 +1,64 @@ +------------------------------------------------------------ +-- pfUI-DQB +-- config.lua +-- +-- Default configuration for pfUI-DQB v0.2.0 +------------------------------------------------------------ + +local DQB = pfUI and pfUI.dqb + +if not DQB then + return +end + + +-- Initialize DQB configuration + +function DQB:InitializeConfig() + + -- Root configuration + + if not pfUI_config then + pfUI_config = {} + end + + if not pfUI_config.dqb then + pfUI_config.dqb = {} + end + + + -- Dialogs & Quest Log + -- + -- Controls: + -- gossipquest.lua + -- questlog.lua + + if pfUI_config.dqb.dialogs_questlog == nil then + pfUI_config.dqb.dialogs_questlog = {} + end + + local dialogsQuestLog = + pfUI_config.dqb.dialogs_questlog + + if dialogsQuestLog.enable == nil then + dialogsQuestLog.enable = "0" + end + + + -- Books + -- + -- Controls: + -- itemtext.lua + + if pfUI_config.dqb.books == nil then + pfUI_config.dqb.books = {} + end + + local books = + pfUI_config.dqb.books + + if books.enable == nil then + books.enable = "0" + end + +end \ No newline at end of file diff --git a/core.lua b/core.lua new file mode 100644 index 0000000..45291d0 --- /dev/null +++ b/core.lua @@ -0,0 +1,192 @@ +------------------------------------------------------------ +-- pfUI-DQB +-- core.lua +------------------------------------------------------------ + +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.2.0" + +-- Registered modules + +DQB.modules = DQB.modules or {} + +-- Register a DQB module + +function DQB:RegisterModule(name, func) + + if not name or not func then + return + end + + self.modules[name] = func + +end + +-- Get DQB configuration + +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 + +-- Set DQB configuration + +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 + +-- Check Dialogs & Quest Log option + +function DQB:IsDialogsQuestLogEnabled() + + return self:GetConfig( + "dialogs_questlog", + "enable", + "0" + ) == "1" + +end + +-- Check Books option + +function DQB:IsBooksEnabled() + + return self:GetConfig( + "books", + "enable", + "0" + ) == "1" + +end + +-- Check whether a specific module is enabled + +function DQB:IsModuleEnabled(name) + + if name == "gossipquest" + or name == "questlog" then + + return self:IsDialogsQuestLogEnabled() + + end + + if name == "itemtext" then + + return self:IsBooksEnabled() + + end + + return false + +end + +-- Debug message + +function DQB:Debug(message) + + if DEFAULT_CHAT_FRAME then + + DEFAULT_CHAT_FRAME:AddMessage( + "|cff33ffccpf|cffffffffUI-DQB|r: " + .. tostring(message) + ) + + end + +end + +-- Initialize registered modules + +function DQB:Initialize() + + for name, module in pairs(self.modules) do + + if module + and self:IsModuleEnabled(name) then + + module() + + end + + end + +end + +-- Initialize after SavedVariables are available + +local loader = CreateFrame("Frame") + +loader:RegisterEvent("VARIABLES_LOADED") + +loader:SetScript("OnEvent", function() + + if event ~= "VARIABLES_LOADED" then + return + end + + -- pfUI must exist + + if not pfUI then + return + end + + -- Initialize DQB configuration + + if DQB.InitializeConfig then + DQB:InitializeConfig() + end + + -- Initialize DQB GUI + + if DQB.CreateGUI then + DQB:CreateGUI() + end + + -- Initialize enabled DQB modules + + DQB:Initialize() + + -- No longer need this event + + this:UnregisterAllEvents() + +end) \ No newline at end of file diff --git a/gui.lua b/gui.lua new file mode 100644 index 0000000..3c6fb31 --- /dev/null +++ b/gui.lua @@ -0,0 +1,116 @@ +-- pfUI-DQB +-- gui.lua +-- +-- Adds DQB configuration to the pfUI GUI. + +local DQB = pfUI and pfUI.dqb + +if not DQB then + return +end + + +-- Create DQB configuration menu + +function DQB:CreateGUI() + + if self.InitializeConfig then + self:InitializeConfig() + end + + if not pfUI + or not pfUI.gui + or not pfUI.gui.CreateGUIEntry + or not pfUI.gui.CreateConfig then + + return + end + + + -- Avoid creating the menu more than once + + if self.guiCreated then + return + end + + + local CreateGUIEntry = + pfUI.gui.CreateGUIEntry + + local CreateConfig = + pfUI.gui.CreateConfig + + + -- DQB main menu entry + + CreateGUIEntry( + "DQB", + nil, + function() + + -- Dialogs & Quest Log + + CreateConfig( + nil, + "Use pfUI Style: Dialogs & Quest Log", + pfUI_config.dqb.dialogs_questlog, + "enable", + "checkbox" + ) + + + -- Books + + CreateConfig( + nil, + "Use pfUI Style: Books", + pfUI_config.dqb.books, + "enable", + "checkbox" + ) + + end + ) + + + self.guiCreated = true + +end + + +-- Wait until pfUI has created its GUI + +local event = CreateFrame("Frame") + +event:RegisterEvent("ADDON_LOADED") + +event:SetScript( + "OnEvent", + function() + + if arg1 ~= "pfUI" then + return + end + + + if not DQB.InitializeConfig then + return + end + + + DQB:InitializeConfig() + + + -- pfUI GUI must already exist + + if pfUI.gui + and pfUI.gui.CreateGUIEntry then + + DQB:CreateGUI() + + event:UnregisterAllEvents() + + end + + end +) \ No newline at end of file diff --git a/modules/gossipquest.lua b/modules/gossipquest.lua new file mode 100644 index 0000000..423fdbd --- /dev/null +++ b/modules/gossipquest.lua @@ -0,0 +1,916 @@ +------------------------------------------------------------ +-- pfUI-DQB +-- modules/gossipquest.lua +-- +-- DQB customization for pfUI Gossip & Quest dialogs. +-- +-- pfUI remains responsible for: +-- - Main frame +-- - Frame backdrop +-- - Close button +-- - Movement +-- - Buttons +-- - General pfUI appearance +-- +-- DQB changes: +-- - Text colors +-- - Gossip option colors +-- - Quest text colors +-- - Quest/Gossip parchment background +------------------------------------------------------------ + +local DQB = pfUI and pfUI.dqb + +if not DQB then + return +end + + +DQB:RegisterModule("gossipquest", function() + + -------------------------------------------------------- + -- Configuration + -------------------------------------------------------- + + if not DQB:IsModuleEnabled("gossipquest") then + return + end + + + -------------------------------------------------------- + -- Helpers + -------------------------------------------------------- + + local function SetWhite(text) + + if not text then + return + end + + text:SetTextColor( + 1, + 1, + 1, + 1 + ) + + text:SetShadowColor( + 0, + 0, + 0, + 1 + ) + + text:SetShadowOffset( + 1, + -1 + ) + + end + + + local function SetGold(text) + + if not text then + return + end + + text:SetTextColor( + 1, + 0.82, + 0, + 1 + ) + + text:SetShadowColor( + 0, + 0, + 0, + 1 + ) + + text:SetShadowOffset( + 1, + -1 + ) + + end + + + -------------------------------------------------------- + -- Gossip / Quest option buttons + -------------------------------------------------------- + + local function SetButtonWhite(button) + + if not button then + return + end + + + local text = button:GetFontString() + + if text then + SetWhite(text) + end + + + if button.normalText then + SetWhite(button.normalText) + end + + + if button.highlightText then + SetWhite(button.highlightText) + end + + + if button.disabledText then + SetWhite(button.disabledText) + end + + + local regions = { + button:GetRegions() + } + + + for _, region in pairs(regions) do + + if region + and region:GetObjectType() == "FontString" then + + SetWhite(region) + + end + + end + + end + + + local function SetGossipButtonsWhite() + + for i = 1, 32 do + + SetButtonWhite( + _G["GossipTitleButton" .. i] + ) + + SetButtonWhite( + _G["QuestTitleButton" .. i] + ) + + end + + end + + + -------------------------------------------------------- + -- Dynamic quest section titles + -------------------------------------------------------- + + local function SetQuestObjectivesTitleGold(frame) + + if not frame then + return + end + + + local regions = { + frame:GetRegions() + } + + + for _, region in pairs(regions) do + + if region + and region:GetObjectType() == "FontString" then + + local text = region:GetText() + + if text then + + local lower = + string.lower(text) + + + if string.find( + lower, + "quest objectives" + ) + or lower == "objectives:" + or lower == "objectives" then + + SetGold(region) + + end + + end + + end + + end + + + local children = { + frame:GetChildren() + } + + + for _, child in pairs(children) do + SetQuestObjectivesTitleGold(child) + end + + end + + + local function SetQuestRewardsTitleGold(frame) + + if not frame then + return + end + + + local regions = { + frame:GetRegions() + } + + + for _, region in pairs(regions) do + + if region + and region:GetObjectType() == "FontString" then + + local text = region:GetText() + + if text then + + local lower = + string.lower(text) + + + if lower == "rewards" + or lower == "rewards:" then + + SetGold(region) + + end + + end + + end + + end + + + local children = { + frame:GetChildren() + } + + + for _, child in pairs(children) do + SetQuestRewardsTitleGold(child) + end + + end + + + -------------------------------------------------------- + -- Quest text + -------------------------------------------------------- + + local function SetQuestTextWhite() + + SetGold(QuestTitleText) + SetGold(QuestProgressTitleText) + SetGold(QuestRewardTitleText) + SetGold(QuestProgressRequiredItemsText) + + SetWhite(QuestDescriptionText) + SetWhite(QuestProgressText) + SetWhite(QuestProgressRequiredMoneyText) + SetWhite(QuestRewardText) + SetWhite(QuestRewardRewardTitleText) + SetWhite(QuestRewardItemChooseText) + SetWhite(QuestRewardItemReceiveText) + SetWhite(QuestRewardSpellLearnText) + SetWhite(QuestDetailItemReceiveText) + SetWhite(QuestDetailSpellLearnText) + + SetWhite(GreetingText) + SetWhite(GossipGreetingText) + SetWhite(CurrentQuestsText) + SetWhite(AvailableQuestsText) + + SetWhite(QuestObjectiveText) + SetWhite(QuestObjectivesText) + SetWhite(QuestObjectiveTitleText) + SetWhite(QuestObjectivesTitleText) + + SetWhite(QuestFrameNpcNameText) + SetWhite(GossipFrameNpcNameText) + + SetGossipButtonsWhite() + + SetQuestObjectivesTitleGold(QuestFrame) + SetQuestObjectivesTitleGold(GossipFrame) + + SetQuestRewardsTitleGold(QuestFrame) + SetQuestRewardsTitleGold(GossipFrame) + + end + + + -------------------------------------------------------- + -- Parchment replacement + -- + -- This is intentionally based on the working pfUI + -- Gossip & Quest skin. + -- + -- We do NOT modify the main frame. + -------------------------------------------------------- + + local function ApplyParchment(frameName, panelName) + + local frame = + _G[frameName .. "Frame"] + + + if not frame then + return + end + + + local frameNameFull = + frame:GetName() + + + local panel = + _G[ + frameNameFull + .. panelName + .. "Panel" + ] + + + if not panel then + return + end + + + local fname = + frameNameFull + .. panelName + .. "Panel" + + + local scroll = + _G[ + frameName + .. panelName + .. "ScrollFrame" + ] + + + if not scroll then + return + end + + + ---------------------------------------------------- + -- Use the exact pfUI API. + ---------------------------------------------------- + + if pfUI.api + and pfUI.api.StripTextures then + + pfUI.api.StripTextures( + panel + ) + + end + + + ---------------------------------------------------- + -- Black background + ---------------------------------------------------- + + local bg = + scroll.dqbParchmentBackground + + + if not bg then + + bg = + scroll:CreateTexture( + nil, + "LOW" + ) + + + bg:SetAllPoints() + + scroll.dqbParchmentBackground = + bg + + end + + + bg:SetTexture( + 0, + 0, + 0, + 0.10 + ) + + + ---------------------------------------------------- + -- Blizzard parchment material textures + ---------------------------------------------------- + + local topLeft = + _G[fname .. "MaterialTopLeft"] + + local topRight = + _G[fname .. "MaterialTopRight"] + + local botLeft = + _G[fname .. "MaterialBotLeft"] + + local botRight = + _G[fname .. "MaterialBotRight"] + + + ---------------------------------------------------- + -- Top left + ---------------------------------------------------- + + if topLeft then + + topLeft.SetTexture = + function() + + bg:SetTexture( + 0, + 0, + 0, + 0.10 + ) + + end + + + topLeft.Hide = + function() + + bg:SetTexture( + 0, + 0, + 0, + 0.10 + ) + + end + + + topLeft.Show = + function() + return + end + + + topLeft:Hide() + + end + + + ---------------------------------------------------- + -- Top right + ---------------------------------------------------- + + if topRight then + + topRight.Show = + function() + return + end + + + topRight:Hide() + + end + + + ---------------------------------------------------- + -- Bottom left + ---------------------------------------------------- + + if botLeft then + + botLeft.Show = + function() + return + end + + + botLeft:Hide() + + end + + + ---------------------------------------------------- + -- Bottom right + ---------------------------------------------------- + + if botRight then + + botRight.Show = + function() + return + end + + + botRight:Hide() + + end + + end + + + -------------------------------------------------------- + -- Apply all parchment panels + -------------------------------------------------------- + + local function ApplyAllParchment() + + ApplyParchment( + "Quest", + "Greeting" + ) + + ApplyParchment( + "Quest", + "Detail" + ) + + ApplyParchment( + "Quest", + "Progress" + ) + + ApplyParchment( + "Quest", + "Reward" + ) + + ApplyParchment( + "Gossip", + "Greeting" + ) + + end + + + -------------------------------------------------------- + -- Quest reward highlight + -------------------------------------------------------- + + local QuestRewardItemHighlight + + + if QuestRewardScrollChildFrame then + + QuestRewardItemHighlight = + CreateFrame( + "Frame", + nil, + QuestRewardScrollChildFrame + ) + + + local highlight = + QuestRewardItemHighlight:CreateTexture( + nil, + "OVERLAY" + ) + + + highlight:SetTexture( + 1, + 1, + 1, + 0.20 + ) + + + highlight:SetAllPoints() + + + QuestRewardItemHighlight.bg = + highlight + + + QuestRewardItemHighlight:Hide() + + end + + + -------------------------------------------------------- + -- Quest reward updates + -------------------------------------------------------- + + if QuestFrameItems_Update then + + hooksecurefunc( + "QuestFrameItems_Update", + function() + + if QuestRewardItemHighlight then + QuestRewardItemHighlight:Hide() + end + + SetQuestTextWhite() + ApplyAllParchment() + + end + ) + + end + + + -------------------------------------------------------- + -- Quest reward item click + -------------------------------------------------------- + + if QuestRewardItem_OnClick then + + hooksecurefunc( + "QuestRewardItem_OnClick", + function() + + if this + and this.type == "choice" + and this.backdrop + and QuestRewardItemHighlight then + + QuestRewardItemHighlight:SetAllPoints( + this.backdrop + ) + + QuestRewardItemHighlight:Show() + + end + + end + ) + + end + + + -------------------------------------------------------- + -- Blizzard text color hooks + -------------------------------------------------------- + + if QuestFrame_SetTextColor then + + hooksecurefunc( + "QuestFrame_SetTextColor", + function(text) + + SetWhite(text) + + end + ) + + end + + + if QuestFrame_SetTitleTextColor then + + hooksecurefunc( + "QuestFrame_SetTitleTextColor", + function(text) + + SetGold(text) + + end + ) + + end + + + -------------------------------------------------------- + -- Quest information + -------------------------------------------------------- + + if QuestInfo_Display then + + hooksecurefunc( + "QuestInfo_Display", + function() + + SetQuestTextWhite() + ApplyAllParchment() + + end + ) + + end + + + -------------------------------------------------------- + -- Gossip updates + -------------------------------------------------------- + + if GossipFrameUpdate then + + hooksecurefunc( + "GossipFrameUpdate", + function() + + SetQuestTextWhite() + SetGossipButtonsWhite() + ApplyAllParchment() + + end + ) + + end + + + if GossipFrameAvailableQuestsUpdate then + + hooksecurefunc( + "GossipFrameAvailableQuestsUpdate", + function() + + SetGossipButtonsWhite() + + end + ) + + end + + + if GossipFrameActiveQuestsUpdate then + + hooksecurefunc( + "GossipFrameActiveQuestsUpdate", + function() + + SetGossipButtonsWhite() + + end + ) + + end + + + if GossipFrameOptionsUpdate then + + hooksecurefunc( + "GossipFrameOptionsUpdate", + function() + + SetGossipButtonsWhite() + + end + ) + + end + + + -------------------------------------------------------- + -- Quest panels + -------------------------------------------------------- + + if QuestFrameGreetingPanel_OnShow then + + hooksecurefunc( + "QuestFrameGreetingPanel_OnShow", + function() + + SetQuestTextWhite() + SetGossipButtonsWhite() + ApplyAllParchment() + + end + ) + + end + + + if QuestFrameDetailPanel_OnShow then + + hooksecurefunc( + "QuestFrameDetailPanel_OnShow", + function() + + SetQuestTextWhite() + ApplyAllParchment() + + end + ) + + end + + + if QuestFrameProgressPanel_OnShow then + + hooksecurefunc( + "QuestFrameProgressPanel_OnShow", + function() + + SetQuestTextWhite() + ApplyAllParchment() + + end + ) + + end + + + if QuestFrameRewardPanel_OnShow then + + hooksecurefunc( + "QuestFrameRewardPanel_OnShow", + function() + + SetQuestTextWhite() + + SetQuestRewardsTitleGold( + QuestRewardScrollChildFrame + ) + + SetQuestRewardsTitleGold( + QuestFrameRewardPanel + ) + + ApplyAllParchment() + + end + ) + + end + + + -------------------------------------------------------- + -- Frame OnShow hooks + -- + -- These are important because pfUI can recreate/show + -- its material textures after the dialog is opened. + -------------------------------------------------------- + + if QuestFrame then + + QuestFrame:HookScript( + "OnShow", + function() + + ApplyAllParchment() + SetQuestTextWhite() + + end + ) + + end + + + if GossipFrame then + + GossipFrame:HookScript( + "OnShow", + function() + + ApplyAllParchment() + SetQuestTextWhite() + SetGossipButtonsWhite() + + end + ) + + end + + + -------------------------------------------------------- + -- Initial application + -------------------------------------------------------- + + SetQuestTextWhite() + SetGossipButtonsWhite() + + + -------------------------------------------------------- + -- Debug + -------------------------------------------------------- + + if DQB.Debug then + + DQB:Debug( + "gossipquest module applied" + ) + + end + +end) \ No newline at end of file diff --git a/modules/itemtext.lua b/modules/itemtext.lua new file mode 100644 index 0000000..1f7c3ed --- /dev/null +++ b/modules/itemtext.lua @@ -0,0 +1,685 @@ +-- pfUI-DQB +-- modules/itemtext.lua +-- +-- DQB customization for pfUI Books / Item Text. +-- +-- The original pfUI skin remains responsible for: +-- - Main frame +-- - Frame backdrop +-- - Close button +-- - Movement +-- - General pfUI appearance +-- +-- DQB only changes: +-- - Text colors +-- - Parchment background +-- - Page controls +-- - Scrollbar presentation + + +local DQB = pfUI and pfUI.dqb + +if not DQB then + return +end + + +DQB:RegisterModule("itemtext", function() + + -------------------------------------------------------- + -- Check configuration + -------------------------------------------------------- + + if not DQB:IsModuleEnabled("itemtext") then + return + end + + + -------------------------------------------------------- + -- pfUI API + -------------------------------------------------------- + + local API = pfUI.api + + if not API then + return + end + + + local StripTextures = API.StripTextures + local CreateBackdrop = API.CreateBackdrop + local CreateBackdropShadow = API.CreateBackdropShadow + local SkinCloseButton = API.SkinCloseButton + local SkinScrollbar = API.SkinScrollbar + local SkinArrowButton = API.SkinArrowButton + + + -------------------------------------------------------- + -- Text colors + -------------------------------------------------------- + + local function SetWhite(text) + + if not text then + return + end + + text:SetTextColor( + 1, + 1, + 1, + 1 + ) + + text:SetShadowColor( + 0, + 0, + 0, + 1 + ) + + text:SetShadowOffset( + 1, + -1 + ) + + end + + + local function SetGold(text) + + if not text then + return + end + + text:SetTextColor( + 1, + 0.82, + 0, + 1 + ) + + text:SetShadowColor( + 0, + 0, + 0, + 1 + ) + + text:SetShadowOffset( + 1, + -1 + ) + + end + + + -------------------------------------------------------- + -- Apply text colors + -------------------------------------------------------- + + local function SetItemTextColors() + + SetGold( + ItemTextTitleText + ) + + SetWhite( + ItemTextPageText + ) + + SetWhite( + ItemTextCurrentPage + ) + + end + + + -------------------------------------------------------- + -- Main frame + -------------------------------------------------------- + + if not ItemTextFrame then + return + end + + + StripTextures( + ItemTextFrame + ) + + + CreateBackdrop( + ItemTextFrame, + nil, + nil, + 0.75 + ) + + + CreateBackdropShadow( + ItemTextFrame + ) + + + ItemTextFrame.backdrop:SetPoint( + "TOPLEFT", + 12, + -12 + ) + + + ItemTextFrame.backdrop:SetPoint( + "BOTTOMRIGHT", + -30, + 72 + ) + + + ItemTextFrame:SetHitRectInsets( + 12, + 30, + 12, + 72 + ) + + + if API.EnableMovable then + + API.EnableMovable( + ItemTextFrame + ) + + end + + + -------------------------------------------------------- + -- Close button + -------------------------------------------------------- + + if ItemTextCloseButton then + + SkinCloseButton( + ItemTextCloseButton, + ItemTextFrame.backdrop, + -6, + -6 + ) + + end + + + -------------------------------------------------------- + -- Text area + -------------------------------------------------------- + + if ItemTextScrollFrame then + + ItemTextScrollFrame:SetWidth( + 292 + ) + + end + + + if ItemTextPageText then + + ItemTextPageText:SetWidth( + 282 + ) + + ItemTextPageText:ClearAllPoints() + + ItemTextPageText:SetPoint( + "TOPLEFT", + 4, + -15 + ) + + end + + + if ItemTextTitleText then + + ItemTextTitleText:ClearAllPoints() + + ItemTextTitleText:SetPoint( + "TOP", + ItemTextFrame.backdrop, + "TOP", + 0, + -10 + ) + + end + + + -------------------------------------------------------- + -- Scroll frame + -------------------------------------------------------- + + if ItemTextScrollFrame then + + StripTextures( + ItemTextScrollFrame + ) + + + CreateBackdrop( + ItemTextScrollFrame, + nil, + true, + 0 + ) + + + SkinScrollbar( + ItemTextScrollFrameScrollBar + ) + + + ItemTextScrollFrame:ClearAllPoints() + + ItemTextScrollFrame:SetPoint( + "TOPRIGHT", + -66, + -46 + ) + + end + + + -------------------------------------------------------- + -- Replace parchment with black translucent background + -------------------------------------------------------- + + local bg + + + if ItemTextScrollFrame then + + bg = + ItemTextScrollFrame.dqbBackground + + + if not bg then + + bg = + ItemTextScrollFrame:CreateTexture( + nil, + "LOW" + ) + + + bg:SetAllPoints() + + + ItemTextScrollFrame.dqbBackground = + bg + + end + + + bg:SetTexture( + 0, + 0, + 0, + 0.50 + ) + + end + + + -------------------------------------------------------- + -- Disable Blizzard parchment material + -------------------------------------------------------- + + if ItemTextMaterialTopLeft then + + ItemTextMaterialTopLeft.SetTexture = + function() + + bg:SetTexture( + 0, + 0, + 0, + 0.50 + ) + + end + + + ItemTextMaterialTopLeft.Hide = + function() + + bg:SetTexture( + 0, + 0, + 0, + 0.50 + ) + + end + + + ItemTextMaterialTopLeft.Show = + function() + return + end + + + ItemTextMaterialTopLeft:Hide() + + end + + + if ItemTextMaterialTopRight then + + ItemTextMaterialTopRight.Show = + function() + return + end + + + ItemTextMaterialTopRight:Hide() + + end + + + if ItemTextMaterialBotLeft then + + ItemTextMaterialBotLeft.Show = + function() + return + end + + + ItemTextMaterialBotLeft:Hide() + + end + + + if ItemTextMaterialBotRight then + + ItemTextMaterialBotRight.Show = + function() + return + end + + + ItemTextMaterialBotRight:Hide() + + end + + + -------------------------------------------------------- + -- Current page + -------------------------------------------------------- + + if ItemTextCurrentPage + and ItemTextScrollFrame then + + ItemTextCurrentPage:ClearAllPoints() + + ItemTextCurrentPage:SetPoint( + "TOP", + ItemTextScrollFrame, + "BOTTOM", + 0, + -10 + ) + + ItemTextCurrentPage:SetFontObject( + "GameFontWhite" + ) + + end + + + -------------------------------------------------------- + -- Previous page button + -------------------------------------------------------- + + if ItemTextPrevPageButton + and ItemTextScrollFrame then + + SkinArrowButton( + ItemTextPrevPageButton, + "left", + 18 + ) + + + ItemTextPrevPageButton:ClearAllPoints() + + ItemTextPrevPageButton:SetPoint( + "TOPLEFT", + ItemTextScrollFrame, + "BOTTOMLEFT", + 0, + -6 + ) + + + ItemTextPrevPageButton.Show = + function(self) + + self:Enable() + + end + + + ItemTextPrevPageButton.Hide = + function(self) + + self:Disable() + + end + + end + + + -------------------------------------------------------- + -- Next page button + -------------------------------------------------------- + + if ItemTextNextPageButton + and ItemTextScrollFrame then + + SkinArrowButton( + ItemTextNextPageButton, + "right", + 18 + ) + + + ItemTextNextPageButton:ClearAllPoints() + + ItemTextNextPageButton:SetPoint( + "TOPRIGHT", + ItemTextScrollFrame, + "BOTTOMRIGHT", + 0, + -6 + ) + + + ItemTextNextPageButton.Show = + function(self) + + self:Enable() + + end + + + ItemTextNextPageButton.Hide = + function(self) + + self:Disable() + + end + + end + + + -------------------------------------------------------- + -- Keep scrollbar visible + -------------------------------------------------------- + + if ItemTextScrollFrame + and ItemTextScrollFrameScrollBar then + + ItemTextScrollFrame:Show() + + ItemTextScrollFrameScrollBar:Show() + + + if ItemTextScrollFrameScrollBarScrollUpButton then + + ItemTextScrollFrameScrollBarScrollUpButton:Show() + + end + + + if ItemTextScrollFrameScrollBarScrollDownButton then + + ItemTextScrollFrameScrollBarScrollDownButton:Show() + + end + + + ItemTextScrollFrame.Show = + function(self) + end + + + ItemTextScrollFrame.Hide = + function(self) + end + + + ItemTextScrollFrameScrollBar.Show = + function(self) + + if self.thumb then + self.thumb:Show() + end + + end + + + ItemTextScrollFrameScrollBar.Hide = + function(self) + + if self.thumb then + self.thumb:Hide() + end + + end + + + if ItemTextScrollFrameScrollBarScrollUpButton then + + ItemTextScrollFrameScrollBarScrollUpButton.Show = + function(self) + + if self:GetParent():GetValue() ~= 0 then + self:Enable() + end + + end + + + ItemTextScrollFrameScrollBarScrollUpButton.Hide = + function(self) + + self:Disable() + + end + + end + + + if ItemTextScrollFrameScrollBarScrollDownButton then + + ItemTextScrollFrameScrollBarScrollDownButton.Show = + function(self) + + self:Enable() + + end + + + ItemTextScrollFrameScrollBarScrollDownButton.Hide = + function(self) + + self:Disable() + + end + + end + + end + + + -------------------------------------------------------- + -- Update colors when the book opens + -------------------------------------------------------- + + ItemTextFrame:HookScript( + "OnShow", + function() + + SetItemTextColors() + + if bg then + + bg:SetTexture( + 0, + 0, + 0, + 0.50 + ) + + end + + if ItemTextMaterialTopLeft then + ItemTextMaterialTopLeft:Hide() + end + + if ItemTextMaterialTopRight then + ItemTextMaterialTopRight:Hide() + end + + if ItemTextMaterialBotLeft then + ItemTextMaterialBotLeft:Hide() + end + + if ItemTextMaterialBotRight then + ItemTextMaterialBotRight:Hide() + end + + end + ) + + + -------------------------------------------------------- + -- Initial colors + -------------------------------------------------------- + + SetItemTextColors() + + + -------------------------------------------------------- + -- Debug + -------------------------------------------------------- + + if DQB.Debug then + + DQB:Debug( + "itemtext module applied" + ) + + end + +end) \ No newline at end of file diff --git a/modules/questlog.lua b/modules/questlog.lua new file mode 100644 index 0000000..4da852d --- /dev/null +++ b/modules/questlog.lua @@ -0,0 +1,1324 @@ +------------------------------------------------------------ +-- pfUI-DQB +-- modules/questlog.lua +-- +-- DQB customization for the pfUI Quest Log. +-- +-- The original pfUI Quest Log remains responsible for: +-- - Main frame +-- - Frame backdrop +-- - Close button +-- - General pfUI appearance +-- +-- DQB changes: +-- - Quest Log layout +-- - Quest Log text colors +-- - Quest detail background +-- - Quest item appearance +-- - Quest level display +------------------------------------------------------------ + +local DQB = pfUI and pfUI.dqb + +if not DQB then + return +end + + +------------------------------------------------------------ +-- Register module +------------------------------------------------------------ + +DQB:RegisterModule("questlog", function() + + -------------------------------------------------------- + -- Check configuration + -------------------------------------------------------- + + if not DQB:IsModuleEnabled("questlog") then + return + end + + + -------------------------------------------------------- + -- Make sure pfUI is available + -------------------------------------------------------- + + if not pfUI then + return + end + + + -------------------------------------------------------- + -- pfUI API + -------------------------------------------------------- + + local API = pfUI.api + + if not API then + return + end + + + -------------------------------------------------------- + -- Local helpers + -------------------------------------------------------- + + local function SetWhite(text) + + if not text then + return + end + + text:SetTextColor( + 1, + 1, + 1, + 1 + ) + + text:SetShadowColor( + 0, + 0, + 0, + 1 + ) + + text:SetShadowOffset( + 1, + -1 + ) + + end + + + local function SetGold(text) + + if not text then + return + end + + text:SetTextColor( + 1, + 0.82, + 0, + 1 + ) + + text:SetShadowColor( + 0, + 0, + 0, + 1 + ) + + text:SetShadowOffset( + 1, + -1 + ) + + end + + + -------------------------------------------------------- + -- Quest Log text + -------------------------------------------------------- + + local function SetQuestLogTextWhite() + + ---------------------------------------------------- + -- Titles + ---------------------------------------------------- + + SetGold( + QuestLogQuestTitle + ) + + SetGold( + QuestLogDescriptionTitle + ) + + SetGold( + QuestLogRewardTitleText + ) + + + ---------------------------------------------------- + -- Main text + ---------------------------------------------------- + + SetWhite( + QuestLogObjectivesText + ) + + SetWhite( + QuestLogQuestDescription + ) + + SetWhite( + QuestLogRequiredMoneyText + ) + + SetWhite( + QuestLogItemChooseText + ) + + SetWhite( + QuestLogItemReceiveText + ) + + SetWhite( + QuestLogSpellLearnText + ) + + SetWhite( + QuestLogTimerText + ) + + + ---------------------------------------------------- + -- Objectives + ---------------------------------------------------- + + for i = 1, MAX_OBJECTIVES do + + SetWhite( + _G[ + "QuestLogObjective" .. i + ] + ) + + end + + + ---------------------------------------------------- + -- Quest reward items + ---------------------------------------------------- + + for i = 1, MAX_NUM_ITEMS do + + SetWhite( + _G[ + "QuestLogItem" + .. i + .. "Name" + ] + ) + + SetWhite( + _G[ + "QuestLogItem" + .. i + .. "Count" + ] + ) + + end + + end + + + -------------------------------------------------------- + -- Quest Log frame + -------------------------------------------------------- + + do + + ---------------------------------------------------- + -- Quest counter + ---------------------------------------------------- + + if QuestLogQuestCount then + + QuestLogQuestCount:ClearAllPoints() + + QuestLogQuestCount:SetPoint( + "TOPRIGHT", + -10, + -30 + ) + + end + + + ---------------------------------------------------- + -- Position when shown + ---------------------------------------------------- + + if QuestLog_OnShow then + + hooksecurefunc( + "QuestLog_OnShow", + function() + + QuestLogFrame:ClearAllPoints() + + QuestLogFrame:SetPoint( + "TOPLEFT", + 10, + -104 + ) + + end + ) + + end + + + ---------------------------------------------------- + -- Size + ---------------------------------------------------- + + QuestLogFrame:SetSize( + 676, + 440 + ) + + + ---------------------------------------------------- + -- Remove Blizzard background layer + ---------------------------------------------------- + + QuestLogFrame:DisableDrawLayer( + "BACKGROUND" + ) + + + ---------------------------------------------------- + -- pfUI frame styling + ---------------------------------------------------- + + API.StripTextures( + QuestLogFrame, + true + ) + + API.CreateBackdrop( + QuestLogFrame, + nil, + nil, + 0.75 + ) + + API.CreateBackdropShadow( + QuestLogFrame + ) + + + ---------------------------------------------------- + -- Keep Quest Log movable + ---------------------------------------------------- + + API.EnableMovable( + QuestLogFrame + ) + + + ---------------------------------------------------- + -- Title + ---------------------------------------------------- + + QuestLogTitleText:ClearAllPoints() + + QuestLogTitleText:SetPoint( + "TOP", + 0, + -10 + ) + + + ---------------------------------------------------- + -- Close button + ---------------------------------------------------- + + API.SkinCloseButton( + QuestLogFrameCloseButton, + QuestLogFrame, + -6, + -6 + ) + + + ---------------------------------------------------- + -- No quests message + ---------------------------------------------------- + + if QuestLogNoQuestsText then + + QuestLogNoQuestsText:ClearAllPoints() + + QuestLogNoQuestsText:SetPoint( + "TOP", + QuestLogFrame, + 0, + -100 + ) + + end + + + ---------------------------------------------------- + -- Quest level checkbox + ---------------------------------------------------- + + local QuestLogFrameLevelsCheckButton = + CreateFrame( + "CheckButton", + "QuestLogFrameLevelsCheckButton", + QuestLogFrame, + "UICheckButtonTemplate" + ) + + + if C + and C.questlog + and C.questlog.showQuestLevels then + + QuestLogFrameLevelsCheckButton:SetChecked( + C.questlog.showQuestLevels == "1" + and true + or nil + ) + + end + + + QuestLogFrameLevelsCheckButton:SetPoint( + "LEFT", + QuestLogCollapseAllButton, + "RIGHT", + 0, + 1 + ) + + + QuestLogFrameLevelsCheckButton:SetScript( + "OnClick", + function() + + if not C.questlog then + return + end + + C.questlog.showQuestLevels = + C.questlog.showQuestLevels == "1" + and "0" + or "1" + + + ------------------------------------------------ + -- Update pfQuest configuration + ------------------------------------------------ + + if pfQuest_config + and pfQuestConfig + and pfQuestConfig.UpdateConfigEntries then + + pfQuest_config["questloglevel"] = + C.questlog.showQuestLevels + + pfQuestConfig:UpdateConfigEntries() + + end + + + QuestLog_Update() + + end + ) + + + API.SkinCheckbox( + QuestLogFrameLevelsCheckButton, + 23 + ) + + + if QuestLogFrameLevelsCheckButtonText then + + QuestLogFrameLevelsCheckButtonText:SetText( + "Quest Levels" + ) + + end + + + ---------------------------------------------------- + -- Tracking button + ---------------------------------------------------- + + if QuestLogTrack then + + API.CreateBackdrop( + QuestLogTrack + ) + + QuestLogTrack:SetSize( + 8, + 8 + ) + + QuestLogTrack:ClearAllPoints() + + QuestLogTrack:SetPoint( + "RIGHT", + QuestLogQuestCount, + "LEFT", + -5, + 0 + ) + + API.StripTextures( + QuestLogTrack + ) + + if QuestLogTrackTracking then + + QuestLogTrackTracking:SetTexture( + 0.8, + 0.8, + 0.8, + 1 + ) + + end + + if QuestLogTrackTitle then + QuestLogTrackTitle:Hide() + end + + end + + + ---------------------------------------------------- + -- Abandon button + ---------------------------------------------------- + + API.SkinButton( + QuestLogFrameAbandonButton + ) + + QuestLogFrameAbandonButton:ClearAllPoints() + + QuestLogFrameAbandonButton:SetPoint( + "BOTTOMLEFT", + QuestLogFrame, + "BOTTOMLEFT", + 5, + 5 + ) + + QuestLogFrameAbandonButton:SetWidth( + 98 + ) + + + ---------------------------------------------------- + -- Push quest button + ---------------------------------------------------- + + API.SkinButton( + QuestFramePushQuestButton + ) + + QuestFramePushQuestButton:ClearAllPoints() + + QuestFramePushQuestButton:SetPoint( + "LEFT", + QuestLogFrameAbandonButton, + "RIGHT", + 5, + 0 + ) + + QuestFramePushQuestButton:SetWidth( + 98 + ) + + + ---------------------------------------------------- + -- Exit button + ---------------------------------------------------- + + API.SkinButton( + QuestFrameExitButton + ) + + QuestFrameExitButton:ClearAllPoints() + + QuestFrameExitButton:SetPoint( + "LEFT", + QuestFramePushQuestButton, + "RIGHT", + 5, + 0 + ) + + QuestFrameExitButton:SetWidth( + 99 + ) + + + ---------------------------------------------------- + -- Expand button + ---------------------------------------------------- + + local QuestLogFrameExpandButton = + CreateFrame( + "Button", + "QuestLogFrameExpandButton", + QuestLogFrame, + "UIPanelButtonTemplate" + ) + + + API.SkinArrowButton( + QuestLogFrameExpandButton, + "LEFT", + 21 + ) + + + API.SetAllPointsOffset( + QuestLogFrameExpandButton.icon, + QuestLogFrameExpandButton, + 6 + ) + + + QuestLogFrameExpandButton:SetPoint( + "LEFT", + QuestFrameExitButton, + "RIGHT", + 5, + 0 + ) + + + QuestLogFrameExpandButton:SetScript( + "OnClick", + function() + + if QuestLogDetailScrollFrame:IsShown() then + + QuestLogDetailScrollFrame:Hide() + + QuestLogDetailScrollFrame.hidden = + true + + else + + QuestLogDetailScrollFrame:Show() + + QuestLogDetailScrollFrame.hidden = + nil + + end + + end + ) + + + ---------------------------------------------------- + -- Detail panel hidden + ---------------------------------------------------- + + QuestLogDetailScrollFrame:HookScript( + "OnHide", + function() + + API.SkinArrowButton( + QuestLogFrameExpandButton, + "RIGHT", + 21 + ) + + QuestLogDetailScrollFrame:Hide() + + QuestLogFrame:SetWidth( + 340 + ) + + end + ) + + + ---------------------------------------------------- + -- Detail panel shown + ---------------------------------------------------- + + QuestLogDetailScrollFrame:HookScript( + "OnShow", + function() + + API.SkinArrowButton( + QuestLogFrameExpandButton, + "LEFT", + 21 + ) + + QuestLogDetailScrollFrame:Show() + + QuestLogFrame:SetWidth( + 676 + ) + + QuestLog_UpdateQuestDetails() + + SetQuestLogTextWhite() + + end + ) + + + ---------------------------------------------------- + -- Empty quest log + ---------------------------------------------------- + + EmptyQuestLogFrame:SetScript( + "OnShow", + function() + + if QuestLogDetailScrollFrame:IsShown() then + + QuestLogDetailScrollFrame:Hide() + + else + + QuestLogDetailScrollFrame:GetScript( + "OnHide" + )() + + end + + QuestLogFrameExpandButton:Disable() + + end + ) + + + EmptyQuestLogFrame:SetScript( + "OnHide", + function() + + QuestLogFrameExpandButton:Enable() + + end + ) + + end + + + -------------------------------------------------------- + -- Left pane + -------------------------------------------------------- + + do + + ---------------------------------------------------- + -- Quest list scrollbar + ---------------------------------------------------- + + API.StripTextures( + QuestLogListScrollFrame + ) + + API.SkinScrollbar( + QuestLogListScrollFrameScrollBar + ) + + + ---------------------------------------------------- + -- Expand / collapse area + ---------------------------------------------------- + + API.StripTextures( + QuestLogExpandButtonFrame + ) + + API.StripTextures( + QuestLogCollapseAllButton + ) + + API.SkinCollapseButton( + QuestLogCollapseAllButton, + true + ) + + + QuestLogCollapseAllButton:ClearAllPoints() + + QuestLogCollapseAllButton:SetPoint( + "BOTTOMLEFT", + QuestLogTitle1, + "TOPLEFT", + -6, + 4 + ) + + + ---------------------------------------------------- + -- Quest buttons + ---------------------------------------------------- + + for i = 1, QUESTS_DISPLAYED do + + API.SkinCollapseButton( + _G[ + "QuestLogTitle" .. i + ] + ) + + end + + + ---------------------------------------------------- + -- Left pane background + ---------------------------------------------------- + + local backdrop = + CreateFrame( + "Frame", + nil, + QuestLogFrame + ) + + + API.CreateBackdrop( + backdrop, + nil, + nil, + 0.75 + ) + + + backdrop.backdrop:SetPoint( + "TOPLEFT", + QuestLogListScrollFrame, + "TOPLEFT", + -5, + 5 + ) + + + backdrop.backdrop:SetPoint( + "BOTTOMRIGHT", + QuestLogListScrollFrame, + "BOTTOMRIGHT", + 26, + -5 + ) + + + ---------------------------------------------------- + -- First quest entry + ---------------------------------------------------- + + QuestLogTitle1:ClearAllPoints() + + QuestLogTitle1:SetPoint( + "TOPLEFT", + QuestLogListScrollFrame, + "TOPLEFT", + 0, + 0 + ) + + + ---------------------------------------------------- + -- Additional quest entries + ---------------------------------------------------- + + for i = 7, QUESTS_DISPLAYED do + + local b = + _G[ + "QuestLogTitle" .. i + ] + + + if not b then + + b = + CreateFrame( + "Button", + "QuestLogTitle" .. i, + QuestLogFrame, + "QuestLogTitleButtonTemplate" + ) + + end + + + b:SetID( + i + ) + + + b:SetPoint( + "TOPLEFT", + _G[ + "QuestLogTitle" + .. (i - 1) + ], + "BOTTOMLEFT", + 0, + 1 + ) + + + API.SkinCollapseButton( + b + ) + + end + + + ---------------------------------------------------- + -- Left pane position + ---------------------------------------------------- + + QuestLogListScrollFrame:SetPoint( + "TOPLEFT", + 10, + -54 + ) + + + QuestLogListScrollFrame:SetHeight( + 350 + ) + + + ---------------------------------------------------- + -- Quest log update + ---------------------------------------------------- + + if QuestLog_Update then + + hooksecurefunc( + "QuestLog_Update", + function() + + local numEntries = + GetNumQuestLogEntries() + + + local questIndex + local text + local level + local questTag + local isHeader + + + ------------------------------------------------ + -- Keep detail panel hidden when required + ------------------------------------------------ + + if QuestLogDetailScrollFrame.hidden then + + QuestLogDetailScrollFrame:Hide() + + end + + + ------------------------------------------------ + -- Quest list + ------------------------------------------------ + + for i = 1, QUESTS_DISPLAYED do + + local check = + _G[ + "QuestLogTitle" + .. i + .. "Check" + ] + + + local title = + _G[ + "QuestLogTitle" + .. i + ] + + + if check and title then + + check:ClearAllPoints() + + check:SetPoint( + "RIGHT", + title, + "LEFT", + 24, + 0 + ) + + end + + + if C + and C.questlog + and C.questlog.showQuestLevels == "1" then + + questIndex = + i + + FauxScrollFrame_GetOffset( + QuestLogListScrollFrame + ) + + + if questIndex <= numEntries then + + text, + level, + questTag, + isHeader = + GetQuestLogTitle( + questIndex + ) + + + if not isHeader + and title then + + title:SetText( + " " + .. "[" + .. ( + questTag + and level .. "+" + or level + ) + .. "] " + .. text + ) + + end + + end + + end + + end + + + SetQuestLogTextWhite() + + end + ) + + end + + end + + + -------------------------------------------------------- + -- Right pane + -------------------------------------------------------- + + do + + ---------------------------------------------------- + -- Remove Blizzard parchment textures + ---------------------------------------------------- + + API.StripTextures( + QuestLogDetailScrollFrame + ) + + + ---------------------------------------------------- + -- Scrollbar + ---------------------------------------------------- + + API.SkinScrollbar( + QuestLogDetailScrollFrameScrollBar + ) + + + ---------------------------------------------------- + -- Detail scroll position + ---------------------------------------------------- + + QuestLogDetailScrollFrame:ClearAllPoints() + + QuestLogDetailScrollFrame:SetPoint( + "TOPLEFT", + QuestLogListScrollFrame, + "TOPRIGHT", + 35, + 0 + ) + + + QuestLogDetailScrollFrame:SetHeight( + 376 + ) + + + QuestLogDetailScrollChildFrame:SetHeight( + 376 + ) + + + ---------------------------------------------------- + -- Black translucent background + ---------------------------------------------------- + + local bg = + QuestLogDetailScrollFrame.dqbBackground + + + if not bg then + + bg = + QuestLogDetailScrollFrame:CreateTexture( + nil, + "BACKGROUND" + ) + + + bg:SetAllPoints() + + QuestLogDetailScrollFrame.dqbBackground = + bg + + end + + + bg:SetTexture( + 0, + 0, + 0, + 0.50 + ) + + + ---------------------------------------------------- + -- pfUI border around detail area + ---------------------------------------------------- + + API.CreateBackdrop( + QuestLogDetailScrollFrame, + nil, + nil, + 0 + ) + + + QuestLogDetailScrollFrame.backdrop:SetPoint( + "TOPLEFT", + -5, + 5 + ) + + + QuestLogDetailScrollFrame.backdrop:SetPoint( + "BOTTOMRIGHT", + 26, + -5 + ) + + + ---------------------------------------------------- + -- Quest reward items + ---------------------------------------------------- + + for i = 1, MAX_NUM_ITEMS do + + local name = + "QuestLogItem" .. i + + + local item = + _G[name] + + + if item then + + local icon = + _G[ + name + .. "IconTexture" + ] + + + local count = + _G[ + name + .. "Count" + ] + + + local title = + _G[ + name + .. "Name" + ] + + + local xsize = + item:GetWidth() + - 12 + + + local ysize = + item:GetHeight() + - 12 + + + item:SetWidth( + xsize + ) + + + API.StripTextures( + item + ) + + + API.CreateBackdrop( + item, + nil, + nil, + 0.75 + ) + + + API.SetAllPointsOffset( + item.backdrop, + item, + 4 + ) + + + API.SetHighlight( + item + ) + + + ------------------------------------------------ + -- Icon + ------------------------------------------------ + + if icon then + + icon:SetSize( + ysize, + ysize + ) + + icon:ClearAllPoints() + + icon:SetPoint( + "LEFT", + 6, + 0 + ) + + icon:SetTexCoord( + 0.08, + 0.92, + 0.08, + 0.92 + ) + + icon:SetParent( + item.backdrop + ) + + icon:SetDrawLayer( + "OVERLAY" + ) + + end + + + ------------------------------------------------ + -- Count + ------------------------------------------------ + + if count then + + count:SetParent( + item.backdrop + ) + + count:SetDrawLayer( + "OVERLAY" + ) + + SetWhite( + count + ) + + end + + + ------------------------------------------------ + -- Item name + ------------------------------------------------ + + if title then + + title:SetParent( + item.backdrop + ) + + title:SetDrawLayer( + "OVERLAY" + ) + + SetWhite( + title + ) + + end + + end + + end + + + ---------------------------------------------------- + -- Quest detail update + ---------------------------------------------------- + + if QuestLog_UpdateQuestDetails then + + hooksecurefunc( + "QuestLog_UpdateQuestDetails", + function() + + SetQuestLogTextWhite() + + end + ) + + end + + end + + + -------------------------------------------------------- + -- Initial state + -------------------------------------------------------- + + SetQuestLogTextWhite() + + + -------------------------------------------------------- + -- Debug + -------------------------------------------------------- + + if DQB.Debug then + + DQB:Debug( + "questlog module applied" + ) + + end + +end) \ No newline at end of file diff --git a/pfUI-DQB.toc b/pfUI-DQB.toc new file mode 100644 index 0000000..efe76c3 --- /dev/null +++ b/pfUI-DQB.toc @@ -0,0 +1,13 @@ +## Interface: 11200 +## Title: |cff33ffccpf|cffffffffUI|cffaaaaaa [Dialog, QuestLog & Books] +## Author: jKalfis +## Notes: Quest & Gossip, Quest Log and Books visual enhancements for pfUI. +## Version: 1.0.0 +## Dependencies: pfUI + +core.lua +config.lua +gui.lua +modules\gossipquest.lua +modules\questlog.lua +modules\itemtext.lua \ No newline at end of file