Skip to content

Commit

Permalink
Merge pull request #44 from mBlinkii/dev
Browse files Browse the repository at this point in the history
Ver. 2.92.2
  • Loading branch information
mBlinkii authored Jan 22, 2023
2 parents 854d1ab + d797bf8 commit 15fa420
Show file tree
Hide file tree
Showing 15 changed files with 207 additions and 67 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
[Eng] - All changes to this project will be documented in this file. The latest changes are at the top.
[Ger] - Alle Änderungen an diesem Projekt werden in dieser Datei dokumentiert. Die neuesten Änderungen stehen ganz oben.

## [ver. 2.92.2] - 22.01.2023
### Update
- FIX Auto media Color
- FIX Auto Execute marker
- UPDATE Instance difficulty for Minimap add color gardient function and add gardient keys
- UPDATE Instance difficulty for Minimap prevents being taken over by squareminimap
- UPDATE diseable Custom class colore if EltreumUI gardient mode is on
### Added
- NEW Texture R28

## [ver. 2.92.1] - 16.01.2023
### Update
- UPDATE Datatex for the new ElvUI update
Expand Down
2 changes: 1 addition & 1 deletion ElvUI_mMediaTag.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 100002
## Title: |cff1784d1ElvUI|r |CFF8E44ADm|r|CFF2ECC71Media|r|CFF3498DBTag|r
## Author: Blinkii
## Version: 2.92.1
## Version: 2.92.2
## Notes: ElvUI Plugin from Blinkii@Eu-Arygos | Support: mMediaTag@gmx.de
## RequiredDeps: ElvUI
## DefaultState: Enabled
Expand Down
2 changes: 1 addition & 1 deletion ElvUI_mMediaTag_Classic.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 11403
## Title: |cff1784d1ElvUI|r |CFF8E44ADm|r|CFF2ECC71Media|r|CFF3498DBTag|r
## Author: Blinkii
## Version: 2.92.1
## Version: 2.92.2
## Notes: ElvUI Plugin from Blinkii@Eu-Arygos | Support: mMediaTag@gmx.de
## RequiredDeps: ElvUI
## DefaultState: Enabled
Expand Down
2 changes: 1 addition & 1 deletion ElvUI_mMediaTag_Mainline.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 100002
## Title: |cff1784d1ElvUI|r |CFF8E44ADm|r|CFF2ECC71Media|r|CFF3498DBTag|r
## Author: Blinkii
## Version: 2.92.1
## Version: 2.92.2
## Notes: ElvUI Plugin from Blinkii@Eu-Arygos | Support: mMediaTag@gmx.de
## RequiredDeps: ElvUI
## DefaultState: Enabled
Expand Down
2 changes: 1 addition & 1 deletion ElvUI_mMediaTag_Wrath.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 30401
## Title: |cff1784d1ElvUI|r |CFF8E44ADm|r|CFF2ECC71Media|r|CFF3498DBTag|r
## Author: Blinkii
## Version: 2.92.1
## Version: 2.92.2
## Notes: ElvUI Plugin from Blinkii@Eu-Arygos | Support: mMediaTag@gmx.de
## RequiredDeps: ElvUI
## DefaultState: Enabled
Expand Down
10 changes: 9 additions & 1 deletion core/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,20 @@ function mMT:AddOptions()
end
end

function mMT:Check_ElvUI_EltreumUI()
return (IsAddOnLoaded("ElvUI_EltreumUI") and E.db.ElvUI_EltreumUI.unitframes.gradientmode.enable)
end

-- addon laden
function mMT:Initialize()
if E.db[mPlugin].mCustomClassColors.enable then
if E.db[mPlugin].mCustomClassColors.enable and not mMT:Check_ElvUI_EltreumUI() then
mMT:SetCustomColors()
end

if E.db[mPlugin].mCustomClassColors.emediaenable then
mMT:SetElvUIMediaColor()
end

mMT:mMisc() -- module laden

if E.Retail then
Expand Down
4 changes: 2 additions & 2 deletions core/mChangelog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ local format = format

--Variables
local ChangelogText =
"## [ver. 2.92.1] - 16.01.2023\n\n### Update\n- |CFFFF7F50###Update|r Datatex for the new ElvUI update\n- |CFFFF7F50###Update|r Removed some Fonts\n- |CFFFF7F50###Update|r Instance difficulty for Minimap update Shortname function\n- |CFFFF7F50###Update|r Instance difficulty for Minimap update HC color\n\n### Added\n- |CFF6495EDNEW|r Tag mName:last & mName:last:onlyininstance"
"## [ver. 2.92.2] - 22.01.2023\n### Update\n- |CFFDFFF00FIX|r Auto media Color\n- |CFFDFFF00FIX|r Auto Execute marker\n- |CFFFF7F50###Update|r Instance difficulty for Minimap add color gardient function and add gardient keys\n- |CFFFF7F50###Update|r Instance difficulty for Minimap prevents being taken over by squareminimap\n- |CFFFF7F50###Update|r diseable Custom class colore if EltreumUI gardient mode is on\n### Added\n- |CFF6495EDNEW|r Texture R28\n"

function mMT:Changelog(opt)
local Frame = CreateFrame("Frame", "mMediaTagChangelog", E.UIParent, "BackdropTemplate")
Expand Down Expand Up @@ -37,9 +37,9 @@ function mMT:Changelog(opt)
local Label2 = Frame:CreateFontString("ChangelogText", "OVERLAY", "GameTooltipText")
Label2:SetFont(Font, 14)
Label2:SetPoint("TOPLEFT", 20, -90)
Label2:SetText(ChangelogText)
Label2:SetWidth(360)
Label2:SetHeight(500)
Label2:SetText(ChangelogText)

local Close = CreateFrame("Button", "CloseButton", Frame, BackdropTemplateMixin and "BackdropTemplate")
Close:Point("BOTTOM", Frame, "BOTTOM", 0, 10)
Expand Down
16 changes: 16 additions & 0 deletions core/mFunctions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@ function mMT:ColorCheck(value)
end
end

function mMT:ColorFade(colorA, colorB, percent)
local color = {}
if colorA and colorA.r and colorA.g and colorA.b and colorB and colorB.r and colorB.g and colorB.b and percent then
color.r = colorA.r - (colorA.r - colorB.r) * percent
color.g = colorA.g - (colorA.g - colorB.g) * percent
color.b = colorA.b - (colorA.b - colorB.b) * percent
color.color = E:RGBToHex(color.r, color.g, color.b)
return color
elseif colorA and colorA.r and colorA.g and colorA.b then
return colorA
else
print("|CFFE74C3CERROR - mMediaTag - COLORFADE|r")
return nil
end
end

function mMT:mMisc()
if E.db[mPlugin].mMsg then
print(format(L["Welcome to %s version |CFF8E44AD%q|r, for |cff1784d1ElvUI|r!"], ns.mName, ns.mVersion))
Expand Down
13 changes: 6 additions & 7 deletions core/mSettings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ local mPlugin = "mMediaTag"
local addon, ns = ...

P[mPlugin] = {
["mKeystoneDB"] = {},
["mLogKeystone"] = true,
["mMsg"] = true,
["mTIcon"] = true,
["mTIconSize"] = 32,
Expand Down Expand Up @@ -450,14 +448,15 @@ P[mPlugin] = {
},
["mInstanceDifficulty"] = {
["enable"] = false,
["mpe"] = { ["color"] = "|cffff003e", ["r"] = 1, ["g"] = 0, ["b"] = 0.24, },
["mpe"] = { ["color"] = "|cffff8f00", ["r"] = 1, ["g"] = 0, ["b"] = 0, },
["mpf"] = { ["color"] = "|cffff0056", ["r"] = 1, ["g"] = 0, ["b"] = 0.33, },
["hc"] = { ["color"] = "|cff0595ff", ["b"] = 1, ["g"] = 0.58, ["r"] = 0.01, },
["guild"] = { ["color"] = "|cff94ff00", ["r"] = 0.58, ["g"] = 1, ["b"] = 0, },
["tw"] = { ["color"] = "|cff00c0ff", ["r"] = 0, ["g"] = 0.75, ["b"] = 1, },
["mpc"] = { ["color"] = "|cfffff819", ["r"] = 1, ["g"] = 0.97, ["b"] = 0.098, },
["tw"] = { ["color"] = "|cff00c0ff", ["r"] = 0, ["g"] = 0.44, ["b"] = 1, },
["mpc"] = { ["color"] = "|cff0072ff", ["r"] = 1, ["g"] = 0.97, ["b"] = 1, },
["nhc"] = { ["color"] = "|cff52ff76", ["b"] = 0.46, ["g"] = 1, ["r"] = 0.32, },
["mpa"] = { ["color"] = "|cff97ffbd", ["r"] = 0.59, ["g"] = 1, ["b"] = 0.74, },
["mpd"] = { ["color"] = "|cffff8b00", ["r"] = 1, ["g"] = 0.54, ["b"] = 0, },
["mpd"] = { ["color"] = "|cff8800ff", ["r"] = 0.53, ["g"] = 0, ["b"] = 1, },
["m"] = { ["color"] = "|cffaf00ff", ["g"] = 0, ["r"] = 0.68, ["b"] = 1.00, },
["name"] = { ["color"] = "|cffffffff", ["r"] = 1, ["g"] = 1, ["b"] = 1, },
["mp"] = { ["color"] = "|cffff8f00", ["b"] = 0, ["g"] = 0.56, ["r"] = 1, },
Expand All @@ -466,4 +465,4 @@ P[mPlugin] = {
["tg"] = { ["color"] = "|cff5dffb8", ["r"] = 0.36, ["g"] = 1, ["b"] = 0.72, },
["pvp"] = { ["color"] = "|cffeb0056", ["r"] = 0.92, ["g"] = 0, ["b"] = 0.33, },
},
}
}
1 change: 1 addition & 0 deletions media/sharedmedia.lua
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ mAddStatusbar("mMediaTag R25", "r25.tga")
mAddStatusbar("mMediaTag R26", "r26.tga")
mAddStatusbar("mMediaTag R27", "r27.tga")
mAddStatusbar("mMediaTag R28", "r28.tga")
mAddStatusbar("mMediaTag R29", "r29.tga")

mAddStatusbar("mMediaTag Caith UI 1", "Wglass.tga")
mAddStatusbar("mMediaTag Caith UI 2", "Wisps.tga")
Expand Down
Binary file added media/textures/r29.tga
Binary file not shown.
12 changes: 5 additions & 7 deletions misc/mCustomClassColors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ local function ResetColors()
UF:Update_AllFrames()
end

local function SetElvUIMediaColor()
function mMT:SetElvUIMediaColor()
local _, unitClass = UnitClass("PLAYER")
local colorDB = E.db[mPlugin].mCustomClassColors.colors[unitClass]
local colorDB = (E.db[mPlugin].mCustomClassColors.enable and not mMT:Check_ElvUI_EltreumUI()) and E.db[mPlugin].mCustomClassColors.colors[unitClass] or E:ClassColor(E.myclass, true)
E.db.general.valuecolor["r"] = colorDB.r
E.db.general.valuecolor["g"] = colorDB.g
E.db.general.valuecolor["b"] = colorDB.b
Expand Down Expand Up @@ -72,9 +72,6 @@ end
function mMT:SetCustomColors()
UpdateColors()
hooksecurefunc(E, "ClassColor", mClassColor)
if E.db[mPlugin].mCustomClassColors.emediaenable then
SetElvUIMediaColor()
end
end

local function customclasscolorsOptions()
Expand All @@ -101,20 +98,20 @@ local function customclasscolorsOptions()
order = 3,
type = "toggle",
name = L["Change ElvUI Media color"],
disabled = function() return not E.db[mPlugin].mCustomClassColors.enable end,
get = function(info)
return E.db[mPlugin].mCustomClassColors.emediaenable
end,
set = function(info, value)
E.db[mPlugin].mCustomClassColors.emediaenable = value
SetElvUIMediaColor()
mMT:SetElvUIMediaColor()
E:StaticPopup_Show('CONFIG_RL')
end
},
updatecolors = {
order = 4,
type = "execute",
name = L["Set Custom colors"],
desc = L["Set Custom colors"],
disabled = function() return not E.db[mPlugin].mCustomClassColors.enable end,
func = function()
UpdateColors()
Expand All @@ -125,6 +122,7 @@ local function customclasscolorsOptions()
order = 5,
type = "execute",
name = L["Reset Custom colors"],
desc = L["Reset Custom colors"],
func = function()
ResetColors()
E:StaticPopup_Show('CONFIG_RL')
Expand Down
6 changes: 0 additions & 6 deletions misc/mFunctionsRetail.lua
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,6 @@ function mMT:OwenKeystone()
2,
format("%s%s: |r %s%s|r%s +%s|r", other, L["Keystone"], myth, name, E:RGBToHex(r, g, b), keyStoneLevel)
)

--if E.db[mPlugin].mLogKeystone then
-- --E.db[mPlugin].mKeystoneDB =
-- mInsert(E.db[mPlugin].mKeystoneDB, "name", "key")
--end

return OwenKeystoneText
end
end
Expand Down
Loading

0 comments on commit 15fa420

Please sign in to comment.