Skip to content

Commit

Permalink
13.46
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Oct 26, 2023
2 parents 20d9a37 + 1e7e5a6 commit 5586ea5
Show file tree
Hide file tree
Showing 89 changed files with 1,757 additions and 1,457 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
## Version 13.46 \[ October 26th 2023 \]
* Guild Bank timeout error fixed.
* Lowered Graveyard button to prevent overlap.
* Friends game icon uncropped and Recruit summon icon skinned.
* Assist and Tank would error when setting up Custom Texts.
* Player Choice Font Color restored with parchment active.
* Widget's Font Shadows on some frames were restored.
* PVP Spec Icon and Trinket elements were updated.
* Voice Chat sliders in dropdown menu reskinned.
* Ready Dialog for Dungeons and PVP updated.
* Skinned Select your role frame (Wrath).
* Pet Target Marker Icons fixed.
* **Updated Options**
* Search bar at the top (type to search).
* Toggle Anchors renamed to Movers and moved to top.
* Reposition Window now an icon by the close button.
* Reset Anchors moved to the mover frame (in Movers).
* Debug button added to information section, which easily calls the /edebug command.
* Import and Export pages updated (Profiles > Import / Export). Thanks Eltreum for the idea!
* Module Copy moved to Profiles section (Profiles > Module Copy) and now has Select and Clear All buttons.

## Version 13.45 \[ October 13th 2023 \]
* Character tabs fixed for pet classes without pets.
* Collections added to Minimap middle-click dropdown on Wrath.
Expand Down
124 changes: 72 additions & 52 deletions ElvUI/Classic/Modules/Skins/Gossip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,74 @@ local E, L, V, P, G = unpack(ElvUI)
local S = E:GetModule('Skins')

local _G = _G
local next = next
local gsub = gsub
local select = select
local strmatch = strmatch
local gsub, next = gsub, next
local hooksecurefunc = hooksecurefunc

local function ReplaceGossipFormat(button, textFormat, text)
local newFormat, count = gsub(textFormat, '000000', 'ffffff')
if count > 0 then
button:SetFormattedText(newFormat, text)
end
end

local ReplacedGossipColor = {
local GossipTextColors = {
['000000'] = 'ffffff',
['414141'] = '7b8489',
}

local function ReplaceGossipText(button, text)
if text and text ~= '' then
local newText, count = gsub(text, ':32:32:0:0', ':32:32:0:0:64:64:5:59:5:59')
if count > 0 then
text = newText
button:SetFormattedText('%s', text)
end
local function Gossip_SetTextColor(text, r, g, b)
if r ~= 1 or g ~= 1 or b ~= 1 then
text:SetTextColor(1, 1, 1)
end
end

local function Gossip_ReplaceColor(color)
return '|cFF' .. (GossipTextColors[color] or color)
end

local function Gossip_SetFormattedText(button, textFormat, text, skip)
if skip or not text or text == '' then return end

local colorText, colorCount = gsub(textFormat, '|c[fF][fF](%x%x%x%x%x%x)', Gossip_ReplaceColor)
if colorCount > 0 then
button:SetFormattedText(colorText, text, true)
end
end

local colorStr, rawText = strmatch(text, '|c[fF][fF](%x%x%x%x%x%x)(.-)|r')
colorStr = ReplacedGossipColor[colorStr]
if colorStr and rawText then
button:SetFormattedText('|cff%s%s|r', colorStr, rawText)
local function Gossip_SetText(button, text)
if not text or text == '' then return end

local startText = text

local iconText, iconCount = gsub(text, ':32:32:0:0', ':32:32:0:0:64:64:5:59:5:59')
if iconCount > 0 then text = iconText end

local colorText, colorCount = gsub(text, '|c[fF][fF](%x%x%x%x%x%x)', Gossip_ReplaceColor)
if colorCount > 0 then text = colorText end

if startText ~= text then
button:SetFormattedText('%s', text, true)
end
end

local function ItemTextPage_SetTextColor(pageText, headerType, r, g, b)
if r ~= 1 or g ~= 1 or b ~= 1 then
pageText:SetTextColor(headerType, 1, 1, 1)
end
end

local function GreetingPanel_Update(frame)
for _, button in next, { frame.ScrollTarget:GetChildren() } do
if not button.IsSkinned then
if button.GreetingText then
button.GreetingText:SetTextColor(1, 1, 1)
hooksecurefunc(button.GreetingText, 'SetTextColor', Gossip_SetTextColor)
end

local fontString = button.GetFontString and button:GetFontString()
if fontString then
fontString:SetTextColor(1, 1, 1)
hooksecurefunc(fontString, 'SetTextColor', Gossip_SetTextColor)

Gossip_SetText(button, button:GetText())
hooksecurefunc(button, 'SetText', Gossip_SetText)
hooksecurefunc(button, 'SetFormattedText', Gossip_SetFormattedText)
end

button.IsSkinned = true
end
end
end
Expand Down Expand Up @@ -78,42 +116,24 @@ function S:GossipFrame()
S:HandleNextPrevButton(_G.ItemTextNextPageButton)
S:HandleNextPrevButton(_G.ItemTextPrevPageButton)

if not E.private.skins.parchmentRemoverEnable then
local spellTex = createParchment(GreetingPanel)
spellTex:SetInside(GreetingPanel.backdrop)
GreetingPanel.spellTex = spellTex

local itemTex = createParchment(ItemTextFrame)
itemTex:SetInside(ItemTextScrollFrame, -5)
ItemTextFrame.itemTex = itemTex
else
if E.private.skins.parchmentRemoverEnable then
_G.QuestFont:SetTextColor(1, 1, 1)
_G.ItemTextPageText:SetTextColor('P', 1, 1, 1)

hooksecurefunc(_G.ItemTextPageText, 'SetTextColor', function(pageText, headerType, r, g, b)
if r ~= 1 or g ~= 1 or b ~= 1 then
pageText:SetTextColor(headerType, 1, 1, 1)
end
end)

hooksecurefunc(GreetingPanel.ScrollBox, 'Update', function(frame)
for _, button in next, { frame.ScrollTarget:GetChildren() } do
if not button.IsSkinned then
local buttonText = select(3, button:GetRegions())
if buttonText and buttonText:IsObjectType('FontString') then
ReplaceGossipText(button, button:GetText())
hooksecurefunc(button, 'SetText', ReplaceGossipText)
hooksecurefunc(button, 'SetFormattedText', ReplaceGossipFormat)
end

button.IsSkinned = true
end
end
end)
hooksecurefunc(_G.ItemTextPageText, 'SetTextColor', ItemTextPage_SetTextColor)
hooksecurefunc(GreetingPanel.ScrollBox, 'Update', GreetingPanel_Update)

if GossipFrame.Background then
GossipFrame.Background:Hide()
end
else
local spellTex = createParchment(GreetingPanel)
spellTex:SetInside(GreetingPanel.backdrop)
GreetingPanel.spellTex = spellTex

local itemTex = createParchment(ItemTextFrame)
itemTex:SetInside(ItemTextScrollFrame, -5)
ItemTextFrame.itemTex = itemTex
end
end

Expand Down
107 changes: 1 addition & 106 deletions ElvUI/Core/Defaults/Global.lua
Original file line number Diff line number Diff line change
Expand Up @@ -142,110 +142,5 @@ G.unitframe = {
}

G.profileCopy = {
--Specific values
selected = 'Default',
movers = {},
--Modules
actionbar = {
general = true,
bar1 = true,
bar2 = true,
bar3 = true,
bar4 = true,
bar5 = true,
bar6 = true,
barPet = true,
stanceBar = true,
microbar = true,
extraActionButton = true,
cooldown = true
},
auras = {
general = true,
buffs = true,
debuffs = true,
cooldown = true
},
bags = {
general = true,
split = true,
vendorGrays = true,
bagBar = true,
cooldown = true
},
chat = {
general = true
},
cooldown = {
general = true,
fonts = true
},
databars = {
experience = true,
reputation = true,
honor = true,
azerite = true
},
datatexts = {
general = true,
panels = true
},
general = {
general = true,
minimap = true,
threat = true,
totems = true,
itemLevel = true,
altPowerBar = true
},
nameplates = {
general = true,
cooldown = true,
threat = true,
units = {
PLAYER = true,
TARGET = true,
FRIENDLY_PLAYER = true,
ENEMY_PLAYER = true,
FRIENDLY_NPC = true,
ENEMY_NPC = true
}
},
tooltip = {
general = true,
visibility = true,
healthBar = true
},
unitframe = {
general = true,
cooldown = true,
colors = {
general = true,
power = true,
reaction = true,
healPrediction = true,
classResources = true,
frameGlow = true,
debuffHighlight = true
},
units = {
player = true,
target = true,
targettarget = true,
targettargettarget = true,
focus = true,
focustarget = true,
pet = true,
pettarget = true,
boss = true,
arena = true,
party = true,
raid1 = true,
raid2 = true,
raid3 = true,
raidpet = true,
tank = true,
assist = true
}
}
selected = 'Default'
}
Loading

0 comments on commit 5586ea5

Please sign in to comment.