mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 16:34:45 +00:00
cleanup
This commit is contained in:
@@ -65,9 +65,8 @@ A default texture will be applied to the StatusBar and Texture widgets if they d
|
|||||||
local ns = oUF
|
local ns = oUF
|
||||||
local oUF = ns.oUF
|
local oUF = ns.oUF
|
||||||
|
|
||||||
local match = string.match
|
|
||||||
|
|
||||||
local GetActionTexture = GetActionTexture
|
local GetActionTexture = GetActionTexture
|
||||||
|
local GetContainerItemInfo = GetContainerItemInfo
|
||||||
local GetSpellTexture = GetSpellTexture
|
local GetSpellTexture = GetSpellTexture
|
||||||
local GetTime = GetTime
|
local GetTime = GetTime
|
||||||
|
|
||||||
|
|||||||
@@ -174,15 +174,6 @@ P["nameplates"] = {
|
|||||||
["channelTimeFormat"] = "CURRENT",
|
["channelTimeFormat"] = "CURRENT",
|
||||||
["timeToHold"] = 0
|
["timeToHold"] = 0
|
||||||
},
|
},
|
||||||
["castbar"] = {
|
|
||||||
["enable"] = true,
|
|
||||||
["height"] = 8,
|
|
||||||
["hideTime"] = false,
|
|
||||||
["castTimeFormat"] = "CURRENT",
|
|
||||||
["channelTimeFormat"] = "CURRENT",
|
|
||||||
["timeToHold"] = 0,
|
|
||||||
["iconPosition"] = "RIGHT",
|
|
||||||
},
|
|
||||||
["buffs"] = {
|
["buffs"] = {
|
||||||
["enable"] = true,
|
["enable"] = true,
|
||||||
["numAuras"] = 4,
|
["numAuras"] = 4,
|
||||||
@@ -747,20 +738,15 @@ P["unitframe"] = {
|
|||||||
["width"] = 270,
|
["width"] = 270,
|
||||||
["height"] = 18,
|
["height"] = 18,
|
||||||
["icon"] = true,
|
["icon"] = true,
|
||||||
["latency"] = true,
|
|
||||||
["format"] = "REMAINING",
|
["format"] = "REMAINING",
|
||||||
["ticks"] = true,
|
|
||||||
["spark"] = true,
|
["spark"] = true,
|
||||||
["displayTarget"] = false,
|
|
||||||
["iconSize"] = 42,
|
["iconSize"] = 42,
|
||||||
["iconAttached"] = true,
|
["iconAttached"] = true,
|
||||||
["insideInfoPanel"] = true,
|
["insideInfoPanel"] = true,
|
||||||
["iconAttachedTo"] = "Frame",
|
["iconAttachedTo"] = "Frame",
|
||||||
["iconPosition"] = "LEFT",
|
["iconPosition"] = "LEFT",
|
||||||
["iconXOffset"] = -10,
|
["iconXOffset"] = -10,
|
||||||
["iconYOffset"] = 0,
|
["iconYOffset"] = 0
|
||||||
["tickWidth"] = 1,
|
|
||||||
["tickColor"] = {r = 0, g = 0, b = 0, a = 0.8},
|
|
||||||
},
|
},
|
||||||
["classbar"] = {
|
["classbar"] = {
|
||||||
["enable"] = true,
|
["enable"] = true,
|
||||||
|
|||||||
+34
-86
@@ -640,7 +640,7 @@ local function GetOptionsTable_Auras(friendlyUnitOnly, auraType, isGroupFrame, u
|
|||||||
return config
|
return config
|
||||||
end
|
end
|
||||||
|
|
||||||
local function GetOptionsTable_Castbar(hasTicks, updateFunc, groupName, numUnits)
|
local function GetOptionsTable_Castbar(updateFunc, groupName, numUnits)
|
||||||
local config = {
|
local config = {
|
||||||
order = 800,
|
order = 800,
|
||||||
type = "group",
|
type = "group",
|
||||||
@@ -668,7 +668,7 @@ local function GetOptionsTable_Castbar(hasTicks, updateFunc, groupName, numUnits
|
|||||||
frameName = gsub(frameName, "t(arget)", "T%1")
|
frameName = gsub(frameName, "t(arget)", "T%1")
|
||||||
|
|
||||||
if numUnits then
|
if numUnits then
|
||||||
for i=1, numUnits do
|
for i = 1, numUnits do
|
||||||
local castbar = _G[frameName..i].Castbar
|
local castbar = _G[frameName..i].Castbar
|
||||||
if not castbar.oldHide then
|
if not castbar.oldHide then
|
||||||
castbar.oldHide = castbar.Hide
|
castbar.oldHide = castbar.Hide
|
||||||
@@ -697,59 +697,54 @@ local function GetOptionsTable_Castbar(hasTicks, updateFunc, groupName, numUnits
|
|||||||
},
|
},
|
||||||
configureButton = {
|
configureButton = {
|
||||||
order = 4,
|
order = 4,
|
||||||
|
type = "execute",
|
||||||
name = L["Coloring"],
|
name = L["Coloring"],
|
||||||
desc = L["This opens the UnitFrames Color settings. These settings affect all unitframes."],
|
desc = L["This opens the UnitFrames Color settings. These settings affect all unitframes."],
|
||||||
type = "execute",
|
func = function() ACD:SelectGroup("ElvUI", "unitframe", "generalOptionsGroup", "allColorsGroup", "castBars") end
|
||||||
func = function() ACD:SelectGroup("ElvUI", "unitframe", "generalOptionsGroup", "allColorsGroup", "castBars") end,
|
|
||||||
},
|
},
|
||||||
enable = {
|
enable = {
|
||||||
type = "toggle",
|
|
||||||
order = 5,
|
order = 5,
|
||||||
name = L["Enable"],
|
type = "toggle",
|
||||||
|
name = L["Enable"]
|
||||||
},
|
},
|
||||||
width = {
|
width = {
|
||||||
order = 6,
|
order = 6,
|
||||||
name = L["Width"],
|
|
||||||
type = "range",
|
type = "range",
|
||||||
|
name = L["Width"],
|
||||||
softMax = 600,
|
softMax = 600,
|
||||||
min = 50, max = GetScreenWidth(), step = 1,
|
min = 50, max = GetScreenWidth(), step = 1
|
||||||
},
|
},
|
||||||
height = {
|
height = {
|
||||||
order = 7,
|
order = 7,
|
||||||
name = L["Height"],
|
|
||||||
type = "range",
|
type = "range",
|
||||||
min = 10, max = 85, step = 1,
|
name = L["Height"],
|
||||||
},
|
min = 10, max = 85, step = 1
|
||||||
latency = {
|
|
||||||
order = 8,
|
|
||||||
name = L["Latency"],
|
|
||||||
type = "toggle",
|
|
||||||
},
|
},
|
||||||
format = {
|
format = {
|
||||||
order = 9,
|
order = 8,
|
||||||
type = "select",
|
type = "select",
|
||||||
name = L["Format"],
|
name = L["Format"],
|
||||||
values = {
|
values = {
|
||||||
["CURRENTMAX"] = L["Current / Max"],
|
["CURRENTMAX"] = L["Current / Max"],
|
||||||
["CURRENT"] = L["Current"],
|
["CURRENT"] = L["Current"],
|
||||||
["REMAINING"] = L["Remaining"],
|
["REMAINING"] = L["Remaining"]
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
spark = {
|
spark = {
|
||||||
order = 10,
|
order = 9,
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Spark"],
|
name = L["Spark"],
|
||||||
desc = L["Display a spark texture at the end of the castbar statusbar to help show the differance between castbar and backdrop."],
|
desc = L["Display a spark texture at the end of the castbar statusbar to help show the differance between castbar and backdrop."]
|
||||||
},
|
},
|
||||||
insideInfoPanel = {
|
insideInfoPanel = {
|
||||||
order = 11,
|
order = 10,
|
||||||
|
type = "toggle",
|
||||||
name = L["Inside Information Panel"],
|
name = L["Inside Information Panel"],
|
||||||
desc = L["Display the castbar inside the information panel, the icon will be displayed outside the main unitframe."],
|
desc = L["Display the castbar inside the information panel, the icon will be displayed outside the main unitframe."],
|
||||||
type = "toggle",
|
disabled = function() return not E.db.unitframe.units[groupName].infoPanel or not E.db.unitframe.units[groupName].infoPanel.enable end
|
||||||
disabled = function() return not E.db.unitframe.units[groupName].infoPanel or not E.db.unitframe.units[groupName].infoPanel.enable end,
|
|
||||||
},
|
},
|
||||||
iconSettings = {
|
iconSettings = {
|
||||||
order = 13,
|
order = 11,
|
||||||
type = "group",
|
type = "group",
|
||||||
name = L["Icon"],
|
name = L["Icon"],
|
||||||
guiInline = true,
|
guiInline = true,
|
||||||
@@ -758,22 +753,22 @@ local function GetOptionsTable_Castbar(hasTicks, updateFunc, groupName, numUnits
|
|||||||
args = {
|
args = {
|
||||||
icon = {
|
icon = {
|
||||||
order = 1,
|
order = 1,
|
||||||
name = L["Enable"],
|
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
|
name = L["Enable"]
|
||||||
},
|
},
|
||||||
iconAttached = {
|
iconAttached = {
|
||||||
order = 2,
|
order = 2,
|
||||||
name = L["Icon Inside Castbar"],
|
|
||||||
desc = L["Display the castbar icon inside the castbar."],
|
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
|
name = L["Icon Inside Castbar"],
|
||||||
|
desc = L["Display the castbar icon inside the castbar."]
|
||||||
},
|
},
|
||||||
iconSize = {
|
iconSize = {
|
||||||
order = 3,
|
order = 3,
|
||||||
|
type = "range",
|
||||||
name = L["Icon Size"],
|
name = L["Icon Size"],
|
||||||
desc = L["This dictates the size of the icon when it is not attached to the castbar."],
|
desc = L["This dictates the size of the icon when it is not attached to the castbar."],
|
||||||
type = "range",
|
|
||||||
disabled = function() return E.db.unitframe.units[groupName].castbar.iconAttached end,
|
disabled = function() return E.db.unitframe.units[groupName].castbar.iconAttached end,
|
||||||
min = 8, max = 150, step = 1,
|
min = 8, max = 150, step = 1
|
||||||
},
|
},
|
||||||
iconAttachedTo = {
|
iconAttachedTo = {
|
||||||
order = 4,
|
order = 4,
|
||||||
@@ -782,81 +777,34 @@ local function GetOptionsTable_Castbar(hasTicks, updateFunc, groupName, numUnits
|
|||||||
disabled = function() return E.db.unitframe.units[groupName].castbar.iconAttached end,
|
disabled = function() return E.db.unitframe.units[groupName].castbar.iconAttached end,
|
||||||
values = {
|
values = {
|
||||||
["Frame"] = L["Frame"],
|
["Frame"] = L["Frame"],
|
||||||
["Castbar"] = L["Castbar"],
|
["Castbar"] = L["Castbar"]
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
iconPosition = {
|
iconPosition = {
|
||||||
type = "select",
|
type = "select",
|
||||||
order = 5,
|
order = 5,
|
||||||
name = L["Position"],
|
name = L["Position"],
|
||||||
values = positionValues,
|
values = positionValues,
|
||||||
disabled = function() return E.db.unitframe.units[groupName].castbar.iconAttached end,
|
disabled = function() return E.db.unitframe.units[groupName].castbar.iconAttached end
|
||||||
},
|
},
|
||||||
iconXOffset = {
|
iconXOffset = {
|
||||||
order = 5,
|
order = 5,
|
||||||
type = "range",
|
type = "range",
|
||||||
name = L["xOffset"],
|
name = L["xOffset"],
|
||||||
min = -300, max = 300, step = 1,
|
min = -300, max = 300, step = 1,
|
||||||
disabled = function() return E.db.unitframe.units[groupName].castbar.iconAttached end,
|
disabled = function() return E.db.unitframe.units[groupName].castbar.iconAttached end
|
||||||
},
|
},
|
||||||
iconYOffset = {
|
iconYOffset = {
|
||||||
order = 6,
|
order = 6,
|
||||||
type = "range",
|
type = "range",
|
||||||
name = L["yOffset"],
|
name = L["yOffset"],
|
||||||
min = -300, max = 300, step = 1,
|
min = -300, max = 300, step = 1,
|
||||||
disabled = function() return E.db.unitframe.units[groupName].castbar.iconAttached end,
|
disabled = function() return E.db.unitframe.units[groupName].castbar.iconAttached end
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if hasTicks then
|
|
||||||
config.args.displayTarget = {
|
|
||||||
order = 11,
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Display Target"],
|
|
||||||
desc = L["Display the target of your current cast. Useful for mouseover casts."],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
config.args.ticks = {
|
|
||||||
order = 12,
|
|
||||||
type = "group",
|
|
||||||
guiInline = true,
|
|
||||||
name = L["Ticks"],
|
|
||||||
args = {
|
|
||||||
ticks = {
|
|
||||||
order = 1,
|
|
||||||
type = 'toggle',
|
|
||||||
name = L["Ticks"],
|
|
||||||
desc = L["Display tick marks on the castbar for channelled spells. This will adjust automatically for spells like Drain Soul and add additional ticks based on haste."],
|
|
||||||
},
|
|
||||||
tickColor = {
|
|
||||||
order = 2,
|
|
||||||
type = "color",
|
|
||||||
name = COLOR,
|
|
||||||
hasAlpha = true,
|
|
||||||
get = function(info)
|
|
||||||
local c = E.db.unitframe.units[groupName].castbar.tickColor
|
|
||||||
local d = P.unitframe.units[groupName].castbar.tickColor
|
|
||||||
return c.r, c.g, c.b, c.a, d.r, d.g, d.b, d.a
|
|
||||||
end,
|
|
||||||
set = function(info, r, g, b, a)
|
|
||||||
local c = E.db.unitframe.units[groupName].castbar.tickColor
|
|
||||||
c.r, c.g, c.b, c.a = r, g, b, a
|
|
||||||
updateFunc(UF, groupName, numUnits)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
tickWidth = {
|
|
||||||
order = 3,
|
|
||||||
type = "range",
|
|
||||||
name = L["Width"],
|
|
||||||
min = 1, max = 20, step = 1,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
end
|
|
||||||
|
|
||||||
return config
|
return config
|
||||||
end
|
end
|
||||||
@@ -2735,7 +2683,7 @@ E.Options.args.unitframe.args.player = {
|
|||||||
portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateUF, "player"),
|
portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateUF, "player"),
|
||||||
buffs = GetOptionsTable_Auras(true, "buffs", false, UF.CreateAndUpdateUF, "player"),
|
buffs = GetOptionsTable_Auras(true, "buffs", false, UF.CreateAndUpdateUF, "player"),
|
||||||
debuffs = GetOptionsTable_Auras(true, "debuffs", false, UF.CreateAndUpdateUF, "player"),
|
debuffs = GetOptionsTable_Auras(true, "debuffs", false, UF.CreateAndUpdateUF, "player"),
|
||||||
castbar = GetOptionsTable_Castbar(true, UF.CreateAndUpdateUF, "player"),
|
castbar = GetOptionsTable_Castbar(UF.CreateAndUpdateUF, "player"),
|
||||||
aurabar = GetOptionsTable_AuraBars(true, UF.CreateAndUpdateUF, "player"),
|
aurabar = GetOptionsTable_AuraBars(true, UF.CreateAndUpdateUF, "player"),
|
||||||
raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateUF, "player"),
|
raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateUF, "player"),
|
||||||
classbar = {
|
classbar = {
|
||||||
@@ -3096,7 +3044,7 @@ E.Options.args.unitframe.args.target = {
|
|||||||
portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateUF, "target"),
|
portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateUF, "target"),
|
||||||
--buffs = GetOptionsTable_Auras(false, "buffs", false, UF.CreateAndUpdateUF, "target"),
|
--buffs = GetOptionsTable_Auras(false, "buffs", false, UF.CreateAndUpdateUF, "target"),
|
||||||
--debuffs = GetOptionsTable_Auras(false, "debuffs", false, UF.CreateAndUpdateUF, "target"),
|
--debuffs = GetOptionsTable_Auras(false, "debuffs", false, UF.CreateAndUpdateUF, "target"),
|
||||||
castbar = GetOptionsTable_Castbar(false, UF.CreateAndUpdateUF, "target"),
|
--castbar = GetOptionsTable_Castbar(UF.CreateAndUpdateUF, "target"),
|
||||||
--aurabar = GetOptionsTable_AuraBars(false, UF.CreateAndUpdateUF, "target"),
|
--aurabar = GetOptionsTable_AuraBars(false, UF.CreateAndUpdateUF, "target"),
|
||||||
raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateUF, "target"),
|
raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateUF, "target"),
|
||||||
GPSArrow = GetOptionsTableForNonGroup_GPS("target"),
|
GPSArrow = GetOptionsTableForNonGroup_GPS("target"),
|
||||||
@@ -3646,7 +3594,7 @@ E.Options.args.unitframe.args.pet = {
|
|||||||
portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateUF, "pet"),
|
portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateUF, "pet"),
|
||||||
--buffs = GetOptionsTable_Auras(true, "buffs", false, UF.CreateAndUpdateUF, "pet"),
|
--buffs = GetOptionsTable_Auras(true, "buffs", false, UF.CreateAndUpdateUF, "pet"),
|
||||||
--debuffs = GetOptionsTable_Auras(true, "debuffs", false, UF.CreateAndUpdateUF, "pet"),
|
--debuffs = GetOptionsTable_Auras(true, "debuffs", false, UF.CreateAndUpdateUF, "pet"),
|
||||||
castbar = GetOptionsTable_Castbar(false, UF.CreateAndUpdateUF, "pet"),
|
--castbar = GetOptionsTable_Castbar(UF.CreateAndUpdateUF, "pet"),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user