Commit 3b6bfede authored by Simpy's avatar Simpy 🐹

11.52

parents 487725da 7d2b6e1e
...@@ -707,7 +707,6 @@ function E:Config_CreateButton(info, frame, unskinned, ...) ...@@ -707,7 +707,6 @@ function E:Config_CreateButton(info, frame, unskinned, ...)
btn:HookScript('OnLeave', Config_ButtonOnLeave) btn:HookScript('OnLeave', Config_ButtonOnLeave)
btn:SetScript('OnClick', info.func) btn:SetScript('OnClick', info.func)
btn:SetWidth(btn:GetTextWidth() + 40) btn:SetWidth(btn:GetTextWidth() + 40)
btn.ignoreBorderColors = true
return btn return btn
end end
......
...@@ -4,7 +4,7 @@ local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, Profi ...@@ -4,7 +4,7 @@ local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, Profi
local _G = _G local _G = _G
local tonumber, pairs, ipairs, error, unpack, select, tostring = tonumber, pairs, ipairs, error, unpack, select, tostring local tonumber, pairs, ipairs, error, unpack, select, tostring = tonumber, pairs, ipairs, error, unpack, select, tostring
local strjoin, twipe, tinsert, tremove, tContains = strjoin, wipe, tinsert, tremove, tContains local strsplit, strjoin, twipe, tinsert, tremove, tContains = strsplit, strjoin, wipe, tinsert, tremove, tContains
local format, find, strrep, strlen, sub, gsub = format, strfind, strrep, strlen, strsub, gsub local format, find, strrep, strlen, sub, gsub = format, strfind, strrep, strlen, strsub, gsub
local assert, type, pcall, xpcall, next, print = assert, type, pcall, xpcall, next, print local assert, type, pcall, xpcall, next, print = assert, type, pcall, xpcall, next, print
local rawget, rawset, setmetatable = rawget, rawset, setmetatable local rawget, rawset, setmetatable = rawget, rawset, setmetatable
...@@ -480,7 +480,7 @@ end ...@@ -480,7 +480,7 @@ end
function E:UpdateFontTemplates() function E:UpdateFontTemplates()
for text in pairs(E.texts) do for text in pairs(E.texts) do
if text then if text then
text:FontTemplate(text.font, text.fontSize, text.fontStyle) text:FontTemplate(text.font, text.fontSize, text.fontStyle, true)
else else
E.texts[text] = nil E.texts[text] = nil
end end
...@@ -1710,7 +1710,11 @@ function E:Initialize() ...@@ -1710,7 +1710,11 @@ function E:Initialize()
twipe(E.global) twipe(E.global)
twipe(E.private) twipe(E.private)
E.myguid = UnitGUID('player') local playerGUID = UnitGUID('player')
local _, serverID = strsplit('-', playerGUID)
E.serverID = tonumber(serverID)
E.myguid = playerGUID
E.data = E.Libs.AceDB:New('ElvDB', E.DF, true) E.data = E.Libs.AceDB:New('ElvDB', E.DF, true)
E.data.RegisterCallback(E, 'OnProfileChanged', 'StaggeredUpdateAll') E.data.RegisterCallback(E, 'OnProfileChanged', 'StaggeredUpdateAll')
E.data.RegisterCallback(E, 'OnProfileCopied', 'StaggeredUpdateAll') E.data.RegisterCallback(E, 'OnProfileCopied', 'StaggeredUpdateAll')
......
...@@ -27,11 +27,10 @@ local Uploads = {} ...@@ -27,11 +27,10 @@ local Uploads = {}
function D:Initialize() function D:Initialize()
self.Initialized = true self.Initialized = true
self:RegisterComm(REQUEST_PREFIX)
self:RegisterEvent('CHAT_MSG_ADDON') D:UpdateSettings()
self.statusBar = CreateFrame('StatusBar', 'ElvUI_Download', E.UIParent) self.statusBar = CreateFrame('StatusBar', 'ElvUI_Download', E.UIParent)
E:RegisterStatusBar(self.statusBar)
self.statusBar:CreateBackdrop() self.statusBar:CreateBackdrop()
self.statusBar:SetStatusBarTexture(E.media.normTex) self.statusBar:SetStatusBarTexture(E.media.normTex)
self.statusBar:SetStatusBarColor(0.95, 0.15, 0.15) self.statusBar:SetStatusBarColor(0.95, 0.15, 0.15)
...@@ -40,6 +39,17 @@ function D:Initialize() ...@@ -40,6 +39,17 @@ function D:Initialize()
self.statusBar.text:FontTemplate() self.statusBar.text:FontTemplate()
self.statusBar.text:SetPoint('CENTER') self.statusBar.text:SetPoint('CENTER')
self.statusBar:Hide() self.statusBar:Hide()
E:RegisterStatusBar(self.statusBar)
end
function D:UpdateSettings()
if E.global.general.allowDistributor then
self:RegisterComm(REQUEST_PREFIX)
self:RegisterEvent('CHAT_MSG_ADDON')
else
self:UnregisterComm(REQUEST_PREFIX)
self:UnregisterEvent('CHAT_MSG_ADDON')
end
end end
-- Used to start uploads -- Used to start uploads
...@@ -123,7 +133,7 @@ function D:OnCommReceived(prefix, msg, dist, sender) ...@@ -123,7 +133,7 @@ function D:OnCommReceived(prefix, msg, dist, sender)
end, end,
button1 = ACCEPT, button1 = ACCEPT,
button2 = CANCEL, button2 = CANCEL,
timeout = 32, timeout = 30,
whileDead = 1, whileDead = 1,
hideOnEscape = 1, hideOnEscape = 1,
} }
...@@ -250,7 +260,8 @@ local blacklistedKeys = { ...@@ -250,7 +260,8 @@ local blacklistedKeys = {
version = true, version = true,
eyefinity = true, eyefinity = true,
disableTutorialButtons = true, disableTutorialButtons = true,
showMissingTalentAlert = true showMissingTalentAlert = true,
allowDistributor = true
}, },
chat = { chat = {
classColorMentionExcludedNames = true classColorMentionExcludedNames = true
...@@ -556,7 +567,7 @@ E.PopupDialogs.DISTRIBUTOR_WAITING = { ...@@ -556,7 +567,7 @@ E.PopupDialogs.DISTRIBUTOR_WAITING = {
text = L["Profile request sent. Waiting for response from player."], text = L["Profile request sent. Waiting for response from player."],
whileDead = 1, whileDead = 1,
hideOnEscape = 1, hideOnEscape = 1,
timeout = 35, timeout = 20,
} }
E.PopupDialogs.DISTRIBUTOR_REQUEST_DENIED = { E.PopupDialogs.DISTRIBUTOR_REQUEST_DENIED = {
......
...@@ -2,6 +2,7 @@ local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, Private ...@@ -2,6 +2,7 @@ local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, Private
local LSM = E.Libs.LSM local LSM = E.Libs.LSM
local _G = _G local _G = _G
local strmatch = strmatch
local function SetFont(obj, font, size, style, sr, sg, sb, sa, sox, soy, r, g, b) local function SetFont(obj, font, size, style, sr, sg, sb, sa, sox, soy, r, g, b)
obj:SetFont(font, size, style) obj:SetFont(font, size, style)
...@@ -11,49 +12,31 @@ local function SetFont(obj, font, size, style, sr, sg, sb, sa, sox, soy, r, g, b ...@@ -11,49 +12,31 @@ local function SetFont(obj, font, size, style, sr, sg, sb, sa, sox, soy, r, g, b
elseif r then obj:SetAlpha(r) end elseif r then obj:SetAlpha(r) end
end end
local chatFontHeights = {6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}
function E:UpdateBlizzardFonts() function E:UpdateBlizzardFonts()
local NORMAL = E.media.normFont local NORMAL = E.media.normFont
local NUMBER = E.media.normFont local NUMBER = E.media.normFont
local COMBAT = LSM:Fetch('font', E.private.general.dmgfont) local COMBAT = LSM:Fetch('font', E.private.general.dmgfont)
local NAMEFONT = LSM:Fetch('font', E.private.general.namefont) local NAMEFONT = LSM:Fetch('font', E.private.general.namefont)
local BUBBLE = LSM:Fetch('font', E.private.general.chatBubbleFont) local BUBBLE = LSM:Fetch('font', E.private.general.chatBubbleFont)
local SHADOWCOLOR = _G.SHADOWCOLOR
local NORMALOFFSET = _G.NORMALOFFSET
local BIGOFFSET = _G.BIGOFFSET
local MONOCHROME = ''
_G.CHAT_FONT_HEIGHTS = {6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20} local MONOCHROME = strmatch(E.db.general.fontStyle, 'MONOCHROME') and 'MONOCHROME' or ''
if E.db.general.font == 'Homespun' then
MONOCHROME = 'MONOCHROME'
end
if E.eyefinity then
-- set an invisible font for xp, honor kill, etc
COMBAT = E.Media.Fonts.Invisible
end
if E.private.general.replaceNameFont then
_G.UNIT_NAME_FONT = NAMEFONT
end
if E.private.general.replaceCombatFont then
_G.DAMAGE_TEXT_FONT = COMBAT
-- No matter what we do here with the Combat Font, the player Combat Font will always looks like shit, so just dont touch it.
--SetFont(_G.CombatTextFont, COMBAT, 200, 'OUTLINE') -- number here just increase the font quality.
end
_G.CHAT_FONT_HEIGHTS = chatFontHeights
if E.eyefinity then COMBAT = E.Media.Fonts.Invisible end -- set an invisible font for xp, honor kill, etc
if E.private.general.replaceNameFont then _G.UNIT_NAME_FONT = NAMEFONT end
if E.private.general.replaceCombatFont then _G.DAMAGE_TEXT_FONT = COMBAT end
if E.private.general.replaceBlizzFonts then if E.private.general.replaceBlizzFonts then
--_G.NAMEPLATE_FONT = NAMEFONT --_G.NAMEPLATE_FONT = NAMEFONT
_G.STANDARD_TEXT_FONT = NORMAL _G.STANDARD_TEXT_FONT = NORMAL
--SetFont(_G.NumberFontNormal, LSM:Fetch('font', 'Homespun'), 10, 'MONOCHROMEOUTLINE', 1, 1, 1, 0, 0, 0) --SetFont(_G.NumberFontNormal, LSM:Fetch('font', 'Homespun'), 10, 'MONOCHROMEOUTLINE', 1, 1, 1, 0, 0, 0)
--SetFont(_G.GameFontNormalSmall, NORMAL, 12, nil, nil, nil, nil, nil, nil, nil, unpack(E.media.rgbvaluecolor)) --SetFont(_G.GameFontNormalSmall, NORMAL, 12, nil, nil, nil, nil, nil, nil, nil, unpack(E.media.rgbvaluecolor))
SetFont(_G.AchievementFont_Small, NORMAL, E.db.general.fontSize) -- Achiev dates SetFont(_G.AchievementFont_Small, NORMAL, E.db.general.fontSize) -- Achiev dates
SetFont(_G.BossEmoteNormalHuge, NORMAL, 24) -- Talent Title SetFont(_G.BossEmoteNormalHuge, NORMAL, 24) -- Talent Title
SetFont(_G.ChatBubbleFont, BUBBLE, E.private.general.chatBubbleFontSize, E.private.general.chatBubbleFontOutline) SetFont(_G.ChatBubbleFont, BUBBLE, E.private.general.chatBubbleFontSize, E.private.general.chatBubbleFontOutline)
SetFont(_G.CoreAbilityFont, NORMAL, 26) -- Core abilities(title) SetFont(_G.CoreAbilityFont, NORMAL, 26) -- Core abilities(title)
SetFont(_G.DestinyFontHuge, NORMAL, 32, nil, SHADOWCOLOR, BIGOFFSET) -- Garrison Mission Report SetFont(_G.DestinyFontHuge, NORMAL, 32) -- Garrison Mission Report
SetFont(_G.DestinyFontMed, NORMAL, 14) -- Added in 7.3.5 used for ? SetFont(_G.DestinyFontMed, NORMAL, 14) -- Added in 7.3.5 used for ?
SetFont(_G.Fancy12Font, NORMAL, 12) -- Added in 7.3.5 used for ? SetFont(_G.Fancy12Font, NORMAL, 12) -- Added in 7.3.5 used for ?
SetFont(_G.Fancy14Font, NORMAL, 14) -- Added in 7.3.5 used for ? SetFont(_G.Fancy14Font, NORMAL, 14) -- Added in 7.3.5 used for ?
...@@ -73,28 +56,28 @@ function E:UpdateBlizzardFonts() ...@@ -73,28 +56,28 @@ function E:UpdateBlizzardFonts()
SetFont(_G.Game42Font, NORMAL, 42) -- PVP Stuff SetFont(_G.Game42Font, NORMAL, 42) -- PVP Stuff
SetFont(_G.Game46Font, NORMAL, 46) -- Added in 7.3.5 used for ? SetFont(_G.Game46Font, NORMAL, 46) -- Added in 7.3.5 used for ?
SetFont(_G.Game48Font, NORMAL, 48) SetFont(_G.Game48Font, NORMAL, 48)
SetFont(_G.Game48FontShadow, NORMAL, 48, nil, SHADOWCOLOR, BIGOFFSET) SetFont(_G.Game48FontShadow, NORMAL, 48)
SetFont(_G.Game60Font, NORMAL, 60) SetFont(_G.Game60Font, NORMAL, 60)
SetFont(_G.Game72Font, NORMAL, 72) SetFont(_G.Game72Font, NORMAL, 72)
SetFont(_G.Game120Font, NORMAL, 120) SetFont(_G.Game120Font, NORMAL, 120)
SetFont(_G.GameFont_Gigantic, NORMAL, 32, nil, SHADOWCOLOR, BIGOFFSET) -- Used at the install steps SetFont(_G.GameFont_Gigantic, NORMAL, 32) -- Used at the install steps
SetFont(_G.GameFontHighlightMedium, NORMAL, 15) -- Fix QuestLog Title mouseover SetFont(_G.GameFontHighlightMedium, NORMAL, 15) -- Fix QuestLog Title mouseover
SetFont(_G.GameFontHighlightSmall2, NORMAL, E.db.general.fontSize) -- Skill or Recipe description on TradeSkill frame SetFont(_G.GameFontHighlightSmall2, NORMAL, E.db.general.fontSize) -- Skill or Recipe description on TradeSkill frame
SetFont(_G.GameFontNormalHuge2, NORMAL, 24) -- Mythic weekly best dungeon name SetFont(_G.GameFontNormalHuge2, NORMAL, 24) -- Mythic weekly best dungeon name
SetFont(_G.GameFontNormalLarge2, NORMAL, 15) -- Garrison Follower Names SetFont(_G.GameFontNormalLarge2, NORMAL, 15) -- Garrison Follower Names
SetFont(_G.GameFontNormalMed1, NORMAL, 14) -- WoW Token Info SetFont(_G.GameFontNormalMed1, NORMAL, 14) -- WoW Token Info
SetFont(_G.GameFontNormalMed2, NORMAL, E.db.general.fontSize*1.1) -- Quest tracker SetFont(_G.GameFontNormalMed2, NORMAL, E.db.general.fontSize*1.1) -- Quest tracker
SetFont(_G.GameFontNormalMed3, NORMAL, 15) SetFont(_G.GameFontNormalMed3, NORMAL, 15)
SetFont(_G.GameFontNormalSmall2, NORMAL, 12) -- MissionUI Followers names SetFont(_G.GameFontNormalSmall2, NORMAL, 12) -- MissionUI Followers names
SetFont(_G.GameTooltipHeader, NORMAL, E.db.general.fontSize) SetFont(_G.GameTooltipHeader, NORMAL, E.db.general.fontSize)
SetFont(_G.InvoiceFont_Med, NORMAL, 12) -- Mail SetFont(_G.InvoiceFont_Med, NORMAL, 12) -- Mail
SetFont(_G.InvoiceFont_Small, NORMAL, E.db.general.fontSize) -- Mail SetFont(_G.InvoiceFont_Small, NORMAL, E.db.general.fontSize) -- Mail
SetFont(_G.MailFont_Large, NORMAL, 14) -- Mail SetFont(_G.MailFont_Large, NORMAL, 14) -- Mail
SetFont(_G.NumberFont_Outline_Huge, NUMBER, 28, MONOCHROME..'THICKOUTLINE', 28) SetFont(_G.NumberFont_Outline_Huge, NUMBER, 28, MONOCHROME..'THICKOUTLINE', 28)
SetFont(_G.NumberFont_Outline_Large, NUMBER, 15, MONOCHROME..'OUTLINE') SetFont(_G.NumberFont_Outline_Large, NUMBER, 15, MONOCHROME..'OUTLINE')
SetFont(_G.NumberFont_Outline_Med, NUMBER, E.db.general.fontSize*1.1, 'OUTLINE') SetFont(_G.NumberFont_Outline_Med, NUMBER, E.db.general.fontSize*1.1, 'OUTLINE')
SetFont(_G.NumberFont_OutlineThick_Mono_Small, NUMBER, E.db.general.fontSize, 'OUTLINE') SetFont(_G.NumberFont_OutlineThick_Mono_Small, NUMBER, E.db.general.fontSize, 'OUTLINE')
SetFont(_G.NumberFont_Shadow_Med, NORMAL, E.db.general.fontSize) -- Chat EditBox SetFont(_G.NumberFont_Shadow_Med, NORMAL, E.db.general.fontSize) -- Chat EditBox
SetFont(_G.NumberFont_Shadow_Small, NORMAL, E.db.general.fontSize) SetFont(_G.NumberFont_Shadow_Small, NORMAL, E.db.general.fontSize)
SetFont(_G.NumberFontNormalSmall, NORMAL, 11, 'OUTLINE') -- Calendar, EncounterJournal SetFont(_G.NumberFontNormalSmall, NORMAL, 11, 'OUTLINE') -- Calendar, EncounterJournal
SetFont(_G.Number11Font, NORMAL, 11) SetFont(_G.Number11Font, NORMAL, 11)
...@@ -104,13 +87,13 @@ function E:UpdateBlizzardFonts() ...@@ -104,13 +87,13 @@ function E:UpdateBlizzardFonts()
SetFont(_G.PVPArenaTextString, NORMAL, 22, MONOCHROME..'OUTLINE') SetFont(_G.PVPArenaTextString, NORMAL, 22, MONOCHROME..'OUTLINE')
SetFont(_G.PVPInfoTextString, NORMAL, 22, MONOCHROME..'OUTLINE') SetFont(_G.PVPInfoTextString, NORMAL, 22, MONOCHROME..'OUTLINE')
SetFont(_G.QuestFont, NORMAL, E.db.general.fontSize) SetFont(_G.QuestFont, NORMAL, E.db.general.fontSize)
SetFont(_G.QuestFont_Enormous, NORMAL, 24, nil, SHADOWCOLOR, NORMALOFFSET) -- Garrison Titles SetFont(_G.QuestFont_Enormous, NORMAL, 24) -- Garrison Titles
SetFont(_G.QuestFont_Huge, NORMAL, 15, nil, SHADOWCOLOR, BIGOFFSET) -- Quest rewards title(Rewards) SetFont(_G.QuestFont_Huge, NORMAL, 15) -- Quest rewards title(Rewards)
SetFont(_G.QuestFont_Large, NORMAL, 14) SetFont(_G.QuestFont_Large, NORMAL, 14)
SetFont(_G.QuestFont_Shadow_Huge, NORMAL, 15, nil, SHADOWCOLOR, NORMALOFFSET) -- Quest Title SetFont(_G.QuestFont_Shadow_Huge, NORMAL, 15) -- Quest Title
SetFont(_G.QuestFont_Shadow_Small, NORMAL, 14, nil, SHADOWCOLOR, NORMALOFFSET) SetFont(_G.QuestFont_Shadow_Small, NORMAL, 14)
SetFont(_G.QuestFont_Super_Huge, NORMAL, 22, nil, SHADOWCOLOR, BIGOFFSET) SetFont(_G.QuestFont_Super_Huge, NORMAL, 22)
SetFont(_G.ReputationDetailFont, NORMAL, E.db.general.fontSize) -- Rep Desc when clicking a rep SetFont(_G.ReputationDetailFont, NORMAL, E.db.general.fontSize) -- Rep Desc when clicking a rep
SetFont(_G.SubZoneTextFont, NORMAL, 24, MONOCHROME..'OUTLINE') -- World Map(SubZone) SetFont(_G.SubZoneTextFont, NORMAL, 24, MONOCHROME..'OUTLINE') -- World Map(SubZone)
SetFont(_G.SubZoneTextString, NORMAL, 25, MONOCHROME..'OUTLINE') SetFont(_G.SubZoneTextString, NORMAL, 25, MONOCHROME..'OUTLINE')
SetFont(_G.SystemFont_Huge1, NORMAL, 20) -- Garrison Mission XP SetFont(_G.SystemFont_Huge1, NORMAL, 20) -- Garrison Mission XP
...@@ -123,7 +106,7 @@ function E:UpdateBlizzardFonts() ...@@ -123,7 +106,7 @@ function E:UpdateBlizzardFonts()
SetFont(_G.SystemFont_OutlineThick_Huge2, NORMAL, 20, MONOCHROME..'THICKOUTLINE') SetFont(_G.SystemFont_OutlineThick_Huge2, NORMAL, 20, MONOCHROME..'THICKOUTLINE')
SetFont(_G.SystemFont_OutlineThick_WTF, NORMAL, 32, MONOCHROME..'OUTLINE') -- World Map SetFont(_G.SystemFont_OutlineThick_WTF, NORMAL, 32, MONOCHROME..'OUTLINE') -- World Map
SetFont(_G.SystemFont_Shadow_Huge1, NORMAL, 20, MONOCHROME..'OUTLINE') -- Raid Warning, Boss emote frame too SetFont(_G.SystemFont_Shadow_Huge1, NORMAL, 20, MONOCHROME..'OUTLINE') -- Raid Warning, Boss emote frame too
SetFont(_G.SystemFont_Shadow_Huge3, NORMAL, 22, nil, SHADOWCOLOR, BIGOFFSET) -- FlightMap SetFont(_G.SystemFont_Shadow_Huge3, NORMAL, 22) -- FlightMap
SetFont(_G.SystemFont_Shadow_Large, NORMAL, 15) SetFont(_G.SystemFont_Shadow_Large, NORMAL, 15)
SetFont(_G.SystemFont_Shadow_Large2, NORMAL, 18) -- Auction House ItemDisplay SetFont(_G.SystemFont_Shadow_Large2, NORMAL, 18) -- Auction House ItemDisplay
SetFont(_G.SystemFont_Shadow_Large_Outline, NUMBER, 20, 'OUTLINE') SetFont(_G.SystemFont_Shadow_Large_Outline, NUMBER, 20, 'OUTLINE')
......
...@@ -775,7 +775,7 @@ function E:Install() ...@@ -775,7 +775,7 @@ function E:Install()
f.Status.anim.progress:SetDuration(.3) f.Status.anim.progress:SetDuration(.3)
f.Status.text = f.Status:CreateFontString(nil, 'OVERLAY') f.Status.text = f.Status:CreateFontString(nil, 'OVERLAY')
f.Status.text:FontTemplate() f.Status.text:FontTemplate(nil, 14, 'OUTLINE')
f.Status.text:SetPoint('CENTER') f.Status.text:SetPoint('CENTER')
f.Status.text:SetText(CURRENT_PAGE..' / '..MAX_PAGE) f.Status.text:SetText(CURRENT_PAGE..' / '..MAX_PAGE)
......
...@@ -3,7 +3,7 @@ local Sticky = E.Libs.SimpleSticky ...@@ -3,7 +3,7 @@ local Sticky = E.Libs.SimpleSticky
local _G = _G local _G = _G
local type, unpack, pairs, error, ipairs = type, unpack, pairs, error, ipairs local type, unpack, pairs, error, ipairs = type, unpack, pairs, error, ipairs
local format, split, find, strupper, strlower = format, strsplit, strfind, strupper, strlower local format, split, find, strupper = format, strsplit, strfind, strupper
local CreateFrame = CreateFrame local CreateFrame = CreateFrame
local IsShiftKeyDown = IsShiftKeyDown local IsShiftKeyDown = IsShiftKeyDown
...@@ -378,15 +378,10 @@ function E:ToggleMovers(show, which) ...@@ -378,15 +378,10 @@ function E:ToggleMovers(show, which)
self.configMode = show self.configMode = show
local upperText = strupper(which) local upperText = strupper(which)
local lowerText = strlower(which)
for _, holder in pairs(E.CreatedMovers) do for _, holder in pairs(E.CreatedMovers) do
if show then local isName = (holder.mover.name == which) or strupper(holder.mover.textString) == upperText
if (holder.mover.name == which) or strlower(holder.mover.textString) == lowerText then if show and (isName or holder.types[upperText]) then
holder.mover:Show() holder.mover:Show()
break -- we just are doing one
elseif holder.types[upperText] then
holder.mover:Show() -- we are showing a group
end
else else
holder.mover:Hide() holder.mover:Hide()
end end
......
...@@ -245,7 +245,7 @@ function PI:CreateFrame() ...@@ -245,7 +245,7 @@ function PI:CreateFrame()
f.Status.anim.progress:SetDuration(.3) f.Status.anim.progress:SetDuration(.3)
f.Status.text = f.Status:CreateFontString(nil, 'OVERLAY') f.Status.text = f.Status:CreateFontString(nil, 'OVERLAY')
f.Status.text:FontTemplate() f.Status.text:FontTemplate(nil, 14, 'OUTLINE')
f.Status.text:SetPoint('CENTER') f.Status.text:SetPoint('CENTER')
f.Option1 = CreateFrame('Button', 'PluginInstallOption1Button', f, 'UIPanelButtonTemplate') f.Option1 = CreateFrame('Button', 'PluginInstallOption1Button', f, 'UIPanelButtonTemplate')
...@@ -350,7 +350,7 @@ function PI:CreateFrame() ...@@ -350,7 +350,7 @@ function PI:CreateFrame()
f.side:SetWidth(140) f.side:SetWidth(140)
f.side.text = f.side:CreateFontString(nil, 'OVERLAY') f.side.text = f.side:CreateFontString(nil, 'OVERLAY')
f.side.text:SetPoint('TOP', f.side, 'TOP', 0, -4) f.side.text:SetPoint('TOP', f.side, 'TOP', 0, -4)
f.side.text:FontTemplate(E.media.normFont, 18, 'OUTLINE') f.side.text:FontTemplate(nil, 18, 'OUTLINE')
f.side.text:SetText(L["Steps"]) f.side.text:SetText(L["Steps"])
f.side.Lines = {} --Table to keep shown lines f.side.Lines = {} --Table to keep shown lines
f.side:Hide() f.side:Hide()
...@@ -365,7 +365,7 @@ function PI:CreateFrame() ...@@ -365,7 +365,7 @@ function PI:CreateFrame()
button.text = button:CreateFontString(nil, 'OVERLAY') button.text = button:CreateFontString(nil, 'OVERLAY')
button.text:SetPoint('TOPLEFT', button, 'TOPLEFT', 2, -2) button.text:SetPoint('TOPLEFT', button, 'TOPLEFT', 2, -2)
button.text:SetPoint('BOTTOMRIGHT', button, 'BOTTOMRIGHT', -2, 2) button.text:SetPoint('BOTTOMRIGHT', button, 'BOTTOMRIGHT', -2, 2)
button.text:FontTemplate(E.media.normFont, 14, 'OUTLINE') button.text:FontTemplate(nil, 14, 'OUTLINE')
button:SetScript('OnClick', function() if i <= f.MaxPage then SetPage(i, f.CurrentPage) end end) button:SetScript('OnClick', function() if i <= f.MaxPage then SetPage(i, f.CurrentPage) end end)
button.text:SetText('') button.text:SetText('')
f.side.Lines[i] = button f.side.Lines[i] = button
......
...@@ -300,7 +300,7 @@ end ...@@ -300,7 +300,7 @@ end
do do
local function NameHealthColor(tags,hex,unit,default) local function NameHealthColor(tags,hex,unit,default)
if hex == 'class' or hex == 'reaction' then if hex == 'class' or hex == 'reaction' then
return tags.namecolor(unit) return tags.namecolor(unit) or default
elseif hex and strmatch(hex, '^%x%x%x%x%x%x$') then elseif hex and strmatch(hex, '^%x%x%x%x%x%x$') then
return '|cFF'..hex return '|cFF'..hex
end end
...@@ -532,13 +532,11 @@ ElvUF.Tags.Events['namecolor'] = 'UNIT_NAME_UPDATE UNIT_FACTION INSTANCE_ENCOUNT ...@@ -532,13 +532,11 @@ ElvUF.Tags.Events['namecolor'] = 'UNIT_NAME_UPDATE UNIT_FACTION INSTANCE_ENCOUNT
ElvUF.Tags.Methods['namecolor'] = function(unit) ElvUF.Tags.Methods['namecolor'] = function(unit)
if UnitIsPlayer(unit) then if UnitIsPlayer(unit) then
local _, unitClass = UnitClass(unit) local _, unitClass = UnitClass(unit)
local class = ElvUF.colors.class[unitClass] local cs = ElvUF.colors.class[unitClass]
if class then return (cs and Hex(cs[1], cs[2], cs[3])) or '|cFFcccccc'
return Hex(class[1], class[2], class[3])
end
else else
local color = ElvUF.colors.reaction[UnitReaction(unit, 'player')] local cr = ElvUF.colors.reaction[UnitReaction(unit, 'player')]
return (color and Hex(color[1], color[2], color[3])) or '|cFFC2C2C2' return (cr and Hex(cr[1], cr[2], cr[3])) or '|cFFcccccc'
end end
end end
......
...@@ -397,9 +397,12 @@ local function StripTexts(object, kill, alpha) ...@@ -397,9 +397,12 @@ local function StripTexts(object, kill, alpha)
StripType(STRIP_FONT, object, kill, alpha) StripType(STRIP_FONT, object, kill, alpha)
end end
local function FontTemplate(fs, font, size, style) local function FontTemplate(fs, font, size, style, skip)
fs.font, fs.fontSize, fs.fontStyle = font or E.media.normFont, size or E.db.general.fontSize, style or E.db.general.fontStyle if not skip then -- ignore updates from UpdateFontTemplates
fs:SetFont(fs.font, fs.fontSize, fs.fontStyle) fs.font, fs.fontSize, fs.fontStyle = font, size, style
end
fs:SetFont(font or E.media.normFont, size or E.db.general.fontSize, style or E.db.general.fontStyle)
if style == 'NONE' then if style == 'NONE' then
fs:SetShadowOffset(1, -0.5) fs:SetShadowOffset(1, -0.5)
......
## Interface: 80300 ## Interface: 80300
## Author: Elv, Simpy ## Author: Elv, Simpy
## Version: 11.51 ## Version: 11.52
## Title: |cff1784d1ElvUI|r ## Title: |cff1784d1ElvUI|r
## Notes: User Interface replacement AddOn for World of Warcraft. ## Notes: User Interface replacement AddOn for World of Warcraft.
## SavedVariables: ElvDB, ElvPrivateDB ## SavedVariables: ElvDB, ElvPrivateDB
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
-- @name AceAddon-3.0.lua -- @name AceAddon-3.0.lua
-- @release $Id$ -- @release $Id$
local MAJOR, MINOR = "AceAddon-3.0", 12 local MAJOR, MINOR = "AceAddon-3.0", 13
local AceAddon, oldminor = LibStub:NewLibrary(MAJOR, MINOR) local AceAddon, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
if not AceAddon then return end -- No Upgrade needed. if not AceAddon then return end -- No Upgrade needed.
...@@ -601,10 +601,20 @@ function AceAddon:IterateAddonStatus() return pairs(self.statuses) end ...@@ -601,10 +601,20 @@ function AceAddon:IterateAddonStatus() return pairs(self.statuses) end
function AceAddon:IterateEmbedsOnAddon(addon) return pairs(self.embeds[addon]) end function AceAddon:IterateEmbedsOnAddon(addon) return pairs(self.embeds[addon]) end
function AceAddon:IterateModulesOfAddon(addon) return pairs(addon.modules) end function AceAddon:IterateModulesOfAddon(addon) return pairs(addon.modules) end
-- Blizzard AddOns which can load very early in the loading process and mess with Ace3 addon loading
local BlizzardEarlyLoadAddons = {
Blizzard_DebugTools = true,
Blizzard_TimeManager = true,
Blizzard_BattlefieldMap = true,
Blizzard_MapCanvas = true,
Blizzard_SharedMapDataProviders = true,
Blizzard_CombatLog = true,
}
-- Event Handling -- Event Handling
local function onEvent(this, event, arg1) local function onEvent(this, event, arg1)
-- 2011-08-17 nevcairiel - ignore the load event of Blizzard_DebugTools, so a potential startup error isn't swallowed up -- 2020-08-28 nevcairiel - ignore the load event of Blizzard addons which occur early in the loading process
if (event == "ADDON_LOADED" and arg1 ~= "Blizzard_DebugTools") or event == "PLAYER_LOGIN" then if (event == "ADDON_LOADED" and (arg1 == nil or not BlizzardEarlyLoadAddons[arg1])) or event == "PLAYER_LOGIN" then
-- if a addon loads another addon, recursion could happen here, so we need to validate the table on every iteration -- if a addon loads another addon, recursion could happen here, so we need to validate the table on every iteration
while(#AceAddon.initializequeue > 0) do while(#AceAddon.initializequeue > 0) do
local addon = tremove(AceAddon.initializequeue, 1) local addon = tremove(AceAddon.initializequeue, 1)
......
--[[ --[[
Copyright (c) 2010-2019, Hendrik "nevcairiel" Leppkes <h.leppkes@gmail.com> Copyright (c) 2010-2020, Hendrik "nevcairiel" Leppkes <h.leppkes@gmail.com>
All rights reserved. All rights reserved.
...@@ -26,31 +26,21 @@ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ...@@ -26,31 +26,21 @@ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
]]
]]
local MAJOR_VERSION = "LibActionButton-1.0-ElvUI" local MAJOR_VERSION = "LibActionButton-1.0-ElvUI"
local MINOR_VERSION = 20 -- the real minor version is 74 local MINOR_VERSION = 21 -- the real minor version is 79
if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end
local lib, oldversion = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION) local lib, oldversion = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)
if not lib then return end if not lib then return end
-- Lua functions
local type, error, tostring, tonumber, assert, select = type, error, tostring, tonumber, assert, select local type, error, tostring, tonumber, assert, select = type, error, tostring, tonumber, assert, select