From 0e1f28669ac9ac718eac9354808555c88fc27411 Mon Sep 17 00:00:00 2001 From: jKalfis Date: Sat, 5 Sep 2026 12:49:21 +0100 Subject: [PATCH] Update gossipquest.lua --- modules/gossipquest.lua | 990 +++++++++++++++++++++------------------- 1 file changed, 518 insertions(+), 472 deletions(-) diff --git a/modules/gossipquest.lua b/modules/gossipquest.lua index bb72d17..bb5c7fb 100644 --- a/modules/gossipquest.lua +++ b/modules/gossipquest.lua @@ -1,4 +1,3 @@ -```lua ------------------------------------------------------------ -- pfUI-DQB -- modules/gossipquest.lua @@ -12,7 +11,6 @@ -- The original pfUI files are NOT modified. ------------------------------------------------------------ - local DQB = pfUI and pfUI.dqb if not DQB then @@ -20,55 +18,74 @@ if not DQB then end ------------------------------------------------------------- --- Register module ------------------------------------------------------------- - DQB:RegisterModule("GossipQuest", function() -------------------------------------------------------- - -- Make sure pfUI is available + -- Make sure pfUI API is available -------------------------------------------------------- - if not pfUI then + if not pfUI or not pfUI.api then return end + local API = pfUI.api + + local SkinButton = API.SkinButton + local SkinCloseButton = API.SkinCloseButton + local SkinScrollbar = API.SkinScrollbar + local StripTextures = API.StripTextures + local CreateBackdrop = API.CreateBackdrop + local SetHighlight = API.SetHighlight + local SetAllPointsOffset = API.SetAllPointsOffset + -------------------------------------------------------- -- Configuration -------------------------------------------------------- - local config = pfUI_config + local config = + pfUI_config and pfUI_config.dqb and pfUI_config.dqb.questgossip - if not config then return end - - -------------------------------------------------------- - -- Custom configuration - -------------------------------------------------------- - local custom = config.custom or {} -------------------------------------------------------- - -- Presets + -- Active styles -------------------------------------------------------- local usePfUIStyle = config.pfui_style == "1" - local fixFonts = - config.fix_fonts == "1" + local useCustomStyle = + custom.enable == "1" -------------------------------------------------------- - -- Custom options + -- pfUI opacity + -------------------------------------------------------- + + local pfuiAlpha = + tonumber(config.pfui_alpha) + + if not pfuiAlpha then + pfuiAlpha = 0.50 + end + + if pfuiAlpha < 0 then + pfuiAlpha = 0 + elseif pfuiAlpha > 1 then + pfuiAlpha = 1 + end + + + -------------------------------------------------------- + -- Custom settings -------------------------------------------------------- local removeParchment = @@ -78,7 +95,13 @@ DQB:RegisterModule("GossipQuest", function() custom.background_color or "000000" local backgroundAlpha = - tonumber(custom.background_alpha) or 0.85 + tonumber(custom.background_alpha) or 0.50 + + if backgroundAlpha < 0 then + backgroundAlpha = 0 + elseif backgroundAlpha > 1 then + backgroundAlpha = 1 + end local customFont = custom.font @@ -91,7 +114,75 @@ DQB:RegisterModule("GossipQuest", function() -------------------------------------------------------- - -- Convert hex color to RGB + -- Determine active style + -------------------------------------------------------- + + local styleEnabled = + usePfUIStyle or useCustomStyle + + local activeAlpha + local activeBackgroundColor + local activeFont + local activeTitleColor + local activeTextColor + + + if usePfUIStyle then + + activeAlpha = pfuiAlpha + + ---------------------------------------------------- + -- Use pfUI background color + ---------------------------------------------------- + + if pfUI_config + and pfUI_config.appearance + and pfUI_config.appearance.background + and pfUI_config.appearance.background.color then + + activeBackgroundColor = + pfUI_config.appearance.background.color + + else + activeBackgroundColor = "000000" + end + + activeFont = + pfUI.font_default + + activeTitleColor = + "ffd700" + + activeTextColor = + "ffffff" + + + elseif useCustomStyle then + + activeAlpha = + backgroundAlpha + + activeBackgroundColor = + backgroundColor + + activeFont = + customFont + + activeTitleColor = + titleColor + + activeTextColor = + textColor + + else + + styleEnabled = false + + end + + + -------------------------------------------------------- + -- Convert hexadecimal color -------------------------------------------------------- local function HexToRGB(hex) @@ -100,35 +191,43 @@ DQB:RegisterModule("GossipQuest", function() return 1, 1, 1 end - hex = string.gsub(hex, "#", "") + hex = + string.gsub( + hex, + "#", + "" + ) if string.len(hex) ~= 6 then return 1, 1, 1 end - local r = tonumber( - string.sub(hex, 1, 2), - 16 - ) + local r = + tonumber( + string.sub(hex, 1, 2), + 16 + ) - local g = tonumber( - string.sub(hex, 3, 4), - 16 - ) + local g = + tonumber( + string.sub(hex, 3, 4), + 16 + ) - local b = tonumber( - string.sub(hex, 5, 6), - 16 - ) + local b = + tonumber( + string.sub(hex, 5, 6), + 16 + ) if not r or not g or not b then return 1, 1, 1 end - return r / 255, + return + r / 255, g / 255, b / 255 - end @@ -137,25 +236,23 @@ DQB:RegisterModule("GossipQuest", function() -------------------------------------------------------- local titleR, - titleG, - titleB = - HexToRGB(titleColor) - + titleG, + titleB = + HexToRGB(activeTitleColor) local textR, - textG, - textB = - HexToRGB(textColor) - + textG, + textB = + HexToRGB(activeTextColor) local bgR, - bgG, - bgB = - HexToRGB(backgroundColor) + bgG, + bgB = + HexToRGB(activeBackgroundColor) -------------------------------------------------------- - -- Frames + -- Frames and panels -------------------------------------------------------- local frames = { @@ -163,11 +260,6 @@ DQB:RegisterModule("GossipQuest", function() "Gossip" } - - -------------------------------------------------------- - -- Panels - -------------------------------------------------------- - local panels = { "Greeting", "Detail", @@ -181,19 +273,14 @@ DQB:RegisterModule("GossipQuest", function() -------------------------------------------------------- local buttons = { - QuestFrameGreetingGoodbyeButton, GossipFrameGreetingGoodbyeButton, - QuestFrameDeclineButton, QuestFrameAcceptButton, - QuestFrameGoodbyeButton, QuestFrameCompleteButton, - QuestFrameCancelButton, QuestFrameCompleteQuestButton - } @@ -201,12 +288,7 @@ DQB:RegisterModule("GossipQuest", function() -- Text helpers -------------------------------------------------------- - local function SetTextColor( - text, - r, - g, - b - ) + local function SetTextColor(text, r, g, b) if not text then return @@ -230,14 +312,9 @@ DQB:RegisterModule("GossipQuest", function() 1, -1 ) - end - -------------------------------------------------------- - -- White text - -------------------------------------------------------- - local function SetWhite(text) SetTextColor( @@ -246,14 +323,9 @@ DQB:RegisterModule("GossipQuest", function() textG, textB ) - end - -------------------------------------------------------- - -- Gold/title text - -------------------------------------------------------- - local function SetGold(text) SetTextColor( @@ -262,12 +334,11 @@ DQB:RegisterModule("GossipQuest", function() titleG, titleB ) - end -------------------------------------------------------- - -- Apply configured font + -- Font -------------------------------------------------------- local function SetFont(text) @@ -276,40 +347,35 @@ DQB:RegisterModule("GossipQuest", function() return end - if not customFont - or customFont == "" then - + if not activeFont + or activeFont == "" then return end - local currentSize - - if text.GetFont then - - local font, - size, - flags = - text:GetFont() - - currentSize = size - - if not currentSize then - currentSize = 12 - end - - text:SetFont( - customFont, - currentSize, - flags or "" - ) - + if not text.GetFont + or not text.SetFont then + return end + local font, + size, + flags = + text:GetFont() + + if not size then + size = 12 + end + + text:SetFont( + activeFont, + size, + flags or "" + ) end -------------------------------------------------------- - -- Apply font + text color + -- Configured text -------------------------------------------------------- local function SetConfiguredText(text) @@ -319,9 +385,7 @@ DQB:RegisterModule("GossipQuest", function() end SetWhite(text) - SetFont(text) - end @@ -335,50 +399,35 @@ DQB:RegisterModule("GossipQuest", function() return end - local text = button:GetFontString() - if text then - SetConfiguredText(text) - end - if button.normalText then - SetConfiguredText( button.normalText ) - end - if button.highlightText then - SetConfiguredText( button.highlightText ) - end - if button.disabledText then - SetConfiguredText( button.disabledText ) - end - local regions = { button:GetRegions() } - for _, region in pairs(regions) do if region @@ -388,14 +437,12 @@ DQB:RegisterModule("GossipQuest", function() SetConfiguredText(region) end - end - end -------------------------------------------------------- - -- Gossip / Quest buttons + -- Gossip / Quest option buttons -------------------------------------------------------- local function SetGossipButtons() @@ -411,12 +458,11 @@ DQB:RegisterModule("GossipQuest", function() ) end - end -------------------------------------------------------- - -- Detect "Objectives" title + -- Quest Objectives title -------------------------------------------------------- local function SetObjectivesTitle(frame) @@ -425,12 +471,10 @@ DQB:RegisterModule("GossipQuest", function() return end - local regions = { frame:GetRegions() } - for _, region in pairs(regions) do if region @@ -440,13 +484,11 @@ DQB:RegisterModule("GossipQuest", function() local text = region:GetText() - if text then local lower = string.lower(text) - if string.find( lower, "quest objectives" @@ -455,36 +497,25 @@ DQB:RegisterModule("GossipQuest", function() or lower == "objectives" then SetGold(region) - - if fixFonts then - SetFont(region) - end + SetFont(region) end - end - end - end - local children = { frame:GetChildren() } - for _, child in pairs(children) do - SetObjectivesTitle(child) - end - end -------------------------------------------------------- - -- Detect "Rewards" title + -- Rewards title -------------------------------------------------------- local function SetRewardsTitle(frame) @@ -493,12 +524,10 @@ DQB:RegisterModule("GossipQuest", function() return end - local regions = { frame:GetRegions() } - for _, region in pairs(regions) do if region @@ -508,60 +537,61 @@ DQB:RegisterModule("GossipQuest", function() local text = region:GetText() - if text then local lower = string.lower(text) - if lower == "rewards" or lower == "rewards:" then SetGold(region) - - if fixFonts then - SetFont(region) - end + SetFont(region) end - end - end - end - local children = { frame:GetChildren() } - for _, child in pairs(children) do - SetRewardsTitle(child) - end - end -------------------------------------------------------- - -- Quest text + -- Apply quest / gossip text -------------------------------------------------------- local function SetQuestText() + if not styleEnabled then + return + end + ---------------------------------------------------- -- Titles ---------------------------------------------------- - SetGold(QuestTitleText) - SetGold(QuestProgressTitleText) - SetGold(QuestRewardTitleText) + SetGold( + QuestTitleText + ) - SetGold(QuestProgressRequiredItemsText) + SetGold( + QuestProgressTitleText + ) + + SetGold( + QuestRewardTitleText + ) + + SetGold( + QuestProgressRequiredItemsText + ) ---------------------------------------------------- @@ -640,11 +670,6 @@ DQB:RegisterModule("GossipQuest", function() QuestObjectivesTitleText ) - - ---------------------------------------------------- - -- NPC names - ---------------------------------------------------- - SetConfiguredText( QuestFrameNpcNameText ) @@ -655,14 +680,14 @@ DQB:RegisterModule("GossipQuest", function() ---------------------------------------------------- - -- Gossip buttons + -- Gossip / Quest buttons ---------------------------------------------------- SetGossipButtons() ---------------------------------------------------- - -- Special titles + -- Dynamic titles ---------------------------------------------------- SetObjectivesTitle( @@ -680,24 +705,40 @@ DQB:RegisterModule("GossipQuest", function() SetRewardsTitle( GossipFrame ) - end -------------------------------------------------------- - -- Skin buttons + -- Stop if no style is selected + -------------------------------------------------------- + + if not styleEnabled then + + if DQB.Debug then + DQB:Debug( + "GossipQuest disabled: no style selected" + ) + end + + return + end + + + -------------------------------------------------------- + -- pfUI button skin -------------------------------------------------------- if usePfUIStyle then for _, button in pairs(buttons) do - if button then + if button + and SkinButton then + SkinButton(button) + end - end - end @@ -711,11 +752,6 @@ DQB:RegisterModule("GossipQuest", function() if usePfUIStyle and QuestRewardScrollChildFrame then - if QuestRewardItemHighlight then - QuestRewardItemHighlight:Hide() - end - - if _G["QuestRewardItemHighlight"] then StripTextures( @@ -724,7 +760,6 @@ DQB:RegisterModule("GossipQuest", function() end - QuestRewardItemHighlight = CreateFrame( "Frame", @@ -732,14 +767,12 @@ DQB:RegisterModule("GossipQuest", function() QuestRewardScrollChildFrame ) - local bg = QuestRewardItemHighlight:CreateTexture( nil, "OVERLAY" ) - bg:SetTexture( 1, 1, @@ -747,21 +780,17 @@ DQB:RegisterModule("GossipQuest", function() 0.2 ) - bg:SetAllPoints() - QuestRewardItemHighlight.bg = bg - QuestRewardItemHighlight:Hide() - end -------------------------------------------------------- - -- Quest update hook + -- Quest reward update -------------------------------------------------------- if QuestRewardItemHighlight then @@ -787,12 +816,11 @@ DQB:RegisterModule("GossipQuest", function() end ) - end -------------------------------------------------------- - -- Quest reward click + -- Quest reward item selection -------------------------------------------------------- if QuestRewardItemHighlight then @@ -802,28 +830,23 @@ DQB:RegisterModule("GossipQuest", function() function() if this - and this.type == "choice" then + and this.type == "choice" + and this.backdrop then - if this.backdrop then + QuestRewardItemHighlight:SetAllPoints( + this.backdrop + ) - QuestRewardItemHighlight:SetAllPoints( - this.backdrop - ) - - QuestRewardItemHighlight:Show() - - end + QuestRewardItemHighlight:Show() end - end ) - end -------------------------------------------------------- - -- Blizzard quest color hooks + -- Quest text color hooks -------------------------------------------------------- if QuestFrame_SetTextColor then @@ -836,26 +859,29 @@ DQB:RegisterModule("GossipQuest", function() end ) - end + -------------------------------------------------------- + -- Quest title color hooks + -------------------------------------------------------- + if QuestFrame_SetTitleTextColor then hooksecurefunc( "QuestFrame_SetTitleTextColor", function(text) - SetConfiguredText(text) + SetGold(text) + SetFont(text) end ) - end -------------------------------------------------------- - -- Quest information update + -- Quest info -------------------------------------------------------- if QuestInfo_Display then @@ -868,12 +894,11 @@ DQB:RegisterModule("GossipQuest", function() end ) - end -------------------------------------------------------- - -- Gossip updates + -- Gossip update -------------------------------------------------------- if GossipFrameUpdate then @@ -887,10 +912,13 @@ DQB:RegisterModule("GossipQuest", function() end ) - end + -------------------------------------------------------- + -- Gossip available quests + -------------------------------------------------------- + if GossipFrameAvailableQuestsUpdate then hooksecurefunc( @@ -901,10 +929,13 @@ DQB:RegisterModule("GossipQuest", function() end ) - end + -------------------------------------------------------- + -- Gossip active quests + -------------------------------------------------------- + if GossipFrameActiveQuestsUpdate then hooksecurefunc( @@ -915,10 +946,13 @@ DQB:RegisterModule("GossipQuest", function() end ) - end + -------------------------------------------------------- + -- Gossip options + -------------------------------------------------------- + if GossipFrameOptionsUpdate then hooksecurefunc( @@ -929,12 +963,11 @@ DQB:RegisterModule("GossipQuest", function() end ) - end -------------------------------------------------------- - -- Quest panel hooks + -- Greeting panel -------------------------------------------------------- if QuestFrameGreetingPanel_OnShow then @@ -948,10 +981,13 @@ DQB:RegisterModule("GossipQuest", function() end ) - end + -------------------------------------------------------- + -- Detail panel + -------------------------------------------------------- + if QuestFrameDetailPanel_OnShow then hooksecurefunc( @@ -962,10 +998,13 @@ DQB:RegisterModule("GossipQuest", function() end ) - end + -------------------------------------------------------- + -- Progress panel + -------------------------------------------------------- + if QuestFrameProgressPanel_OnShow then hooksecurefunc( @@ -976,10 +1015,13 @@ DQB:RegisterModule("GossipQuest", function() end ) - end + -------------------------------------------------------- + -- Reward panel + -------------------------------------------------------- + if QuestFrameRewardPanel_OnShow then hooksecurefunc( @@ -998,22 +1040,19 @@ DQB:RegisterModule("GossipQuest", function() end ) - end -------------------------------------------------------- - -- Quest item frames + -- pfUI item frames -------------------------------------------------------- if usePfUIStyle then for _, baseName in pairs({ - "QuestProgressItem", "QuestDetailItem", "QuestRewardItem" - }) do for i = 1, 6 do @@ -1021,7 +1060,6 @@ DQB:RegisterModule("GossipQuest", function() local name = baseName .. i - local item = _G[name] @@ -1047,10 +1085,13 @@ DQB:RegisterModule("GossipQuest", function() item:GetHeight() - 12 - item:SetWidth(xsize) + item:SetWidth( + xsize + ) - - StripTextures(item) + StripTextures( + item + ) CreateBackdrop( @@ -1068,23 +1109,27 @@ DQB:RegisterModule("GossipQuest", function() ) - SetHighlight(item) + SetHighlight( + item + ) - icon:SetWidth(ysize) - icon:SetHeight(ysize) + icon:SetWidth( + ysize + ) + icon:SetHeight( + ysize + ) icon:ClearAllPoints() - icon:SetPoint( "LEFT", 6, 0 ) - icon:SetTexCoord( 0.08, 0.92, @@ -1092,12 +1137,10 @@ DQB:RegisterModule("GossipQuest", function() 0.92 ) - icon:SetParent( item.backdrop ) - icon:SetDrawLayer( "OVERLAY" ) @@ -1107,7 +1150,6 @@ DQB:RegisterModule("GossipQuest", function() item.backdrop ) - count:SetDrawLayer( "OVERLAY" ) @@ -1117,317 +1159,322 @@ DQB:RegisterModule("GossipQuest", function() item.backdrop ) - title:SetDrawLayer( "OVERLAY" ) - SetConfiguredText(title) + SetConfiguredText( + title + ) end - end - end - end -------------------------------------------------------- - -- Frame styling + -- Remove Blizzard parchment textures + -- + -- This is ALWAYS done for pfUI Style. -------------------------------------------------------- - if usePfUIStyle then + local function RemoveParchment(panel) - for _, frameName in pairs(frames) do + if not panel then + return + end - local frame = - _G[frameName .. "Frame"] + local panelName = + panel:GetName() + + if not panelName then + return + end - if frame then - - local NPCName = - _G[ - frame:GetName() - .. "NpcNameText" - ] + local materialNames = { + panelName .. "MaterialTopLeft", + panelName .. "MaterialTopRight", + panelName .. "MaterialBotLeft", + panelName .. "MaterialBotRight" + } - ------------------------------------------------ - -- Main frame - ------------------------------------------------ + for _, name in pairs(materialNames) do - CreateBackdrop( - frame, - nil, - nil, - 0.75 + local texture = + _G[name] + + if texture then + texture:Hide() + end + end + end + + + -------------------------------------------------------- + -- Create background inside panel + -- + -- IMPORTANT: + -- We do NOT create a backdrop around QuestFrame or + -- GossipFrame. The original Blizzard frame geometry + -- remains untouched. + -------------------------------------------------------- + + local function ApplyPanelBackground( + panel, + alpha + ) + + if not panel then + return + end + + + if panel.dqbBackground then + + panel.dqbBackground:SetTexture( + bgR, + bgG, + bgB, + alpha + ) + + panel.dqbBackground:Show() + + return + end + + + local bg = + panel:CreateTexture( + nil, + "BACKGROUND" + ) + + bg:SetAllPoints( + panel + ) + + bg:SetTexture( + bgR, + bgG, + bgB, + alpha + ) + + panel.dqbBackground = + bg + end + + + -------------------------------------------------------- + -- Apply visual styling + -------------------------------------------------------- + + for _, frameName in pairs(frames) do + + local frame = + _G[frameName .. "Frame"] + + + if frame then + + ------------------------------------------------ + -- IMPORTANT: + -- No CreateBackdrop(frame) + -- No CreateBackdropShadow(frame) + -- + -- The original frame geometry stays intact. + ------------------------------------------------ + + + ------------------------------------------------ + -- Close button + ------------------------------------------------ + + local closeButton = + _G[ + frame:GetName() + .. "CloseButton" + ] + + if closeButton + and SkinCloseButton then + + -- Do not pass the parent frame. + -- This keeps Blizzard's original position. + + SkinCloseButton( + closeButton ) - - CreateBackdropShadow(frame) + end - frame.backdrop:SetPoint( - "TOPLEFT", - 12, - -18 + ------------------------------------------------ + -- Portrait + ------------------------------------------------ + + local portrait = + _G[ + frame:GetName() + .. "Portrait" + ] + + if portrait then + portrait:Hide() + end + + + ------------------------------------------------ + -- NPC name + ------------------------------------------------ + + local NPCName = + _G[ + frame:GetName() + .. "NpcNameText" + ] + + if NPCName then + + SetConfiguredText( + NPCName ) - - frame.backdrop:SetPoint( - "BOTTOMRIGHT", - -28, - 66 - ) + end - frame:SetHitRectInsets( - 12, - 28, - 18, - 66 - ) - - - EnableMovable(frame) + ------------------------------------------------ + -- Panels + ------------------------------------------------ + for _, panelName in pairs(panels) do ------------------------------------------------ - -- Close button + -- Gossip only uses Greeting ------------------------------------------------ - local closeButton = - _G[ - frame:GetName() - .. "CloseButton" - ] + if frameName == "Gossip" + and panelName ~= "Greeting" then - - if closeButton then - - SkinCloseButton( - closeButton, - frame.backdrop, - -6, - -6 - ) + break end - ------------------------------------------------ - -- Portrait - ------------------------------------------------ - - local portrait = - _G[ - frame:GetName() - .. "Portrait" - ] + local fname = + frame:GetName() + .. panelName + .. "Panel" - if portrait then - portrait:Hide() - end + local panel = + _G[fname] - ------------------------------------------------ - -- NPC name - ------------------------------------------------ + if panel then - if NPCName then + ------------------------------------------------ + -- Remove Blizzard panel textures + ------------------------------------------------ - NPCName:ClearAllPoints() - - - NPCName:SetPoint( - "TOP", - frame.backdrop, - "TOP", - 0, - -10 + StripTextures( + panel ) - SetConfiguredText( - NPCName - ) + ------------------------------------------------ + -- pfUI style + ------------------------------------------------ - end + if usePfUIStyle then + + -- pfUI Style ALWAYS removes parchment. + + RemoveParchment( + panel + ) - ------------------------------------------------ - -- Panels - ------------------------------------------------ + -- Background is applied directly + -- inside the original panel. - for _, panelName in pairs(panels) do + ApplyPanelBackground( + panel, + activeAlpha + ) - if frameName == "Gossip" - and panelName ~= "Greeting" then + elseif useCustomStyle then - break + ------------------------------------------------ + -- Custom Style + -- + -- Keep existing Custom behavior. + ------------------------------------------------ - end + if removeParchment then - - local fname = - frame:GetName() - .. panelName - .. "Panel" - - - local panel = - _G[fname] - - - if panel then - - StripTextures(panel) - - - local scroll = - _G[ - frameName - .. panelName - .. "ScrollFrame" - ] - - - if scroll then - - scroll:SetHeight(330) - - - local scrollbar = - _G[ - scroll:GetName() - .. "ScrollBar" - ] - - - if scrollbar then - - SkinScrollbar( - scrollbar - ) - - end - - - CreateBackdrop( - scroll, - nil, - true, - 0 + RemoveParchment( + panel ) - - ------------------------------------------------ - -- Custom background - ------------------------------------------------ - - local bg = - scroll:CreateTexture( - nil, - "LOW" - ) - - - bg:SetAllPoints() - - - if removeParchment then - - bg:SetTexture( - bgR, - bgG, - bgB, - backgroundAlpha - ) - - else - - bg:SetTexture( - 0, - 0, - 0, - backgroundAlpha - ) - - end - - - scroll.dqbBackground = - bg - - - ------------------------------------------------ - -- Remove Blizzard parchment pieces - ------------------------------------------------ - - local topLeft = - _G[ - fname - .. "MaterialTopLeft" - ] - - local topRight = - _G[ - fname - .. "MaterialTopRight" - ] - - local botLeft = - _G[ - fname - .. "MaterialBotLeft" - ] - - local botRight = - _G[ - fname - .. "MaterialBotRight" - ] - - - if removeParchment then - - if topLeft then - topLeft:Hide() - end - - if topRight then - topRight:Hide() - end - - if botLeft then - botLeft:Hide() - end - - if botRight then - botRight:Hide() - end - - end - end + + ApplyPanelBackground( + panel, + activeAlpha + ) end + + ------------------------------------------------ + -- Scroll frame + ------------------------------------------------ + + local scroll = + _G[ + frameName + .. panelName + .. "ScrollFrame" + ] + + + if scroll then + + scroll:SetHeight( + 330 + ) + + + local scrollbar = + _G[ + scroll:GetName() + .. "ScrollBar" + ] + + + if scrollbar + and SkinScrollbar then + + SkinScrollbar( + scrollbar + ) + + end + end end - end - end - end -------------------------------------------------------- - -- Initial text pass + -- Final text pass -------------------------------------------------------- SetQuestText() @@ -1446,4 +1493,3 @@ DQB:RegisterModule("GossipQuest", function() end end) -```