Skip to content

Commit

Permalink
v0.5.135
Browse files Browse the repository at this point in the history
  • Loading branch information
d4kir92 committed Jan 4, 2025
1 parent 67f8f9c commit 8d32a4c
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 12 deletions.
2 changes: 1 addition & 1 deletion DarkMode.toc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Interface-Cata: 40401
## Interface: 110002, 110005, 110007

## Version: 0.5.134
## Version: 0.5.135
## Title: DarkMode by |cff3FC7EBD4KiR |T132115:16:16:0:0|t
## Notes: Improve Any Ui or Frame
## Author: D4KiR
Expand Down
2 changes: 1 addition & 1 deletion DarkMode_Cata.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 40401
## Version: 0.5.134
## Version: 0.5.135
## Title: DarkMode |T136122:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t
## Notes: Improve Any Ui or Frame
## Author: D4KiR
Expand Down
2 changes: 1 addition & 1 deletion DarkMode_TBC.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 20504
## Version: 0.5.134
## Version: 0.5.135
## Title: DarkMode |T136122:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t
## Notes: Improve Any Ui or Frame
## Author: D4KiR
Expand Down
2 changes: 1 addition & 1 deletion DarkMode_Vanilla.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 11505
## Version: 0.5.134
## Version: 0.5.135
## Title: DarkMode |T136122:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t
## Notes: Improve Any Ui or Frame
## Author: D4KiR
Expand Down
2 changes: 1 addition & 1 deletion DarkMode_Wrath.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 30403
## Version: 0.5.134
## Version: 0.5.135
## Title: DarkMode |T136122:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t
## Notes: Improve Any Ui or Frame
## Author: D4KiR
Expand Down
43 changes: 38 additions & 5 deletions core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1453,11 +1453,11 @@ function DarkMode:Event(event, ...)
end
)

if TargetFrameTextureFrame and TargetFrameTextureFrameTexture then
function string:dm_endswith(suffix)
return self:sub(-#suffix) == suffix
end
function string:dm_endswith(suffix)
return self:sub(-#suffix) == suffix
end

if TargetFrameTextureFrame and TargetFrameTextureFrameTexture then
TargetFrameDragon = TargetFrameTextureFrame:CreateTexture("TargetFrameDragon", "BACKGROUND")
TargetFrameDragon:SetSize(256, 128)
TargetFrameDragon:SetPoint("TOPRIGHT", TargetFrameTextureFrame, "TOPRIGHT", 0, 0)
Expand All @@ -1479,6 +1479,39 @@ function DarkMode:Event(event, ...)
end
)
end

if PlayerFrame and PlayerFrameTexture then
local parent = PlayerFrameTexture:GetParent()
if parent then
PlayerFrameDragon = parent:CreateTexture("PlayerFrameDragon", "BORDER")
PlayerFrameDragon:SetTexCoord(1, 0, 0, 1)
PlayerFrameDragon:SetSize(256, 128)
PlayerFrameDragon:SetPoint("TOPLEFT", parent, "TOPLEFT", 0, 0)
PlayerFrameDragon:SetTexture("Interface\\AddOns\\DarkMode\\media\\UI-TargetingFrame-Rare_Dragon")
hooksecurefunc(
PlayerFrameTexture,
"SetTexture",
function(sel, texture)
PlayerFrameDragon:SetDrawLayer("BORDER", 1)
if texture:dm_endswith("UI-TargetingFrame-Rare") or texture:dm_endswith("UI-TargetingFrame-Rare.blp") then
PlayerFrameDragon:SetTexture("Interface\\AddOns\\DarkMode\\media\\UI-TargetingFrame-Rare_Dragon")
elseif texture:dm_endswith("UI-TargetingFrame-Elite") or texture:dm_endswith("UI-TargetingFrame-Elite.blp") then
PlayerFrameDragon:SetTexture("Interface\\AddOns\\DarkMode\\media\\UI-TargetingFrame-Elite_Dragon")
elseif texture:dm_endswith("UI-TargetingFrame-Rare-Elite") or texture:dm_endswith("UI-TargetingFrame-Rare-Elite.blp") then
PlayerFrameDragon:SetTexture("Interface\\AddOns\\DarkMode\\media\\UI-TargetingFrame-Rare-Elite_Dragon")
elseif texture:dm_endswith("Leatrix_Plus-Rare.blp") then
PlayerFrameDragon:SetTexture("Interface\\AddOns\\DarkMode\\media\\UI-TargetingFrame-Rare_Dragon")
elseif texture:dm_endswith("Leatrix_Plus-Elite.blp") then
PlayerFrameDragon:SetTexture("Interface\\AddOns\\DarkMode\\media\\UI-TargetingFrame-Elite_Dragon")
elseif texture:dm_endswith("Leatrix_Plus.blp") then
PlayerFrameDragon:SetTexture("Interface\\AddOns\\DarkMode\\media\\UI-TargetingFrame-Rare-Elite_Dragon")
else
PlayerFrameDragon:SetTexture("")
end
end
)
end
end
end

if DarkMode:IsEnabled("MASKBUFFSANDDEBUFFS", true) then
Expand Down Expand Up @@ -1665,7 +1698,7 @@ function DarkMode:Event(event, ...)
["name"] = "DarkMode",
["icon"] = 136122,
["dbtab"] = DMTAB,
["vTT"] = {{"DarkMode |T136122:16:16:0:0|t", "v|cff3FC7EB0.5.134"}, {DarkMode:Trans("LEFTCLICK"), DarkMode:Trans("MMBTNLEFT")}, {DarkMode:Trans("RIGHTCLICK"), DarkMode:Trans("MMBTNRIGHT")}},
["vTT"] = {{"DarkMode |T136122:16:16:0:0|t", "v|cff3FC7EB0.5.135"}, {DarkMode:Trans("LEFTCLICK"), DarkMode:Trans("MMBTNLEFT")}, {DarkMode:Trans("RIGHTCLICK"), DarkMode:Trans("MMBTNRIGHT")}},
["funcL"] = function()
DarkMode:ToggleSettings()
end,
Expand Down
4 changes: 2 additions & 2 deletions settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,8 @@ function DarkMode:InitDMSettings()
DMSettings:Hide()
end

DarkMode:SetVersion(AddonName, 136122, "0.5.134")
DMSettings.TitleText:SetText(format("DarkMode |T136122:16:16:0:0|t v|cff3FC7EB%s", "0.5.134"))
DarkMode:SetVersion(AddonName, 136122, "0.5.135")
DMSettings.TitleText:SetText(format("DarkMode |T136122:16:16:0:0|t v|cff3FC7EB%s", "0.5.135"))
DMSettings.CloseButton:SetScript(
"OnClick",
function()
Expand Down

0 comments on commit 8d32a4c

Please sign in to comment.