Commit f36d92e9 authored by Merathilis's avatar Merathilis

Merge branch 'development'

parents d4479467 1a040f51
[b][color=orange]v3.14[/color], 04.12.2017[/b][list]
[*]Remove detached portrait feature. Let it be Benik's baby <3
[*]Color the mail label in the notifications.
[*]Fix WeakAura skin.[/list]
[b][color=orange]v3.13[/color], 03.12.2017[/b][list]
[*]Add a "EasyChat" function, which allows you to press tab and select a channel.
[*]Account for changes with ElvUI (settings for combat indicator)
......
** v3.14, 04.12.2017**
* Remove detached portrait feature. Let it be Benik's baby <3
* Color the mail label in the notifications.
* Fix WeakAura skin.
** v3.13, 03.12.2017**
* Add a "EasyChat" function, which allows you to press tab and select a channel.
* Account for changes with ElvUI (settings for combat indicator)
......
## Interface: 70300
## Author: Merathilis
## Credits: Benik, Darth Predator, Blazeflack, Azilroka, Simpy, ChaosVoid, fgprodigal, Elv & all AddOn Authors who inspired me.
## Version: 3.13
## Version: 3.14
## Title: |cff1784d1ElvUI|r |cffff7d0aMerathilisUI|r
## Notes: A decorative edit for ElvUI + additional features.
## Notes-deDE: Eine dekorative Erweiterung für ElvUI + einige zusätzliche Funktionen.
......@@ -13,7 +13,7 @@
## SavedVariablesPerCharacter: MERDataPerChar
## OptionalDeps: SharedMedia, AddOnSkins, XIV_Databar, BigWigs
## X-ElvVersion: 10.69
## X-Curse-Packaged-Version: 3.13
## X-Curse-Packaged-Version: 3.14
## X-Curse-Project-Name: MerathilisUI
## X-Curse-Project-ID: merathilis-ui
## X-Tukui-ProjectID: 1
......
......@@ -17,16 +17,13 @@ local CLOSE = CLOSE
local ChangeLogData = {
"Changes:",
"• Add a 'EasyChat' function, which allows you to press tab and select a channel.",
"• Account for changes with ElvUI (settings for combat indicator)",
"• Update the GameMenu. ;)",
"• Remove EncounterJournalInfo. Causes too much errors.",
"• Added more frames to be movable.",
"• Small code adjustments.",
"• Remove detached portrait feature. Let it be Benik's baby <3",
"• Color the mail label in the notifications.",
"• Fix WeakAura skin.",
-- "• ",
" ",
"Notes:",
"• IMPORTANT: 'Remove v1 of my Layout.'",
"• IMPORTANT: 'Removed v1 of my Layout.'",
}
local function ModifiedString(string)
......
......@@ -213,21 +213,13 @@ L["ActionButton Border"] = "Aktionstasten Rand"
-- Unitframes
L["UnitFrames"] = "Einheitenfenster"
L["UnitFrames v1"] = "Einheitenfenster v1"
L["UnitFrames v2"] = "Einheitenfenster v2"
L["Apply shadow under the portrait"] = "Aktiviere den Schatten unter dem Portrait"
L["Apply transparency on the portrait backdrop."] = "Wende Transparenz auf den Portrait Hintergrund an."
L["Change the detached portrait height"] = "Ändert die Höhe des abgetrennten Portrait"
L["Change the detached portrait width"] = "Ändert die Breite des abgetrennten Portrait"
L["Detach Portrait"] = "Abgetrenntes Portrait"
L["Shadow"] = "Schatten"
L["Player Portrait"] = "Spieler Portrait"
L["Target Portrait"] = "Ziel Portrait"
L["Aura Spacing"] = "Auren Abstand"
L["Sets space between individual aura icons."] = "Setzt den Abstand zwischen den individuellen Aurensymbolen."
L["Set Aura Spacing On Following Units"] = "Setzt den Auren Abstand für folgende Einheiten"
L["Assist"] = "Assistent"
L["Boss"] = true;
L["Boss"] = true
L["Focus"] = "Fokus"
L["FocusTarget"] = "Fokus-Ziel"
L["Party"] = "Gruppe"
......
......@@ -212,14 +212,6 @@ L["ActionButton Border"] = true
-- Unitframes
L["UnitFrames"] = true
L["UnitFrames v1"] = true
L["UnitFrames v2"] = true
L["Apply shadow under the portrait"] = true
L["Apply transparency on the portrait backdrop."] = true
L["Change the detached portrait height"] = true
L["Change the detached portrait width"] = true
L["Detach Portrait"] = true
L["Shadow"] = true
L["Player Portrait"] = true
L["Target Portrait"] = true
L["Aura Spacing"] = true
......
......@@ -201,14 +201,6 @@ L["ActionButton Border"] = true
-- Unitframes
L["UnitFrames"] = true
L["UnitFrames v1"] = true
L["UnitFrames v2"] = true
L["Apply shadow under the portrait"] = true
L["Apply transparency on the portrait backdrop."] = true
L["Change the detached portrait height"] = true
L["Change the detached portrait width"] = true
L["Detach Portrait"] = true
L["Shadow"] = true
L["Player Portrait"] = true
L["Target Portrait"] = true
L["Aura Spacing"] = true
......
......@@ -201,14 +201,6 @@ L["ActionButton Border"] = true
-- Unitframes
L["UnitFrames"] = true
L["UnitFrames v1"] = true
L["UnitFrames v2"] = true
L["Apply shadow under the portrait"] = true
L["Apply transparency on the portrait backdrop."] = true
L["Change the detached portrait height"] = true
L["Change the detached portrait width"] = true
L["Detach Portrait"] = true
L["Shadow"] = true
L["Player Portrait"] = true
L["Target Portrait"] = true
L["Aura Spacing"] = true
......
......@@ -201,14 +201,6 @@ L["ActionButton Border"] = true
-- Unitframes
L["UnitFrames"] = true
L["UnitFrames v1"] = true
L["UnitFrames v2"] = true
L["Apply shadow under the portrait"] = true
L["Apply transparency on the portrait backdrop."] = true
L["Change the detached portrait height"] = true
L["Change the detached portrait width"] = true
L["Detach Portrait"] = true
L["Shadow"] = true
L["Player Portrait"] = true
L["Target Portrait"] = true
L["Aura Spacing"] = true
......
......@@ -201,14 +201,6 @@ L["ActionButton Border"] = true
-- Unitframes
L["UnitFrames"] = true
L["UnitFrames v1"] = true
L["UnitFrames v2"] = true
L["Apply shadow under the portrait"] = true
L["Apply transparency on the portrait backdrop."] = true
L["Change the detached portrait height"] = true
L["Change the detached portrait width"] = true
L["Detach Portrait"] = true
L["Shadow"] = true
L["Player Portrait"] = true
L["Target Portrait"] = true
L["Aura Spacing"] = true
......
......@@ -201,14 +201,6 @@ L["ActionButton Border"] = true
-- Unitframes
L["UnitFrames"] = true
L["UnitFrames v1"] = true
L["UnitFrames v2"] = true
L["Apply shadow under the portrait"] = true
L["Apply transparency on the portrait backdrop."] = true
L["Change the detached portrait height"] = true
L["Change the detached portrait width"] = true
L["Detach Portrait"] = true
L["Shadow"] = true
L["Player Portrait"] = true
L["Target Portrait"] = true
L["Aura Spacing"] = true
......
......@@ -201,14 +201,6 @@ L["ActionButton Border"] = true
-- Unitframes
L["UnitFrames"] = true
L["UnitFrames v1"] = true
L["UnitFrames v2"] = true
L["Apply shadow under the portrait"] = true
L["Apply transparency on the portrait backdrop."] = true
L["Change the detached portrait height"] = true
L["Change the detached portrait width"] = true
L["Detach Portrait"] = true
L["Shadow"] = true
L["Player Portrait"] = true
L["Target Portrait"] = true
L["Aura Spacing"] = true
......
......@@ -323,7 +323,7 @@ function NF:UPDATE_PENDING_MAIL()
hasMail = newMail
if hasMail then
PlaySoundFile([[Interface\AddOns\ElvUI_MerathilisUI\media\sounds\mail.mp3]])
self:DisplayToast(MAIL_LABEL, HAVE_MAIL, nil, "Interface\\Icons\\inv_letter_15", .08, .92, .08, .92)
self:DisplayToast(format("|cfff9ba22%s|r", MAIL_LABEL), HAVE_MAIL, nil, "Interface\\Icons\\inv_letter_15", .08, .92, .08, .92)
end
end
end
......
local MER, E, L, V, P, G = unpack(select(2, ...))
local S = E:GetModule("Skins")
-- Cache global variables
-- Lua functions
......@@ -18,10 +19,10 @@ frame:SetScript("OnEvent", function(self, event)
local function SkinWeakAuras(frame, ftype)
if not frame.backdrop then
frame:CreateBackdrop(frame, "Transparent")
frame.icon:SetTexCoord(unpack(E.TexCoords))
frame.icon.SetTexCoord = MER.dummy
if ftype == "icon" then
self:SetBackdropColor(0, 0, 0, 0)
E:RegisterCooldown(frame.cooldown)
frame.backdrop:SetBackdropColor(0, 0, 0, 0)
frame.backdrop:HookScript("OnUpdate", function(self)
self:SetAlpha(self:GetParent().icon:GetAlpha())
end)
......@@ -39,6 +40,9 @@ frame:SetScript("OnEvent", function(self, event)
end
end
local Create_Icon, Modify_Icon = WeakAuras.regionTypes.icon.create, WeakAuras.regionTypes.icon.modify
local Create_AuraBar, Modify_AuraBar = WeakAuras.regionTypes.aurabar.create, WeakAuras.regionTypes.aurabar.modify
local CreateIcon = WeakAuras.regionTypes.icon.create
WeakAuras.regionTypes.icon.create = function(parent, data)
local region = CreateIcon(parent, data)
......@@ -65,11 +69,9 @@ frame:SetScript("OnEvent", function(self, event)
SkinWeakAuras(region, "aurabar")
end
for aura, _ in pairs(WeakAuras.regions) do
local ftype = WeakAuras.regions[aura].regionType
if ftype == "icon" or ftype == "aurabar" then
SkinWeakAuras(WeakAuras.regions[aura].region, ftype)
for weakAura, _ in pairs(WeakAuras.regions) do
if WeakAuras.regions[weakAura].regionType == 'icon' or WeakAuras.regions[weakAura].regionType == 'aurabar' then
SkinWeakAuras(WeakAuras.regions[weakAura].region, WeakAuras.regions[weakAura].regionType)
end
end
end)
\ No newline at end of file
......@@ -3,27 +3,5 @@ local MUF = E:GetModule("muiUnits")
local UF = E:GetModule("UnitFrames")
function MUF:Configure_Infopanel(frame)
if frame.ORIENTATION == "RIGHT" and not (frame.unitframeType == "arena") then
if frame.PORTRAIT_AND_INFOPANEL then
frame.InfoPanel:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -frame.PORTRAIT_WIDTH -frame.BORDER - frame.SPACING, frame.BORDER + frame.SPACING)
else
frame.InfoPanel:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -frame.BORDER - frame.SPACING, frame.BORDER + frame.SPACING)
end
if(frame.USE_POWERBAR and not frame.USE_INSET_POWERBAR and not frame.POWERBAR_DETACHED) then
frame.InfoPanel:SetPoint("TOPLEFT", frame.Power.backdrop, "BOTTOMLEFT", frame.BORDER, -(frame.SPACING*3))
else
frame.InfoPanel:SetPoint("TOPLEFT", frame.Health.backdrop, "BOTTOMLEFT", frame.BORDER, -(frame.SPACING*3))
end
else
if frame.PORTRAIT_AND_INFOPANEL then
frame.InfoPanel:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", frame.PORTRAIT_WIDTH +frame.BORDER + frame.SPACING, frame.BORDER + frame.SPACING)
else
frame.InfoPanel:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", frame.BORDER + frame.SPACING, frame.BORDER + frame.SPACING)
end
if(frame.USE_POWERBAR and not frame.USE_INSET_POWERBAR and not frame.POWERBAR_DETACHED) then
frame.InfoPanel:SetPoint("TOPRIGHT", frame.Power.backdrop, "BOTTOMRIGHT", -frame.BORDER, -(frame.SPACING*3))
else
frame.InfoPanel:SetPoint("TOPRIGHT", frame.Health.backdrop, "BOTTOMRIGHT", -frame.BORDER, -(frame.SPACING*3))
end
end
--
end
\ No newline at end of file
......@@ -14,189 +14,4 @@ function MUF:Configure_Portrait(frame, isPlayer)
local portrait = frame.Portrait
local db = frame.db
if frame.USE_PORTRAIT then
if frame.USE_PORTRAIT_OVERLAY then
if db.portrait.style == "3D" then
portrait:SetFrameLevel(frame.Health:GetFrameLevel())
else
portrait:SetParent(frame.Health)
end
portrait:SetAllPoints(frame.Health)
portrait:SetAlpha(0.3)
portrait.backdrop:Hide()
else
portrait:SetAlpha(1)
portrait.backdrop:ClearAllPoints()
portrait.backdrop:Show()
if db.portrait.style == "3D" then
portrait:SetFrameLevel(frame.Health:GetFrameLevel() -4) --Make sure portrait is behind Health and Power
else
portrait:SetParent(frame)
end
if frame.PORTRAIT_TRANSPARENCY then
portrait.backdrop:SetTemplate("Transparent")
else
portrait.backdrop:SetTemplate('Default', true)
end
if portrait.backdrop.style then
if frame.PORTRAIT_STYLING then
portrait.backdrop.style:ClearAllPoints()
portrait.backdrop.style:Point("TOPLEFT", portrait, "TOPLEFT", (E.PixelMode and -1 or -2), frame.PORTRAIT_STYLING_HEIGHT)
portrait.backdrop.style:Point("BOTTOMRIGHT", portrait, "TOPRIGHT", (E.PixelMode and 1 or 2), (E.PixelMode and 0 or 2))
portrait.backdrop.style:Show()
if isPlayer then
if frame.USE_POWERBAR then
local r, g, b = frame.Power:GetStatusBarColor()
portrait.backdrop.style:SetBackdropColor(r, g, b, (E.db.mui.colors.styleAlpha or 1))
end
end
else
portrait.backdrop.style:Hide()
end
end
if frame.PORTRAIT_DETACHED then
frame.portraitmover:Width(frame.DETACHED_PORTRAIT_WIDTH)
frame.portraitmover:Height(frame.DETACHED_PORTRAIT_HEIGHT)
portrait.backdrop:SetAllPoints(frame.portraitmover)
if portrait.backdrop.shadow then
if frame.PORTRAIT_SHADOW then
portrait.backdrop.shadow:Show()
else
portrait.backdrop.shadow:Hide()
end
end
if db.portrait.style == "3D" then
portrait.backdrop:SetFrameStrata(frame.DETACHED_PORTRAIT_STRATA)
portrait:SetFrameStrata(portrait.backdrop:GetFrameStrata())
end
if not frame.portraitmover.mover then
frame.portraitmover:ClearAllPoints()
if frame.unit == "player" then
frame.portraitmover:Point("TOPRIGHT", frame, "TOPLEFT", -frame.BORDER, 0)
E:CreateMover(frame.portraitmover, "mUIPlayerPortraitMover", L["Player Portrait"], nil, nil, nil, "ALL,SOLO")
elseif frame.unit == "target" then
frame.portraitmover:Point("TOPLEFT", frame, "TOPRIGHT", frame.BORDER, 0)
E:CreateMover(frame.portraitmover, "mUITargetPortraitMover", L["Target Portrait"], nil, nil, nil, "ALL,SOLO")
end
frame.portraitmover:ClearAllPoints()
frame.portraitmover:SetPoint("BOTTOMLEFT", frame.portraitmover.mover, "BOTTOMLEFT")
else
frame.portraitmover:ClearAllPoints()
frame.portraitmover:SetPoint("BOTTOMLEFT", frame.portraitmover.mover, "BOTTOMLEFT")
end
else
portrait:SetAlpha(1)
portrait.backdrop:Show()
if db.portrait.style == '3D' then
portrait.backdrop:SetFrameStrata(frame:GetFrameStrata())
portrait:SetFrameStrata(portrait.backdrop:GetFrameStrata())
portrait:SetFrameLevel(frame.Health:GetFrameLevel() -4) --Make sure portrait is behind Health and Power
end
if frame.ORIENTATION == "LEFT" then
portrait.backdrop:Point("TOPLEFT", frame, "TOPLEFT", frame.SPACING, frame.PORTRAIT_HEIGHT or frame.USE_MINI_CLASSBAR and -(frame.CLASSBAR_YOFFSET+frame.SPACING) or -frame.SPACING)
if frame.PORTRAIT_AND_INFOPANEL then
portrait.backdrop:Point("BOTTOMRIGHT", frame.InfoPanel, "BOTTOMLEFT", - frame.SPACING*3, -frame.BORDER)
elseif frame.USE_MINI_POWERBAR or frame.USE_POWERBAR_OFFSET or not frame.USE_POWERBAR or frame.USE_INSET_POWERBAR or frame.POWERBAR_DETACHED then
portrait.backdrop:Point("BOTTOMRIGHT", frame.Health.backdrop, "BOTTOMLEFT", frame.BORDER - frame.SPACING*3, 0)
else
portrait.backdrop:Point("BOTTOMRIGHT", frame.Power.backdrop, "BOTTOMLEFT", frame.BORDER - frame.SPACING*3, 0)
end
elseif frame.ORIENTATION == "RIGHT" then
portrait.backdrop:Point("TOPRIGHT", frame, "TOPRIGHT", -frame.SPACING, frame.PORTRAIT_HEIGHT or frame.USE_MINI_CLASSBAR and -(frame.CLASSBAR_YOFFSET+frame.SPACING) or -frame.SPACING)
if frame.PORTRAIT_AND_INFOPANEL then
portrait.backdrop:Point("BOTTOMLEFT", frame.InfoPanel, "BOTTOMRIGHT", frame.SPACING*3, -frame.BORDER)
elseif frame.USE_MINI_POWERBAR or frame.USE_POWERBAR_OFFSET or not frame.USE_POWERBAR or frame.USE_INSET_POWERBAR or frame.POWERBAR_DETACHED then
portrait.backdrop:Point("BOTTOMLEFT", frame.Health.backdrop, "BOTTOMRIGHT", -frame.BORDER + frame.SPACING*3, 0)
else
portrait.backdrop:Point("BOTTOMLEFT", frame.Power.backdrop, "BOTTOMRIGHT", -frame.BORDER + frame.SPACING*3, 0)
end
end
end
portrait:SetInside(portrait.backdrop, frame.BORDER)
end
end
end
-- Portrait Alpha setting. Idea: Vxt, Credit: Blazeflack
local function OnConfigure_Portrait(self, frame)
if frame.USE_PORTRAIT then
local portrait = frame.Portrait
if frame.USE_PORTRAIT_OVERLAY then
portrait:SetAlpha(E.db.mui.unitframes.misc.portraitTransparency)
else
portrait:SetAlpha(1)
end
end
end
local function OnPortraitUpdate(self)
local frame = self:GetParent()
local db = frame.db
if not db then return end
if frame.USE_PORTRAIT_OVERLAY then
self:SetAlpha(E.db.mui.unitframes.misc.portraitTransparency)
else
self:SetAlpha(1)
end
end
hooksecurefunc(UF, "Configure_Portrait", OnConfigure_Portrait)
hooksecurefunc(UF, "PortraitUpdate", OnPortraitUpdate)
local function ResetPostUpdate()
for unit, unitName in pairs(UF.units) do
local frameNameUnit = E:StringTitle(unitName)
frameNameUnit = frameNameUnit:gsub("t(arget)", "T%1")
local unitframe = _G['ElvUF_'..frameNameUnit]
if unitframe then
if unitframe.Portrait2D then unitframe.Portrait2D.PostUpdate = UF.PortraitUpdate end
if unitframe.Portrait3D then unitframe.Portrait3D.PostUpdate = UF.PortraitUpdate end
end
end
for unit, unitgroup in pairs(UF.groupunits) do
local frameNameUnit = E:StringTitle(unit)
frameNameUnit = frameNameUnit:gsub('t(arget)', 'T%1')
local unitframe = _G["ElvUF_"..frameNameUnit]
if unitframe then
if unitframe.Portrait2D then unitframe.Portrait2D.PostUpdate = UF.PortraitUpdate end
if unitframe.Portrait3D then unitframe.Portrait3D.PostUpdate = UF.PortraitUpdate end
end
end
for _, header in pairs(UF.headers) do
for i = 1, header:GetNumChildren() do
local group = select(i, header:GetChildren())
--group is Tank/Assist Frames, but for Party/Raid we need to go deeper
if group.Portrait2D then group.Portrait2D.PostUpdate = UF.PortraitUpdate end
if group.Portrait3D then group.Portrait3D.PostUpdate = UF.PortraitUpdate end
for j = 1, group:GetNumChildren() do
--Party/Raid unitbutton
local unitbutton = select(j, group:GetChildren())
if unitbutton.Portrait2D then unitbutton.Portrait2D.PostUpdate = UF.PortraitUpdate end
if unitbutton.Portrait3D then unitbutton.Portrait3D.PostUpdate = UF.PortraitUpdate end
end
end
end
end
local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_ENTERING_WORLD")
f:SetScript("OnEvent", function(self, event)
self:UnregisterEvent(event)
ResetPostUpdate()
end)
\ No newline at end of file
end
\ No newline at end of file
......@@ -220,160 +220,4 @@ local function UnitFramesTable()
},
}
end
tinsert(MER.Config, UnitFramesTable)
local strataValues = {
BACKGROUND = "BACKGROUND",
LOW = "LOW",
MEDIUM = "MEDIUM",
HIGH = "HIGH",
DIALOG = "DIALOG",
TOOLTIP = "TOOLTIP",
}
local function ufPlayerTable()
E.Options.args.unitframe.args.player.args.portrait.args.mui = {
order = 10,
type = "group",
name = MER.Title,
guiInline = true,
get = function(info) return E.db.mui.unitframes.player[ info[#info] ] end,
set = function(info, value) E.db.mui.unitframes.player[ info[#info] ] = value; MUF:ArrangePlayer(); end,
hidden = function() return IsAddOnLoaded("ElvUI_BenikUI") end,
args = {
detachPortrait = {
order = 1,
type = "toggle",
name = L["Detach Portrait"],
set = function(info, value)
E.db.mui.unitframes.player[ info[#info] ] = value;
if value == true then
E.Options.args.unitframe.args.player.args.portrait.args.width.min = 0
E.db.unitframe.units.player.portrait.width = 0
E.db.unitframe.units.player.orientation = "LEFT"
else
E.Options.args.unitframe.args.player.args.portrait.args.width.min = 15
E.db.unitframe.units.player.portrait.width = 45
end
UF:CreateAndUpdateUF("player")
end,
disabled = function() return E.db.unitframe.units.player.portrait.overlay end,
},
portraitTransparent = {
order = 2,
type = "toggle",
name = L["Transparent"],
desc = L["Apply transparency on the portrait backdrop."],
disabled = function() return E.db.unitframe.units.player.portrait.overlay end,
},
portraitShadow = {
order = 3,
type = 'toggle',
name = L["Shadow"],
desc = L["Apply shadow under the portrait"],
disabled = function() return not E.db.mui.unitframes.player.detachPortrait end,
},
portraitWidth = {
order = 4,
type = 'range',
name = L["Width"],
desc = L["Change the detached portrait width"],
disabled = function() return not E.db.mui.unitframes.player.detachPortrait end,
min = 10, max = 500, step = 1,
},
portraitHeight = {
order = 5,
type = "range",
name = L["Height"],
desc = L["Change the detached portrait height"],
disabled = function() return not E.db.mui.unitframes.player.detachPortrait end,
min = 10, max = 250, step = 1,
},
portraitFrameStrata = {
order = 6,
type = "select",
name = L["Frame Strata"],
disabled = function() return not E.db.mui.unitframes.player.detachPortrait end,
values = strataValues,
},
},
}
end
tinsert(MER.Config, ufPlayerTable)
local function ufTargetTable()
E.Options.args.unitframe.args.target.args.portrait.args.mui = {
order = 10,
type = "group",
name = MER.Title,
guiInline = true,
get = function(info) return E.db.mui.unitframes.target[ info[#info] ] end,
set = function(info, value) E.db.mui.unitframes.target[ info[#info] ] = value; MUF:ArrangeTarget(); end,
hidden = function() return IsAddOnLoaded("ElvUI_BenikUI") end,
args = {
detachPortrait = {
order = 1,
type = "toggle",
name = L["Detach Portrait"],
set = function(info, value)
E.db.mui.unitframes.target[ info[#info] ] = value;
if value == true then
E.Options.args.unitframe.args.target.args.portrait.args.width.min = 0
E.db.unitframe.units.target.portrait.width = 0
E.db.unitframe.units.target.orientation = "RIGHT"
else
E.Options.args.unitframe.args.target.args.portrait.args.width.min = 15
E.db.unitframe.units.target.portrait.width = 45
end
UF:CreateAndUpdateUF("target")
end,
disabled = function() return E.db.unitframe.units.target.portrait.overlay end,
},
portraitTransparent = {
order = 2,
type = "toggle",
name = L["Transparent"],
desc = L["Makes the portrait backdrop transparent"],
disabled = function() return E.db.unitframe.units.target.portrait.overlay end,
},
portraitShadow = {
order = 3,
type = "toggle",
name = L["Shadow"],
desc = L["Add shadow under the portrait"],
disabled = function() return not E.db.mui.unitframes.target.detachPortrait end,
},
getPlayerPortraitSize = {
order = 4,
type = "toggle",
name = L["Player Size"],
desc = L["Copy Player portrait width and height"],
disabled = function() return not E.db.mui.unitframes.target.detachPortrait end,
},
portraitWidth = {
order = 5,