diff --git a/ElvUI_SLE/locales/english.lua b/ElvUI_SLE/locales/english.lua index cec6598..dec75f0 100644 --- a/ElvUI_SLE/locales/english.lua +++ b/ElvUI_SLE/locales/english.lua @@ -170,6 +170,7 @@ L["Sets the color of avarage item level."] = true L["Only Relevant Stats"] = true L["Show only those primary stats relevant to your spec."] = true L["SLE_ARMORY_POINTS_AVAILABLE"] = "%s Point(s) Available!!" +L["Show ElvUI skin's backdrop overlay"] = true --AFK L["You Are Away From Keyboard for"] = true diff --git a/ElvUI_SLE/locales/russian.lua b/ElvUI_SLE/locales/russian.lua index 808f279..bfec9d4 100644 --- a/ElvUI_SLE/locales/russian.lua +++ b/ElvUI_SLE/locales/russian.lua @@ -167,6 +167,7 @@ L["Sets the color of avarage item level."] = "Устанавливает цве L["Only Relevant Stats"] = "Только подходящие" L["Show only those primary stats relevant to your spec."] = "Отображает только те основные характеристики, что подходят вашей текущей специализации." L["SLE_ARMORY_POINTS_AVAILABLE"] = "Очков доступно: %s" +L["Show ElvUI skin's backdrop overlay"] = "Отображать фон скина ElvUI" --AFK L["You Are Away From Keyboard for"] = "Вы отошли на" diff --git a/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua b/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua index 6ee1287..b5648d2 100644 --- a/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua +++ b/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua @@ -604,16 +604,16 @@ function CA:Setup_CharacterArmory() -- Current Artifact Power KF:TextSetting(self.ArtifactMonitor, ARTIFACT_POWER..' : ', { Tag = 'PowerTitle', - Font = E.db.sle.Armory.Character.Enchant.Font, - FontSize = 9, - FontStyle = E.db.sle.Armory.Character.Enchant.FontStyle, + Font = E.db.sle.Armory.Character.Artifact.Font, + FontSize = E.db.sle.Armory.Character.Artifact.FontSize, + FontStyle = E.db.sle.Armory.Character.Artifact.FontStyle, directionH = 'LEFT' }, 'BOTTOMLEFT', self.ArtifactMonitor.BarBorder, 'TOPLEFT', 0, 4 + E.Border) KF:TextSetting(self.ArtifactMonitor, nil, { Tag = 'CurrentPower', - Font = E.db.sle.Armory.Character.Enchant.Font, - FontSize = 9, - FontStyle = E.db.sle.Armory.Character.Enchant.FontStyle, + Font = E.db.sle.Armory.Character.Artifact.Font, + FontSize = E.db.sle.Armory.Character.Artifact.FontSize, + FontStyle = E.db.sle.Armory.Character.Artifact.FontStyle, directionH = 'LEFT' }, 'LEFT', self.ArtifactMonitor.PowerTitle, 'RIGHT', 0, 0) Mixin(self.ArtifactMonitor.CurrentPower, AnimatedNumericFontStringMixin) @@ -621,25 +621,25 @@ function CA:Setup_CharacterArmory() -- Available Artifact Power KF:TextSetting(self.ArtifactMonitor.BarExpected, nil, { Tag = 'AvailablePower', - Font = E.db.sle.Armory.Character.Enchant.Font, - FontSize = 9, - FontStyle = E.db.sle.Armory.Character.Enchant.FontStyle, + Font = E.db.sle.Armory.Character.Artifact.Font, + FontSize = E.db.sle.Armory.Character.Artifact.FontSize, + FontStyle = E.db.sle.Armory.Character.Artifact.FontStyle, directionH = 'LEFT' }, 'TOPRIGHT', self.ArtifactMonitor.BarBorder, 'BOTTOMRIGHT', 0, -1) -- Artifact Traits Rank KF:TextSetting(self.ArtifactMonitor, nil, { Tag = 'TraitRank', - Font = E.db.sle.Armory.Character.Level.Font, - FontSize = 9, - FontStyle = E.db.sle.Armory.Character.Level.FontStyle, + Font = E.db.sle.Armory.Character.Artifact.Font, + FontSize = E.db.sle.Armory.Character.Artifact.FontSize, + FontStyle = E.db.sle.Armory.Character.Artifact.FontStyle, directionH = 'LEFT' }, 'BOTTOMLEFT', self.ArtifactMonitor.PowerTitle, 'TOPLEFT', 0, 3) -- Require Artifact Power KF:TextSetting(self.ArtifactMonitor, nil, { Tag = 'RequirePower', - Font = E.db.sle.Armory.Character.Enchant.Font, - FontSize = 9, - FontStyle = E.db.sle.Armory.Character.Enchant.FontStyle, + Font = E.db.sle.Armory.Character.Artifact.Font, + FontSize = E.db.sle.Armory.Character.Artifact.FontSize, + FontStyle = E.db.sle.Armory.Character.Artifact.FontStyle, directionH = 'RIGHT' }, 'BOTTOM', self.ArtifactMonitor.BarBorder, 'TOP', 0, 4 + E.Border) self.ArtifactMonitor.RequirePower:Point('RIGHT', self.ArtifactMonitor) @@ -647,9 +647,9 @@ function CA:Setup_CharacterArmory() -- Message KF:TextSetting(self.ArtifactMonitor.BarExpected, nil, { Tag = 'Message', - Font = E.db.sle.Armory.Character.Level.Font, - FontSize = 11, - FontStyle = E.db.sle.Armory.Character.Level.FontStyle, + Font = E.db.sle.Armory.Character.Artifact.Font, + FontSize = E.db.sle.Armory.Character.Artifact.FontSize, + FontStyle = E.db.sle.Armory.Character.Artifact.FontStyle, directionH = 'RIGHT' }, 'BOTTOMRIGHT', self.ArtifactMonitor.RequirePower, 'TOPRIGHT', 0, 2) @@ -1255,25 +1255,36 @@ do --<< Artifact Monitor >> if Artifact_ItemID then Legion_ArtifactData.ItemID = Artifact_ItemID Legion_ArtifactData.Rank = Artifact_Rank - Legion_ArtifactData.Power = Artifact_Power + if E.db.sle.Armory.Character.Artifact.ShortValues then + Legion_ArtifactData.Power = E:ShortValue(Artifact_Power) + else + Legion_ArtifactData.Power = Artifact_Power + end Legion_ArtifactData.AvailablePoint, Legion_ArtifactData.XP, Legion_ArtifactData.XPForNextPoint = MainMenuBar_GetNumArtifactTraitsPurchasableFromXP(Artifact_Rank, Artifact_Power) Legion_ArtifactData.RemainXP = Legion_ArtifactData.XPForNextPoint - Legion_ArtifactData.XP + if E.db.sle.Armory.Character.Artifact.ShortValues then Legion_ArtifactData.XPForNextPointShort = E:ShortValue(Legion_ArtifactData.XPForNextPoint) end + self.ArtifactMonitor:Show() if (GetLocale() == "ruRU") then self.ArtifactMonitor.TraitRank:SetText(LEVEL..' : '..COLORSTRING_ARTIFACT..Artifact_Rank) else self.ArtifactMonitor.TraitRank:SetText(RANK..' : '..COLORSTRING_ARTIFACT..Artifact_Rank) end - self.ArtifactMonitor.CurrentPower:SetAnimatedValue(Legion_ArtifactData.Power) - self.ArtifactMonitor.RequirePower:SetText(BreakUpLargeNumbers(Legion_ArtifactData.XPForNextPoint)) - + if E.db.sle.Armory.Character.Artifact.ShortValues then + self.ArtifactMonitor.CurrentPower:SetText(Legion_ArtifactData.Power) + self.ArtifactMonitor.RequirePower:SetText(Legion_ArtifactData.XPForNextPointShort) + else + self.ArtifactMonitor.CurrentPower:SetAnimatedValue(Legion_ArtifactData.Power) + self.ArtifactMonitor.RequirePower:SetText(BreakUpLargeNumbers(Legion_ArtifactData.XPForNextPoint)) + end + if Legion_ArtifactData.AvailablePoint > 0 then self.ArtifactMonitor.BarExpected.Message:SetText(format(L["SLE_ARMORY_POINTS_AVAILABLE"], KF:Color_Value(Legion_ArtifactData.AvailablePoint))) else self.ArtifactMonitor.BarExpected.Message:SetText() end - + self.ArtifactMonitor.Bar:SetAnimatedValues(Legion_ArtifactData.XP, 0, Legion_ArtifactData.XPForNextPoint, Legion_ArtifactData.Rank + Legion_ArtifactData.AvailablePoint) self.ArtifactMonitor.BarExpected:SetMinMaxValues(0, Legion_ArtifactData.XPForNextPoint) else @@ -1353,7 +1364,11 @@ do --<< Artifact Monitor >> self.ArtifactMonitor.AddPower.Button.Link = LowestPower_Link if LowestPower > 0 then - self.ArtifactMonitor.BarExpected.AvailablePower:SetText(KF:Color_Value('+'..BreakUpLargeNumbers(TotalPower))) + if E.db.sle.Armory.Character.Artifact.ShortValues then + self.ArtifactMonitor.BarExpected.AvailablePower:SetText(KF:Color_Value('+'..E:ShortValue(TotalPower))) + else + self.ArtifactMonitor.BarExpected.AvailablePower:SetText(KF:Color_Value('+'..BreakUpLargeNumbers(TotalPower))) + end else self.ArtifactMonitor.BarExpected.AvailablePower:SetText() end @@ -1536,6 +1551,16 @@ function CA:UpdateSettings(part) _G["CharacterArmory"]:Update_Gear() _G["CharacterArmory"]:Update_Display(true) end + if part == "art" or part == "all" then + _G["CharacterArmory"].ArtifactMonitor.TraitRank:FontTemplate(E.LSM:Fetch('font', db.Artifact.Font),db.Artifact.FontSize,db.Artifact.FontStyle) + _G["CharacterArmory"].ArtifactMonitor.PowerTitle:FontTemplate(E.LSM:Fetch('font', db.Artifact.Font),db.Artifact.FontSize,db.Artifact.FontStyle) + _G["CharacterArmory"].ArtifactMonitor.CurrentPower:FontTemplate(E.LSM:Fetch('font', db.Artifact.Font),db.Artifact.FontSize,db.Artifact.FontStyle) + _G["CharacterArmory"].ArtifactMonitor.RequirePower:FontTemplate(E.LSM:Fetch('font', db.Artifact.Font),db.Artifact.FontSize,db.Artifact.FontStyle) + _G["CharacterArmory"].ArtifactMonitor.BarExpected.AvailablePower:FontTemplate(E.LSM:Fetch('font', db.Artifact.Font),db.Artifact.FontSize,db.Artifact.FontStyle) + _G["CharacterArmory"].ArtifactMonitor.BarExpected.Message:FontTemplate(E.LSM:Fetch('font', db.Artifact.Font),db.Artifact.FontSize,db.Artifact.FontStyle) + CA:LegionArtifactMonitor_UpdateData() + CA:LegionArtifactMonitor_SearchPowerItem() + end end function CA:UpdateIlvlFont() @@ -1549,6 +1574,14 @@ function CA:UpdateIlvlFont() end end +function CA:ElvOverlayToggle() + if E.db.sle.Armory.Character.Backdrop.Overlay then + _G["CharacterModelFrameBackgroundOverlay"]:Show() + else + _G["CharacterModelFrameBackgroundOverlay"]:Hide() + end +end + KF.Modules[#KF.Modules + 1] = 'CharacterArmory' KF.Modules.CharacterArmory = function() if E.private.sle.Armory then E.db.sle.Armory.Character.ItemLevel = E.private.sle.Armory.ItemLevel; E.db.sle.Armory.ItemLevel = nil end --DB converts @@ -1609,7 +1642,6 @@ KF.Modules.CharacterArmory = function() ]] _G["CharacterModelFrameBackgroundOverlay"]:SetPoint('TOPLEFT', CharacterArmory, -8, 0) _G["CharacterModelFrameBackgroundOverlay"]:SetPoint('BOTTOMRIGHT', CharacterArmory, 8, 0) - elseif Info.CharacterArmory_Activate then Info.CharacterArmory_Activate = nil @@ -1645,6 +1677,8 @@ KF.Modules.CharacterArmory = function() KF_KnightArmory_NoticeMissing.text:SetTextColor(0.31, 0.31, 0.31) KF_KnightArmory_NoticeMissing.CheckButton:SetTexture('Interface\\Buttons\\UI-CheckBox-Check-Disabled') ]] + _G["CharacterModelFrameBackgroundOverlay"]:SetPoint('TOPLEFT', CharacterModelFrame, 0, 0) + _G["CharacterModelFrameBackgroundOverlay"]:SetPoint('BOTTOMRIGHT', CharacterModelFrame, 0, 0) end if SLE._Compatibility["DejaCharacterStats"] then return end --Resize and reposition god damned ilevel text @@ -1653,4 +1687,5 @@ KF.Modules.CharacterArmory = function() hooksecurefunc("PaperDollFrame_UpdateStats", CA.PaperDollFrame_UpdateStats) -- PaperDollFrame_UpdateStats = CA.PaperDollFrame_UpdateStats() CA:ToggleStats() + CA:ElvOverlayToggle() end \ No newline at end of file diff --git a/ElvUI_SLE/modules/Armory/CharacterArmory/Profile.lua b/ElvUI_SLE/modules/Armory/CharacterArmory/Profile.lua index cc22688..45872b9 100644 --- a/ElvUI_SLE/modules/Armory/CharacterArmory/Profile.lua +++ b/ElvUI_SLE/modules/Armory/CharacterArmory/Profile.lua @@ -19,7 +19,8 @@ P.sle.Armory.Character = { Backdrop = { SelectedBG = 'Space', - CustomAddress = '' + CustomAddress = '', + Overlay = true, }, Gradation = { @@ -56,7 +57,12 @@ P.sle.Armory.Character = { SocketSize = 10, WarningSize = 12 }, - + Artifact = { + Font = "PT Sans Narrow", + FontSize = 9, + FontStyle = "OUTLINE", + ShortValues = true, + }, Stats = { IlvlFull = false, IlvlColor = false, diff --git a/ElvUI_SLE/modules/Armory/Config.lua b/ElvUI_SLE/modules/Armory/Config.lua index 7a6f9c1..1aecc1e 100644 --- a/ElvUI_SLE/modules/Armory/Config.lua +++ b/ElvUI_SLE/modules/Armory/Config.lua @@ -29,6 +29,11 @@ local function LoadArmoryConfigTable() order = 3, childGroups = 'tab', args = { + Credit = { + type = 'header', + name = KF.Credit, + order = 1 + }, EnchantString = { type = 'group', name = L["Enchant String"], @@ -243,7 +248,7 @@ local function LoadArmoryConfigTable() E.Options.args.sle.args.modules.args.Armory.args.CAEnable = { type = 'toggle', name = L["Character Armory"], - order = 1, + order = 2, desc = '', get = function() return E.db.sle.Armory.Character.Enable end, set = function(_, value) E.db.sle.Armory.Character.Enable = value; KF.Modules.CharacterArmory() end @@ -275,7 +280,6 @@ local function LoadArmoryConfigTable() type = 'group', name = STAT_CATEGORY_ATTRIBUTES, order = 3, - guiInline = true, disabled = function() return SLE._Compatibility["DejaCharacterStats"] end, get = function(info) return E.db.sle.Armory.Character.Stats[ info[#info] ] end, set = function(info, value) E.db.sle.Armory.Character.Stats[ info[#info] ] = value; PaperDollFrame_UpdateStats() end, @@ -375,7 +379,6 @@ local function LoadArmoryConfigTable() type = 'group', name = L["Backdrop"], order = 3, - guiInline = true, args = { SelectedBG = { type = 'select', @@ -403,18 +406,20 @@ local function LoadArmoryConfigTable() disabled = function() return E.db.sle.Armory.Character.Enable == false end, hidden = function() return E.db.sle.Armory.Character.Backdrop.SelectedBG ~= 'CUSTOM' end }, + Overlay = { + type = "toggle", + order = 3, + name = L["Overlay"], + desc = L["Show ElvUI skin's backdrop overlay"], + get = function() return E.db.sle.Armory.Character.Backdrop.Overlay end, + set = function(_, value) E.db.sle.Armory.Character.Backdrop.Overlay = value; _G["CharacterArmory"]:ElvOverlayToggle() end + }, } }, - Space2 = { - type = 'description', - name = ' ', - order = 4 - }, Gradation = { type = 'group', name = L["Gradient"], order = 5, - guiInline = true, args = { Display = { type = 'toggle', @@ -439,16 +444,10 @@ local function LoadArmoryConfigTable() }, } }, - Space3 = { - type = 'description', - name = ' ', - order = 6 - }, Level = { type = 'group', name = L["Item Level"], order = 7, - guiInline = true, get = function(info) return E.db.sle.Armory.Character[(info[#info - 1])][(info[#info])] end, set = function(info, value) E.db.sle.Armory.Character[(info[#info - 1])][(info[#info])] = value; _G["CharacterArmory"]:UpdateSettings("ilvl") end, args = { @@ -495,16 +494,10 @@ local function LoadArmoryConfigTable() } } }, - Space4 = { - type = 'description', - name = '', - order = 8 - }, Enchant = { type = 'group', name = L["Enchant String"], order = 9, - guiInline = true, get = function(info) return E.db.sle.Armory.Character[(info[#info - 1])][(info[#info])] end, set = function(info, value) E.db.sle.Armory.Character[(info[#info - 1])][(info[#info])] = value; _G["CharacterArmory"]:UpdateSettings("ench") end, args = { @@ -557,16 +550,10 @@ local function LoadArmoryConfigTable() } } }, - Space5 = { - type = 'description', - name = '', - order = 10 - }, Durability = { type = 'group', name = DURABILITY, order = 11, - guiInline = true, get = function(info) return E.db.sle.Armory.Character[(info[#info - 1])][(info[#info])] end, set = function(info, value) E.db.sle.Armory.Character[(info[#info - 1])][(info[#info])] = value; _G["CharacterArmory"]:UpdateSettings("dur") end, args = { @@ -611,16 +598,10 @@ local function LoadArmoryConfigTable() } } }, - Space6 = { - type = 'description', - name = '', - order = 12 - }, Gem = { type = 'group', name = L["Gem Sockets"], order = 13, - guiInline = true, get = function(Info) return E.db.sle.Armory.Character[(Info[#Info - 1])][(Info[#Info])] end, args = { Display = { @@ -648,16 +629,42 @@ local function LoadArmoryConfigTable() }, } }, - CreditSpace = { - type = 'description', - name = ' ', - order = 998 + Artifact = { + type = 'group', + order = 14, + name = ITEM_QUALITY6_DESC, + get = function(info) return E.db.sle.Armory.Character[(info[#info - 1])][(info[#info])] end, + set = function(info, value) E.db.sle.Armory.Character[(info[#info - 1])][(info[#info])] = value; _G["CharacterArmory"]:UpdateSettings("art") end, + args = { + Font = { + type = 'select', dialogControl = 'LSM30_Font', + name = L["Font"], + order = 1, + values = function() return AceGUIWidgetLSMlists and AceGUIWidgetLSMlists.font or {} end, + disabled = function() return E.db.sle.Armory.Character.Enable == false end + }, + FontSize = { + type = 'range', + name = L["Font Size"], + order = 2, + min = 6, max = 22, step = 1, + disabled = function() return E.db.sle.Armory.Character.Enable == false end + }, + FontStyle = { + type = 'select', + name = L["Font Outline"], + order = 3, + values = FontStyleList, + disabled = function() return E.db.sle.Armory.Character.Enable == false end + }, + ShortValues = { + order = 4, + type = "toggle", + name = L["Short text"], + disabled = function() return E.db.sle.Armory.Character.Enable == false end + }, + }, }, - Credit = { - type = 'header', - name = KF.Credit, - order = 999 - } } } end @@ -671,7 +678,7 @@ local function LoadArmoryConfigTable() E.Options.args.sle.args.modules.args.Armory.args.IAEnable = { type = 'toggle', name = L["Inspect Armory"], - order = 2, + order = 3, get = function() return E.db.sle.Armory.Inspect.Enable end, set = function(_, value) E.db.sle.Armory.Inspect.Enable = value; KF.Modules.InspectArmory() end } @@ -715,7 +722,6 @@ local function LoadArmoryConfigTable() type = 'group', name = L["Backdrop"], order = 3, - guiInline = true, args = { SelectedBG = { type = 'select', @@ -753,16 +759,10 @@ local function LoadArmoryConfigTable() }, } }, - Space2 = { - type = 'description', - name = '', - order = 4 - }, Gradation = { type = 'group', name = L["Gradient"], order = 5, - guiInline = true, args = { Display = { type = 'toggle', @@ -799,16 +799,10 @@ local function LoadArmoryConfigTable() }, } }, - Space3 = { - type = 'description', - name = '', - order = 6 - }, Level = { type = 'group', name = L["Item Level"], order = 7, - guiInline = true, get = function(info) return E.db.sle.Armory.Inspect[(info[#info - 1])][(info[#info])] end, set = function(info, value) E.db.sle.Armory.Inspect[(info[#info - 1])][(info[#info])] = value; _G["InspectArmory"]:UpdateSettings("ilvl") end, args = { @@ -870,16 +864,10 @@ local function LoadArmoryConfigTable() } } }, - Space4 = { - type = 'description', - name = '', - order = 8 - }, Enchant = { type = 'group', name = L["Enchant String"], order = 9, - guiInline = true, get = function(info) return E.db.sle.Armory.Inspect[(info[#info - 1])][(info[#info])] end, set = function(info, value) E.db.sle.Armory.Inspect[(info[#info - 1])][(info[#info])] = value; _G["InspectArmory"]:UpdateSettings("ench") end, args = { @@ -947,16 +935,10 @@ local function LoadArmoryConfigTable() } } }, - Space5 = { - type = 'description', - name = '', - order = 10 - }, Gem = { type = 'group', name = L["Gem Sockets"], order = 11, - guiInline = true, get = function(Info) return E.db.sle.Armory.Inspect[(Info[#Info - 1])][(Info[#Info])] end, set = function(info, value) E.db.sle.Armory.Inspect[(info[#info - 1])][(info[#info])] = value; _G["InspectArmory"]:UpdateSettings("gem") end, args = { @@ -990,16 +972,6 @@ local function LoadArmoryConfigTable() }, } }, - CreditSpace = { - type = 'description', - name = '', - order = 998 - }, - Credit = { - type = 'header', - name = KF.Credit, - order = 999 - } } } end diff --git a/ElvUI_SLE/skins/blizzard/character.lua b/ElvUI_SLE/skins/blizzard/character.lua index 280eacd..6374528 100644 --- a/ElvUI_SLE/skins/blizzard/character.lua +++ b/ElvUI_SLE/skins/blizzard/character.lua @@ -64,6 +64,10 @@ local function LoadSkin() for _, object in T.pairs(charframe) do _G[object]:StripTextures() end + + -- CharacterModelFrameBackgroundOverlay:SetPoint('TOPLEFT', CharacterArmory, -8, 0) + -- CharacterModelFrameBackgroundOverlay:SetPoint('BOTTOMRIGHT', CharacterArmory, 8, 0) + -- CharacterModelFrameBackgroundOverlay:SetSize() end hooksecurefunc(S, "Initialize", LoadSkin) \ No newline at end of file