From 0d2a18b5b53b83944cff686367b39d63b309f745 Mon Sep 17 00:00:00 2001 From: D4KiR <23246564+d4kir92@users.noreply.github.com> Date: Wed, 10 Jan 2024 16:57:15 +0100 Subject: [PATCH] v0.4.17 --- DarkMode.toc | 2 +- DarkMode_TBC.toc | 2 +- DarkMode_Vanilla.toc | 2 +- DarkMode_Wrath.toc | 2 +- core.lua | 51 ++++++++++++++++++++++++++++++++++++++++++++ data.lua | 2 +- settings.lua | 4 ++-- 7 files changed, 58 insertions(+), 7 deletions(-) diff --git a/DarkMode.toc b/DarkMode.toc index 2b67a15..fda7354 100644 --- a/DarkMode.toc +++ b/DarkMode.toc @@ -3,7 +3,7 @@ ## Interface-Wrath: 30403 ## Interface: 100200 -## Version: 0.4.16 +## Version: 0.4.17 ## Title: DarkMode by |cff3FC7EBD4KiR |T132115:16:16:0:0|t ## Notes: Improve Any Ui or Frame ## Author: D4KiR diff --git a/DarkMode_TBC.toc b/DarkMode_TBC.toc index 16f4c1a..b4fe4b3 100644 --- a/DarkMode_TBC.toc +++ b/DarkMode_TBC.toc @@ -1,5 +1,5 @@ ## Interface: 20504 -## Version: 0.4.16 +## Version: 0.4.17 ## Title: DarkMode |T136122:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t ## Notes: Improve Any Ui or Frame ## Author: D4KiR diff --git a/DarkMode_Vanilla.toc b/DarkMode_Vanilla.toc index 4c69028..d3b067a 100644 --- a/DarkMode_Vanilla.toc +++ b/DarkMode_Vanilla.toc @@ -1,5 +1,5 @@ ## Interface: 11500 -## Version: 0.4.16 +## Version: 0.4.17 ## Title: DarkMode |T136122:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t ## Notes: Improve Any Ui or Frame ## Author: D4KiR diff --git a/DarkMode_Wrath.toc b/DarkMode_Wrath.toc index 2480659..68bcb91 100644 --- a/DarkMode_Wrath.toc +++ b/DarkMode_Wrath.toc @@ -1,5 +1,5 @@ ## Interface: 30403 -## Version: 0.4.16 +## Version: 0.4.17 ## Title: DarkMode |T136122:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t ## Notes: Improve Any Ui or Frame ## Author: D4KiR diff --git a/core.lua b/core.lua index 5db4551..24ab3cf 100644 --- a/core.lua +++ b/core.lua @@ -1040,6 +1040,57 @@ function DarkMode:Event(event, ...) end ) + local chatButtons = { + ["ChatFrame%sButtonFrameBottomButton"] = {0.77, -0.5, 0}, + ["ChatFrame%sButtonFrameDownButton"] = {0.77, -0.5, 0}, + ["ChatFrame%sButtonFrameUpButton"] = {0.77, -0.5, 0}, + } + + local chatSpecialButtons = { + ["ChatFrameMenuButton"] = {0.77, 0, 0}, + ["ChatFrameChannelButton"] = {0.94, 0, 0} + } + + if ChatFrame1ButtonFrameBottomButton then + for i = 1, 10 do + for btnName, btnTab in pairs(chatButtons) do + local btn = _G[format(btnName, i)] + if btn then + local scale = btnTab[1] + local px = btnTab[2] + local py = btnTab[3] + local _, sh = btn:GetSize() + sh = DarkMode:MathR(sh) + btn.border = btn:CreateTexture(btnName .. ".border", "OVERLAY") + local border = btn.border + border:SetDrawLayer("OVERLAY", 3) + border:SetSize(sh * scale, sh * scale) + border:SetTexture("Interface\\AddOns\\DarkMode\\media\\default") + border:SetPoint("CENTER", btn, "CENTER", px, py) + DarkMode:UpdateColor(border, "frame") + end + end + end + + for btnName, btnTab in pairs(chatSpecialButtons) do + local btn = _G[btnName] + if btn then + local scale = btnTab[1] + local px = btnTab[2] + local py = btnTab[3] + local _, sh = btn:GetSize() + sh = DarkMode:MathR(sh) + btn.border = btn:CreateTexture(btnName .. ".border", "OVERLAY") + local border = btn.border + border:SetDrawLayer("OVERLAY", 3) + border:SetSize(sh * scale, sh * scale) + border:SetTexture("Interface\\AddOns\\DarkMode\\media\\default") + border:SetPoint("CENTER", btn, "CENTER", px, py) + DarkMode:UpdateColor(border, "frame") + end + end + end + if DarkMode:GetWoWBuild() ~= "RETAIL" then -- delay for other addons changing C_Timer.After( diff --git a/data.lua b/data.lua index 1592874..a26b6b0 100644 --- a/data.lua +++ b/data.lua @@ -110,7 +110,7 @@ local DMUi = { ["Tooltips"] = {"GameTooltip.NineSlice", "ItemRefTooltip.NineSlice", "ShoppingTooltip1.NineSlice", "ShoppingTooltip2.NineSlice", "WhatsTrainingTooltip.NineSlice"}, ["Artworks"] = {"MainMenuBar.BorderArt", "MainMenuBarTextureExtender", "MainMenuBarTexture0", "MainMenuBarTexture1", "MainMenuBarTexture2", "MainMenuBarTexture3", "MainMenuExpBar", "ReputationWatchBar.StatusBar", "MainStatusTrackingBarContainer.BarFrameTexture", "SecondaryStatusTrackingBarContainer.BarFrameTexture", "MainMenuBarMaxLevelBar", "BT4BarBlizzardArt", "BT4BarBlizzardArt.nineSliceParent", "BlizzardArtLeftCap", "BlizzardArtRightCap", "CompactRaidFrameManager", "CharacterReagentBag0SlotNormalTexture", "CharacterBag0SlotNormalTexture", "CharacterBag1SlotNormalTexture", "CharacterBag2SlotNormalTexture", "CharacterBag3SlotNormalTexture", "MainMenuBarBackpackButtonNormalTexture"}, ["Gryphons"] = {"MA_LeftEndCap", "MA_RightEndCap", "MainMenuBar.EndCaps", "MainMenuBarLeftEndCap", "MainMenuBarRightEndCap"}, - ["Chat"] = {"ChatFrame1Tab", "ChatFrame2Tab", "ChatFrame3Tab", "ChatFrame4Tab", "ChatFrame5Tab", "ChatFrame6Tab", "ChatFrame7Tab", "ChatFrame8Tab", "ChatFrame9Tab", "ChatFrame10Tab",}, + ["Chat"] = {"ChatFrame1EditBox", "ChatFrame1Tab", "ChatFrame2Tab", "ChatFrame3Tab", "ChatFrame4Tab", "ChatFrame5Tab", "ChatFrame6Tab", "ChatFrame7Tab", "ChatFrame8Tab", "ChatFrame9Tab", "ChatFrame10Tab",}, ["Castbar"] = {"CastingBarFrame.Border", "PlayerCastingBarFrame.Background", "PlayerCastingBarFrame.Border", "PlayerCastingBarFrame.TextBorder"} } diff --git a/settings.lua b/settings.lua index b34b690..c33d8c1 100644 --- a/settings.lua +++ b/settings.lua @@ -222,8 +222,8 @@ function DarkMode:InitDMSettings() DMSettings:Hide() end - D4:SetVersion(AddonName, 136122, "0.4.16") - DMSettings.TitleText:SetText(format("DarkMode |T136122:16:16:0:0|t v|cff3FC7EB%s", "0.4.16")) + D4:SetVersion(AddonName, 136122, "0.4.17") + DMSettings.TitleText:SetText(format("DarkMode |T136122:16:16:0:0|t v|cff3FC7EB%s", "0.4.17")) DMSettings.CloseButton:SetScript( "OnClick", function()