Commit 2e3ca891 authored by Simpy's avatar Simpy 🐹

12.12

parents 35e891b8 b922e1df
...@@ -291,12 +291,9 @@ function E:UpdateCooldownOverride(module) ...@@ -291,12 +291,9 @@ function E:UpdateCooldownOverride(module)
cd.text:FontTemplate(cd.customFont, cd.customFontSize, cd.customFontOutline) cd.text:FontTemplate(cd.customFont, cd.customFontSize, cd.customFontOutline)
elseif parent.CooldownOverride == 'auras' then elseif parent.CooldownOverride == 'auras' then
-- parent.auraType defined in `A:UpdateHeader` and `A:CreateIcon` -- parent.auraType defined in `A:UpdateHeader` and `A:CreateIcon`
local font = LSM:Fetch('font', db.font) local fontDB = parent.auraType and db[parent.auraType]
if font and parent.auraType then if fontDB and fontDB.timeFont then
local fontSize = db[parent.auraType] and db[parent.auraType].durationFontSize cd.text:FontTemplate(LSM:Fetch('font', fontDB.timeFont), fontDB.timeFontSize, fontDB.timeFontOutline)
if fontSize then
cd.text:FontTemplate(font , fontSize, db.fontOutline)
end
end end
end end
......
...@@ -564,6 +564,7 @@ do ...@@ -564,6 +564,7 @@ do
name = 'ElvUI NamePlates' name = 'ElvUI NamePlates'
}, },
'TidyPlates', 'TidyPlates',
'TidyPlates_ThreatPlates',
'Healers-Have-To-Die', 'Healers-Have-To-Die',
'Kui_Nameplates', 'Kui_Nameplates',
'Plater', 'Plater',
...@@ -1022,16 +1023,6 @@ do -- BFA Convert, deprecated.. ...@@ -1022,16 +1023,6 @@ do -- BFA Convert, deprecated..
end end
end end
--Convert old 'Buffs and Debuffs' font size option to individual options
if E.db.auras.fontSize then
local fontSize = E.db.auras.fontSize
E.db.auras.buffs.countFontSize = fontSize
E.db.auras.buffs.durationFontSize = fontSize
E.db.auras.debuffs.countFontSize = fontSize
E.db.auras.debuffs.durationFontSize = fontSize
E.db.auras.fontSize = nil
end
--Remove stale font settings from Cooldown system for top auras --Remove stale font settings from Cooldown system for top auras
if E.db.auras.cooldown.fonts then if E.db.auras.cooldown.fonts then
E.db.auras.cooldown.fonts = nil E.db.auras.cooldown.fonts = nil
......
## Interface: 90001 ## Interface: 90001
## Author: Elv, Simpy ## Author: Elv, Simpy
## Version: 12.11 ## Version: 12.12
## 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
......
...@@ -29,7 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ...@@ -29,7 +29,7 @@ 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 = 21 -- the real minor version is 79 local MINOR_VERSION = 22 -- 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)
...@@ -1120,9 +1120,12 @@ function Update(self, fromUpdateConfig) ...@@ -1120,9 +1120,12 @@ function Update(self, fromUpdateConfig)
-- Update icon and hotkey -- Update icon and hotkey
local texture = self:GetTexture() local texture = self:GetTexture()
-- Cooldown desaturate can control saturation, we don't want to override it here
local allowSaturation = not self.saturationLocked and not self.LevelLinkLockIcon:IsShown()
-- Zone ability button handling -- Zone ability button handling
self.zoneAbilityDisabled = false self.zoneAbilityDisabled = false
if not self.saturationLocked then if allowSaturation then
self.icon:SetDesaturated(false) self.icon:SetDesaturated(false)
end end
if self._state_type == "action" then if self._state_type == "action" then
...@@ -1133,7 +1136,8 @@ function Update(self, fromUpdateConfig) ...@@ -1133,7 +1136,8 @@ function Update(self, fromUpdateConfig)
if name == abilityName then if name == abilityName then
texture = GetLastZoneAbilitySpellTexture() texture = GetLastZoneAbilitySpellTexture()
self.zoneAbilityDisabled = true self.zoneAbilityDisabled = true
if not self.saturationLocked then
if allowSaturation then
self.icon:SetDesaturated(true) self.icon:SetDesaturated(true)
end end
end end
...@@ -1207,37 +1211,37 @@ function UpdateButtonState(self) ...@@ -1207,37 +1211,37 @@ function UpdateButtonState(self)
end end
function UpdateUsable(self) function UpdateUsable(self)
local isLevelLinkLocked
if not WoWClassic and self._state_type == "action" then
isLevelLinkLocked = C_LevelLink.IsActionLocked(self._state_action)
if not self.icon:IsDesaturated() then
self.icon:SetDesaturated(isLevelLinkLocked)
end
if self.LevelLinkLockIcon then
self.LevelLinkLockIcon:SetShown(isLevelLinkLocked)
end
end
if self.config.useColoring then if self.config.useColoring then
if self.config.outOfRangeColoring == "button" and self.outOfRange then if isLevelLinkLocked then
self.icon:SetVertexColor(unpack(self.config.colors.notUsable))
elseif self.config.outOfRangeColoring == "button" and self.outOfRange then
self.icon:SetVertexColor(unpack(self.config.colors.range)) self.icon:SetVertexColor(unpack(self.config.colors.range))
else else
local isUsable, notEnoughMana = self:IsUsable() local isUsable, notEnoughMana = self:IsUsable()
if isUsable then if isUsable then
self.icon:SetVertexColor(unpack(self.config.colors.usable)) self.icon:SetVertexColor(unpack(self.config.colors.usable))
--self.NormalTexture:SetVertexColor(1.0, 1.0, 1.0)
elseif notEnoughMana then elseif notEnoughMana then
self.icon:SetVertexColor(unpack(self.config.colors.mana)) self.icon:SetVertexColor(unpack(self.config.colors.mana))
--self.NormalTexture:SetVertexColor(0.5, 0.5, 1.0)
else else
self.icon:SetVertexColor(unpack(self.config.colors.notUsable)) self.icon:SetVertexColor(unpack(self.config.colors.notUsable))
--self.NormalTexture:SetVertexColor(1.0, 1.0, 1.0)
end end
end end
else else
self.icon:SetVertexColor(unpack(self.config.colors.usable)) self.icon:SetVertexColor(unpack(self.config.colors.usable))
end end
if not WoWClassic and self._state_type == "action" then
local isLevelLinkLocked = C_LevelLink.IsActionLocked(self._state_action)
if not self.icon:IsDesaturated() then
self.icon:SetDesaturated(isLevelLinkLocked)
end
if self.LevelLinkLockIcon then
self.LevelLinkLockIcon:SetShown(isLevelLinkLocked)
end
end
lib.callbacks:Fire("OnButtonUsable", self) lib.callbacks:Fire("OnButtonUsable", self)
end end
......
...@@ -30,6 +30,7 @@ L["Adjust the UI Scale to fit your screen, press the autoscale button to set the ...@@ -30,6 +30,7 @@ L["Adjust the UI Scale to fit your screen, press the autoscale button to set the
L["AFK"] = "AFK" L["AFK"] = "AFK"
L["All keybindings cleared for |cff00ff00%s|r."] = "Alle Tastaturbelegungen gelöscht für |cff00ff00%s|r." L["All keybindings cleared for |cff00ff00%s|r."] = "Alle Tastaturbelegungen gelöscht für |cff00ff00%s|r."
L["Alliance: "] = "Allianz: " L["Alliance: "] = "Allianz: "
L["Allow Sharing"] = "Teilen erlauben"
L["Alpha Key"] = true --No need to translate L["Alpha Key"] = true --No need to translate
L["Already Running.. Bailing Out!"] = "Bereits ausgeführt.. Warte ab!" L["Already Running.. Bailing Out!"] = "Bereits ausgeführt.. Warte ab!"
L["Alternative Power"] = "Alternative Energie" L["Alternative Power"] = "Alternative Energie"
...@@ -95,6 +96,7 @@ L["copperabbrev"] = "|cffeda55fc|r" ...@@ -95,6 +96,7 @@ L["copperabbrev"] = "|cffeda55fc|r"
L["Count"] = "Zähler" L["Count"] = "Zähler"
L["Current Difficulties:"] = "Derzeitiger Schwierigkeitsgrad:" L["Current Difficulties:"] = "Derzeitiger Schwierigkeitsgrad:"
L["Current Level:"] = "Derzeitiges Level:" L["Current Level:"] = "Derzeitiges Level:"
L["Custom Font"] = "Benutzerdefinierte Schrift"
L["CVars Set"] = "CVars gesetzt" L["CVars Set"] = "CVars gesetzt"
L["CVars"] = "CVars" L["CVars"] = "CVars"
L["Dark"] = "Dunkel" L["Dark"] = "Dunkel"
...@@ -256,6 +258,7 @@ L["Preview"] = "Vorschau" ...@@ -256,6 +258,7 @@ L["Preview"] = "Vorschau"
L["Profile download complete from %s, but the profile %s already exists. Change the name or else it will overwrite the existing profile."] = "Profil komplett heruntergeladen von %s, allerdings ist das Profil %s bereits vorhanden. Ändere den Namen oder das bereits existierende Profil wird überschrieben." L["Profile download complete from %s, but the profile %s already exists. Change the name or else it will overwrite the existing profile."] = "Profil komplett heruntergeladen von %s, allerdings ist das Profil %s bereits vorhanden. Ändere den Namen oder das bereits existierende Profil wird überschrieben."
L["Profile download complete from %s, would you like to load the profile %s now?"] = "Profil komplett heruntergeladen von %s, möchtest du das Profil %s nun laden?" L["Profile download complete from %s, would you like to load the profile %s now?"] = "Profil komplett heruntergeladen von %s, möchtest du das Profil %s nun laden?"
L["Profile request sent. Waiting for response from player."] = "Profil Anfrage gesendet. Warte auf die Antwort des Spielers." L["Profile request sent. Waiting for response from player."] = "Profil Anfrage gesendet. Warte auf die Antwort des Spielers."
L["Profiles"] = "Profile"
L["Profit:"] = "Gewinn:" L["Profit:"] = "Gewinn:"
L["Purchase Bags"] = "Taschen kaufen" L["Purchase Bags"] = "Taschen kaufen"
L["Purchase"] = "Kaufen" L["Purchase"] = "Kaufen"
...@@ -325,9 +328,9 @@ L["This part of the installation process sets up your chat windows names, positi ...@@ -325,9 +328,9 @@ L["This part of the installation process sets up your chat windows names, positi
L["This part of the installation process sets up your World of Warcraft default options it is recommended you should do this step for everything to behave properly."] = "Dieser Installationsprozess richtet alle wichtigen Cvars deines World of Warcrafts ein, um eine problemlose Nutzung zu ermöglichen." L["This part of the installation process sets up your World of Warcraft default options it is recommended you should do this step for everything to behave properly."] = "Dieser Installationsprozess richtet alle wichtigen Cvars deines World of Warcrafts ein, um eine problemlose Nutzung zu ermöglichen."
L["This setting caused a conflicting anchor point, where '%s' would be attached to itself. Please check your anchor points. Setting '%s' to be attached to '%s'."] = "Diese Einstellungen haben einen Konflikt mit einem Ankerpunkt, wo '%s' an sich selbst angehaftet sein soll. Bitte kontrolliere deine Ankerpunkte. Einstellung '%s' angehaftet an '%s'." L["This setting caused a conflicting anchor point, where '%s' would be attached to itself. Please check your anchor points. Setting '%s' to be attached to '%s'."] = "Diese Einstellungen haben einen Konflikt mit einem Ankerpunkt, wo '%s' an sich selbst angehaftet sein soll. Bitte kontrolliere deine Ankerpunkte. Einstellung '%s' angehaftet an '%s'."
L["This will change the layout of your unitframes and actionbars."] = "Dies wird das Layout der Einheitenfenster und Aktionsleisten ändern." L["This will change the layout of your unitframes and actionbars."] = "Dies wird das Layout der Einheitenfenster und Aktionsleisten ändern."
L["To list all available ElvUI commands, type in chat /ehelp"] = true L["To list all available ElvUI commands, type in chat /ehelp"] = "Für eine liste aller verfügbaren ElvUI befehle, tippe /ehelp"
L["To quickly move around certain elements of the UI, type /moveui"] = true L["To quickly move around certain elements of the UI, type /moveui"] = "Um schnell verschiedene Interface Elemente zu verschieben, tippe /moveui"
L["To setup chat colors, chat channels and chat font size, right-click the chat tab name."] = true L["To setup chat colors, chat channels and chat font size, right-click the chat tab name."] = "Um Chat Farben, Chat Channels und die Chat Schriftgröße zu ändern, rechts-klicke den Chat Tab Namen."
L["Toggle Bags"] = "Taschen umschalten" L["Toggle Bags"] = "Taschen umschalten"
L["Toggle Chat Frame"] = "Chatfenster an-/ausschalten" L["Toggle Chat Frame"] = "Chatfenster an-/ausschalten"
L["Toggle Configuration"] = "Konfiguration an-/ausschalten" L["Toggle Configuration"] = "Konfiguration an-/ausschalten"
...@@ -357,13 +360,13 @@ L["yells"] = "schreien" ...@@ -357,13 +360,13 @@ L["yells"] = "schreien"
L["Yes, Keep Changes!"] = "Ja, Änderungen behalten!" L["Yes, Keep Changes!"] = "Ja, Änderungen behalten!"
L["You are now finished with the installation process. If you are in need of technical support please visit us at http://www.tukui.org."] = "Du hast den Installationsprozess abgeschlossen. Solltest du technische Hilfe benötigen, besuche uns auf http://www.tukui.org." L["You are now finished with the installation process. If you are in need of technical support please visit us at http://www.tukui.org."] = "Du hast den Installationsprozess abgeschlossen. Solltest du technische Hilfe benötigen, besuche uns auf http://www.tukui.org."
L["You are using CPU Profiling. This causes decreased performance. Do you want to disable it or continue?"] = "Du benutzt CPU Profiling. Dieses verringert deine Performance. Willst du es deaktivieren oder fortfahren." L["You are using CPU Profiling. This causes decreased performance. Do you want to disable it or continue?"] = "Du benutzt CPU Profiling. Dieses verringert deine Performance. Willst du es deaktivieren oder fortfahren."
L["You can access the copy chat and chat menu functions by left/right clicking on the icon in the top right corner of the chat panel."] = true L["You can access the copy chat and chat menu functions by left/right clicking on the icon in the top right corner of the chat panel."] = "Du kannst auf die Kopierfunktion und das Chat Menü zugreifen, indem du links/rechts-klickst auf das Icon in der oberen rechten Ecke vom Chat."
L["You can access the microbar by using middle mouse button on the minimap. You can also enable the MicroBar in the actionbar settings."] = true L["You can access the microbar by using middle mouse button on the minimap. You can also enable the MicroBar in the actionbar settings."] = "Du kannst auf das Mikromenü zugreifen indem du mit der mittleren Maustaste auf die Minikarte klickst. Du kannst auch die Mikromenü Bar in den Aktionsleisten Optionen anschalten."
L["You can always change fonts and colors of any element of ElvUI from the in-game configuration."] = "Du kannst jederzeit in der Ingame-Konfiguration Schriften und Farben von jedem Element des Interfaces ändern." L["You can always change fonts and colors of any element of ElvUI from the in-game configuration."] = "Du kannst jederzeit in der Ingame-Konfiguration Schriften und Farben von jedem Element des Interfaces ändern."
L["You can enter the keybind mode by typing /kb"] = true L["You can enter the keybind mode by typing /kb"] = "Du kannst den Tastenbelegungsmodus starten indem du /kb in den chat tippst"
L["You can now choose what layout you wish to use based on your combat role."] = "Du kannst nun auf Basis deiner Rolle im Kampf ein Layout wählen." L["You can now choose what layout you wish to use based on your combat role."] = "Du kannst nun auf Basis deiner Rolle im Kampf ein Layout wählen."
L["You can quickly change your displayed DataTexts by mousing over them while holding ALT."] = true L["You can quickly change your displayed DataTexts by mousing over them while holding ALT."] = "Du kannst deine Infotexte schnell ändern, indem du mit der Maus über sie fährst und ALT gedrückt hälst."
L["You can see someones average item level inside the tooltip by holding shift and mousing over them."] = true L["You can see someones average item level inside the tooltip by holding shift and mousing over them."] = "Du kannst das durchschnitts Itemlevel anderer Spieler im Tooltip sehen, wenn du Shift gedrückt hälst und mit der Maus über sie fährst."
L["You don't have enough money to repair."] = "Du hast nicht genügend Gold für die Reparatur." L["You don't have enough money to repair."] = "Du hast nicht genügend Gold für die Reparatur."
L["You don't have permission to mark targets."] = "Du hast keine Rechte ein Ziel zu markieren." L["You don't have permission to mark targets."] = "Du hast keine Rechte ein Ziel zu markieren."
L["You have imported settings which may require a UI reload to take effect. Reload now?"] = "Du hast Einstellungen importiert die wahrscheinlich ein Neuladen des UI erfordern. Jetzt neu laden?" L["You have imported settings which may require a UI reload to take effect. Reload now?"] = "Du hast Einstellungen importiert die wahrscheinlich ein Neuladen des UI erfordern. Jetzt neu laden?"
......
...@@ -219,12 +219,12 @@ function AB:HandleButton(bar, button, index, lastButton, lastColumnButton) ...@@ -219,12 +219,12 @@ function AB:HandleButton(bar, button, index, lastButton, lastColumnButton)
end end
end end
function AB:TrimIcon(button) function AB:TrimIcon(button, masque)
if not button.icon then return end if not button.icon then return end
local db = button.db local left, right, top, bottom = unpack(button.db and button.db.customCoords or E.TexCoords)
local left, right, top, bottom = unpack(db and db.customCoords or E.TexCoords) local changeRatio = button.db and not button.db.keepSizeRatio
if db and not db.keepSizeRatio then if changeRatio then
local width, height = button:GetSize() local width, height = button:GetSize()
local ratio = width / height local ratio = width / height
if ratio > 1 then if ratio > 1 then
...@@ -238,7 +238,10 @@ function AB:TrimIcon(button) ...@@ -238,7 +238,10 @@ function AB:TrimIcon(button)
end end
end end
button.icon:SetTexCoord(left, right, top, bottom) -- always when masque is off, otherwise only when keepSizeRatio is off
if not masque or changeRatio then
button.icon:SetTexCoord(left, right, top, bottom)
end
end end
function AB:GetGrowth(point) function AB:GetGrowth(point)
...@@ -353,7 +356,7 @@ function AB:PositionAndSizeBar(barName) ...@@ -353,7 +356,7 @@ function AB:PositionAndSizeBar(barName)
-- masque retrims them all so we have to too -- masque retrims them all so we have to too
for btn in pairs(AB.handledbuttons) do for btn in pairs(AB.handledbuttons) do
AB:TrimIcon(btn) AB:TrimIcon(btn, true)
end end
end end
end end
...@@ -610,6 +613,7 @@ function AB:StyleButton(button, noBackdrop, useMasque, ignoreNormal) ...@@ -610,6 +613,7 @@ function AB:StyleButton(button, noBackdrop, useMasque, ignoreNormal)
local normal = _G[name..'NormalTexture'] local normal = _G[name..'NormalTexture']
local normal2 = button:GetNormalTexture() local normal2 = button:GetNormalTexture()
local db = button:GetParent().db
local color = AB.db.fontColor local color = AB.db.fontColor
local countPosition = AB.db.countTextPosition or 'BOTTOMRIGHT' local countPosition = AB.db.countTextPosition or 'BOTTOMRIGHT'
local countXOffset = AB.db.countTextXOffset or 0 local countXOffset = AB.db.countTextXOffset or 0
...@@ -625,8 +629,15 @@ function AB:StyleButton(button, noBackdrop, useMasque, ignoreNormal) ...@@ -625,8 +629,15 @@ function AB:StyleButton(button, noBackdrop, useMasque, ignoreNormal)
if count then if count then
count:ClearAllPoints() count:ClearAllPoints()
count:Point(countPosition, countXOffset, countYOffset)
count:FontTemplate(LSM:Fetch('font', AB.db.font), AB.db.fontSize, AB.db.fontOutline) if db and db.customCountFont then
count:Point(db.countTextPosition, db.countTextXOffset, db.countTextYOffset)
count:FontTemplate(LSM:Fetch('font', db.countFont), db.countFontSize, db.countFontOutline)
else
count:Point(countPosition, countXOffset, countYOffset)
count:FontTemplate(LSM:Fetch('font', AB.db.font), AB.db.fontSize, AB.db.fontOutline)
end
count:SetTextColor(color.r, color.g, color.b) count:SetTextColor(color.r, color.g, color.b)
end end
...@@ -668,7 +679,12 @@ function AB:StyleButton(button, noBackdrop, useMasque, ignoreNormal) ...@@ -668,7 +679,12 @@ function AB:StyleButton(button, noBackdrop, useMasque, ignoreNormal)
end end
if AB.db.hotkeytext or AB.db.useRangeColorText then if AB.db.hotkeytext or AB.db.useRangeColorText then
hotkey:FontTemplate(LSM:Fetch('font', AB.db.font), AB.db.fontSize, AB.db.fontOutline) if db and db.customHotkeyFont then
hotkey:FontTemplate(LSM:Fetch('font', db.hotkeyFont), db.hotkeyFontSize, db.hotkeyFontOutline)
else
hotkey:FontTemplate(LSM:Fetch('font', AB.db.font), AB.db.fontSize, AB.db.fontOutline)
end
if button.config and (button.config.outOfRangeColoring ~= 'hotkey') then if button.config and (button.config.outOfRangeColoring ~= 'hotkey') then
button.HotKey:SetTextColor(color.r, color.g, color.b) button.HotKey:SetTextColor(color.r, color.g, color.b)
end end
...@@ -1051,9 +1067,10 @@ function AB:FixKeybindText(button) ...@@ -1051,9 +1067,10 @@ function AB:FixKeybindText(button)
local hotkey = _G[button:GetName()..'HotKey'] local hotkey = _G[button:GetName()..'HotKey']
local text = hotkey:GetText() local text = hotkey:GetText()
local hotkeyPosition = E.db.actionbar.hotkeyTextPosition or 'TOPRIGHT' local db = button:GetParent().db
local hotkeyXOffset = E.db.actionbar.hotkeyTextXOffset or 0 local hotkeyPosition = db and db.customHotkeyFont and db.hotkeyTextPosition or E.db.actionbar.hotkeyTextPosition or 'TOPRIGHT'
local hotkeyYOffset = E.db.actionbar.hotkeyTextYOffset or -3 local hotkeyXOffset = db and db.customHotkeyFont and db.hotkeyTextXOffset or E.db.actionbar.hotkeyTextXOffset or 0
local hotkeyYOffset = db and db.customHotkeyFont and db.hotkeyTextYOffset or E.db.actionbar.hotkeyTextYOffset or -3
local justify = 'RIGHT' local justify = 'RIGHT'
if hotkeyPosition == 'TOPLEFT' or hotkeyPosition == 'BOTTOMLEFT' then if hotkeyPosition == 'TOPLEFT' or hotkeyPosition == 'BOTTOMLEFT' then
...@@ -1231,6 +1248,11 @@ function AB:ToggleCooldownOptions() ...@@ -1231,6 +1248,11 @@ function AB:ToggleCooldownOptions()
end end
function AB:SetButtonDesaturation(button, duration) function AB:SetButtonDesaturation(button, duration)
if button.LevelLinkLockIcon:IsShown() then
button.saturationLocked = nil
return
end
if AB.db.desaturateOnCooldown and (duration and duration > 1.5) then if AB.db.desaturateOnCooldown and (duration and duration > 1.5) then
button.icon:SetDesaturated(true) button.icon:SetDesaturated(true)
button.saturationLocked = true button.saturationLocked = true
......
...@@ -169,7 +169,7 @@ function AB:PositionAndSizeBarPet() ...@@ -169,7 +169,7 @@ function AB:PositionAndSizeBarPet()
MasqueGroup:ReSkin() MasqueGroup:ReSkin()
for _, btn in ipairs(bar.buttons) do for _, btn in ipairs(bar.buttons) do
AB:TrimIcon(btn) AB:TrimIcon(btn, true)
end end
end end
end end
......
...@@ -190,7 +190,7 @@ function AB:PositionAndSizeBarShapeShift() ...@@ -190,7 +190,7 @@ function AB:PositionAndSizeBarShapeShift()
MasqueGroup:ReSkin() MasqueGroup:ReSkin()
for _, btn in ipairs(bar.buttons) do for _, btn in ipairs(bar.buttons) do
AB:TrimIcon(btn) AB:TrimIcon(btn, true)
end end
end end
end end
......
...@@ -114,8 +114,10 @@ function A:CreateIcon(button) ...@@ -114,8 +114,10 @@ function A:CreateIcon(button)
button.texture:SetTexCoord(unpack(E.TexCoords)) button.texture:SetTexCoord(unpack(E.TexCoords))
button.count = button:CreateFontString(nil, 'OVERLAY') button.count = button:CreateFontString(nil, 'OVERLAY')
button.count:FontTemplate()
button.text = button:CreateFontString(nil, 'OVERLAY') button.text = button:CreateFontString(nil, 'OVERLAY')
button.text:FontTemplate()
button.highlight = button:CreateTexture(nil, 'HIGHLIGHT') button.highlight = button:CreateTexture(nil, 'HIGHLIGHT')
button.highlight:SetColorTexture(1, 1, 1, .45) button.highlight:SetColorTexture(1, 1, 1, .45)
......
...@@ -328,7 +328,7 @@ do --this can save some main file locals ...@@ -328,7 +328,7 @@ do --this can save some main file locals
['Imsospicy-Cenarius'] = itsSimpy, -- [Horde] Mage ['Imsospicy-Cenarius'] = itsSimpy, -- [Horde] Mage
['Imsonutty-Cenarius'] = itsSimpy, -- [Horde] Hunter ['Imsonutty-Cenarius'] = itsSimpy, -- [Horde] Hunter
['Imsotasty-Cenarius'] = itsSimpy, -- [Horde] Monk ['Imsotasty-Cenarius'] = itsSimpy, -- [Horde] Monk
['Imsogooey-Cenarius'] = itsSimpy, -- [Horde] Warlock ['Imsosaucy-Cenarius'] = itsSimpy, -- [Horde] Warlock
['Imsodrippy-Cenarius'] = itsSimpy, -- [Horde] Rogue ['Imsodrippy-Cenarius'] = itsSimpy, -- [Horde] Rogue
['Bunne-CenarionCircle'] = itsSimpy, -- [RP] Warrior ['Bunne-CenarionCircle'] = itsSimpy, -- [RP] Warrior
['Loppie-CenarionCircle'] = itsSimpy, -- [RP] Monk ['Loppie-CenarionCircle'] = itsSimpy, -- [RP] Monk
......
...@@ -4,14 +4,12 @@ local oUF = E.oUF ...@@ -4,14 +4,12 @@ local oUF = E.oUF
local _G = _G local _G = _G
local pairs, ipairs, ceil, floor, tonumber = pairs, ipairs, ceil, floor, tonumber local pairs, ipairs, ceil, floor, tonumber = pairs, ipairs, ceil, floor, tonumber
local strmatch, strlower, strfind = strmatch, strlower, strfind local wipe, strmatch, strlower, strfind = wipe, strmatch, strlower, strfind
local GetLocale = GetLocale local GetLocale = GetLocale
local IsInInstance = IsInInstance local IsInInstance = IsInInstance
local UnitIsPlayer = UnitIsPlayer local UnitIsPlayer = UnitIsPlayer
local GetQuestLogSpecialItemInfo = GetQuestLogSpecialItemInfo local GetQuestLogSpecialItemInfo = GetQuestLogSpecialItemInfo
local C_QuestLog_GetTitleForQuestID = C_QuestLog.GetTitleForQuestID
local C_QuestLog_GetLogIndexForQuestID = C_QuestLog.GetLogIndexForQuestID
local C_QuestLog_GetTitleForLogIndex = C_QuestLog.GetTitleForLogIndex local C_QuestLog_GetTitleForLogIndex = C_QuestLog.GetTitleForLogIndex
local C_QuestLog_GetNumQuestLogEntries = C_QuestLog.GetNumQuestLogEntries local C_QuestLog_GetNumQuestLogEntries = C_QuestLog.GetNumQuestLogEntries
local C_QuestLog_GetQuestIDForLogIndex = C_QuestLog.GetQuestIDForLogIndex local C_QuestLog_GetQuestIDForLogIndex = C_QuestLog.GetQuestIDForLogIndex
...@@ -114,7 +112,7 @@ local function GetQuests(unitID) ...@@ -114,7 +112,7 @@ local function GetQuests(unitID)
local count, percent = CheckTextForQuest(text) local count, percent = CheckTextForQuest(text)
-- this line comes from one line up in the tooltip -- this line comes from one line up in the tooltip
local activeQuest = NP.QuestIcons.activeQuests[text] local activeQuest = questIcons.activeQuests[text]
if activeQuest then activeID = activeQuest end if activeQuest then activeID = activeQuest end
if count then if count then
...@@ -129,19 +127,19 @@ local function GetQuests(unitID) ...@@ -129,19 +127,19 @@ local function GetQuests(unitID)
else else
local lowerText = strlower(text) local lowerText = strlower(text)
-- check chat type first -- check kill type first
for _, listText in ipairs(questTypes.CHAT) do for _, listText in ipairs(questTypes.KILL) do
if strfind(lowerText, listText, nil, true) then if strfind(lowerText, listText, nil, true) then
type = 'CHAT' type = 'KILL'
break break
end end
end end
-- check kill type if chat type doesn't exist -- check chat type if kill type doesn't exist
if not type then if not type then
for _, listText in ipairs(questTypes.KILL) do for _, listText in ipairs(questTypes.CHAT) do
if strfind(lowerText, listText, nil, true) then if strfind(lowerText, listText, nil, true) then
type = 'KILL' type = 'CHAT'
break break
end end
end end
...@@ -293,39 +291,22 @@ local frame = CreateFrame('Frame') ...@@ -293,39 +291,22 @@ local frame = CreateFrame('Frame')
frame:RegisterEvent('QUEST_ACCEPTED') frame:RegisterEvent('QUEST_ACCEPTED')
frame:RegisterEvent('QUEST_REMOVED') frame:RegisterEvent('QUEST_REMOVED')
frame:RegisterEvent('PLAYER_ENTERING_WORLD') frame:RegisterEvent('PLAYER_ENTERING_WORLD')
frame:SetScript('OnEvent', function(self, event, questID) frame:SetScript('OnEvent', function(self, event)
if event == 'PLAYER_ENTERING_WORLD' then wipe(questIcons.indexByID)
for i = 1, C_QuestLog_GetNumQuestLogEntries() do wipe(questIcons.activeQuests)
local id = C_QuestLog_GetQuestIDForLogIndex(i)
if id and id > 0 then
questIcons.indexByID[id] = i
local title = C_QuestLog_GetTitleForLogIndex(i) for i = 1, C_QuestLog_GetNumQuestLogEntries() do
if title then questIcons.activeQuests[title] = id end local id = C_QuestLog_GetQuestIDForLogIndex(i)
end if id and id > 0 then
questIcons.indexByID[id] = i
local title = C_QuestLog_GetTitleForLogIndex(i)
if title then questIcons.activeQuests[title] = id end
end end
end
if event == 'PLAYER_ENTERING_WORLD' then
self:UnregisterEvent(event) self:UnregisterEvent(event)
elseif event == 'QUEST_ACCEPTED' then
if questID and questID > 0 then
local index = C_QuestLog_GetLogIndexForQuestID(questID)
if index and index > 0 then
questIcons.indexByID[questID] = index
local title = C_QuestLog_GetTitleForQuestID(questID)
if title then questIcons.activeQuests[title] = questID end
end
end