/trunk/AloftOptions/AloftCastBar
local L = AloftLocale.AloftCastBarTimeTextOptions |
if not L then return end |
local AloftCastBar = Aloft:GetModule("CastBar", true) |
if not AloftCastBar then return end |
local AloftCastBarTimeText = Aloft:GetModule("CastBarTimeText", true) |
if not AloftCastBarTimeText then return end |
local AloftCastWarning = Aloft:GetModule("CastWarning", true) |
local SML = LibStub("LibSharedMedia-3.0") |
----------------------------------------------------------------------------- |
type = 'group', |
name = L["Time Text"], |
desc = L["Cast bar time text options"], |
disabled = function(i) return not Aloft:IsEnabled() or not AloftCastBarTimeText:IsEnabled() or not AloftCastBarTimeText.db or not AloftCastBarTimeText.db.profile or not Aloft:GetNameplateCVar("ShowVKeyCastbar") end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftCastBarTimeText:IsEnabled() and AloftCastBarTimeText.db and AloftCastBarTimeText.db.profile) |
end, |
order = -1, |
args = |
{ |
width = 'full', |
name = L["Enable"], |
desc = L["Show cast bar time text"], |
disabled = function(i) return not Aloft:GetNameplateCVar("ShowVKeyCastbar") end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftCastBarTimeText:IsEnabled() and AloftCastBarTimeText.db and AloftCastBarTimeText.db.profile) |
end, |
get = function(i) return AloftCastBarTimeText.db.profile.enable end, |
set = function(i, v) AloftCastBarTimeText.db.profile.enable = v AloftCastBarTimeText:Update() end, |
order = 1 |
type = 'group', |
name = L["Typeface"], |
desc = L["Cast bar time text typeface options"], |
disabled = function(i) return not Aloft:IsEnabled() or not AloftCastBarTimeText:IsEnabled() or not AloftCastBarTimeText.db or not AloftCastBarTimeText.db.profile or not AloftCastBarTimeText.db.profile.enable or not Aloft:GetNameplateCVar("ShowVKeyCastbar") end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftCastBarTimeText:IsEnabled() and AloftCastBarTimeText.db and AloftCastBarTimeText.db.profile and AloftCastBarTimeText.db.profile.enable) |
end, |
args = |
{ |
font = |
width = 'full', |
name = L["Alignment"], |
desc = L["Sets the alignment of the cast bar time text"], |
disabled = function(i) return not AloftCastBarTimeText.db.profile.enable or not Aloft:GetNameplateCVar("ShowVKeyCastbar") end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftCastBarTimeText:IsEnabled() and AloftCastBarTimeText.db and AloftCastBarTimeText.db.profile and AloftCastBarTimeText.db.profile.enable) |
end, |
get = function(i) return AloftCastBarTimeText.db.profile.alignment end, |
set = function(i, value) AloftCastBarTimeText.db.profile.alignment = value AloftCastBarTimeText:Update() end, |
values = {["LEFT"]= L["LEFT"], ["CENTER"]= L["CENTER"], ["RIGHT"]= L["RIGHT"] }, |
type = 'group', |
name = L["Position"], |
desc = L["Adjust cast bar time text position"], |
disabled = function(i) return not Aloft:IsEnabled() or not AloftCastBarTimeText:IsEnabled() or not AloftCastBarTimeText.db or not AloftCastBarTimeText.db.profile or not AloftCastBarTimeText.db.profile.enable or not Aloft:GetNameplateCVar("ShowVKeyCastbar") end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftCastBarTimeText:IsEnabled() and AloftCastBarTimeText.db and AloftCastBarTimeText.db.profile and AloftCastBarTimeText.db.profile.enable) |
end, |
args = |
{ |
left = |
width = 'full', |
name = L["Color"], |
desc = L["Sets the cast bar time text color"], |
disabled = function(i) return not AloftCastBarTimeText.db.profile.enable or not Aloft:GetNameplateCVar("ShowVKeyCastbar") end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftCastBarTimeText:IsEnabled() and AloftCastBarTimeText.db and AloftCastBarTimeText.db.profile and AloftCastBarTimeText.db.profile.enable) |
end, |
get = function(i) return unpack(AloftCastBarTimeText.db.profile.color) end, |
set = function(i, r, g, b, a) AloftCastBarTimeText.db.profile.color = { r, g, b, a } AloftCastBarTimeText:Update() end, |
hasAlpha = true |
local L = AloftLocale.AloftSpellNameTextOptions |
if not L then return end |
local AloftCastBar = Aloft:GetModule("CastBar", true) |
if not AloftCastBar then return end |
local AloftSpellNameText = Aloft:GetModule("SpellNameText", true) |
if not AloftSpellNameText then return end |
local AloftCastWarning = Aloft:GetModule("CastWarning", true) |
local SML = LibStub("LibSharedMedia-3.0") |
----------------------------------------------------------------------------- |
type = 'group', |
name = L["Spell Name"], |
desc = L["Cast bar spell name text options"], |
disabled = function(i) return not Aloft:IsEnabled() or not AloftSpellNameText:IsEnabled() or not AloftSpellNameText.db or not AloftSpellNameText.db.profile or not Aloft:GetNameplateCVar("ShowVKeyCastbar") end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftSpellNameText:IsEnabled() and AloftSpellNameText.db and AloftSpellNameText.db.profile) |
end, |
order = -1, |
args = |
{ |
width = 'full', |
name = L["Enable"], |
desc = L["Show spell name on cast bar"], |
disabled = function(i) return not Aloft:GetNameplateCVar("ShowVKeyCastbar") end, |
get = function(i) return AloftSpellNameText.db.profile.enable end, |
set = function(i, v) AloftSpellNameText.db.profile.enable = v AloftSpellNameText:Update() end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftSpellNameText:IsEnabled() and AloftSpellNameText.db and AloftSpellNameText.db.profile) |
end, |
get = function(i) |
-- ChatFrame7:AddMessage("AloftSpellNameTextOptions:enable.get(): " .. tostring(Aloft:GetNameplateCVar("showVKeyCastbarSpellName"))) |
return Aloft:GetNameplateCVar("showVKeyCastbarSpellName") |
end, |
set = function(i, v) |
Aloft:SetNameplateCVar("showVKeyCastbarSpellName", v) |
ChatFrame7:AddMessage("AloftSpellNameTextOptions:enable.set(): " .. tostring(Aloft:GetNameplateCVar("showVKeyCastbarSpellName"))) |
end, |
order = 1 |
}, |
typeface = |
type = 'group', |
name = L["Typeface"], |
desc = L["Spell name typeface options"], |
disabled = function(i) return not Aloft:IsEnabled() or not AloftSpellNameText:IsEnabled() or not AloftSpellNameText.db or not AloftSpellNameText.db.profile or not AloftSpellNameText.db.profile.enable or not Aloft:GetNameplateCVar("ShowVKeyCastbar") end, |
disabled = function(i) |
--[[ |
ChatFrame7:AddMessage("Aloft.Options.args.castBar.args.spellNameText.args.typeface.disabled(): " .. |
tostring(not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar"))) .. "/" .. |
tostring(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) .. "/" .. |
tostring(not (AloftSpellNameText:IsEnabled() and AloftSpellNameText.db and AloftSpellNameText.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")))) |
]] |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftSpellNameText:IsEnabled() and AloftSpellNameText.db and AloftSpellNameText.db.profile and Aloft:GetNameplateCVar("showVKeyCastbarSpellName")) |
end, |
args = |
{ |
font = |
width = 'full', |
name = L["Alignment"], |
desc = L["Sets the alignment of the spell name"], |
disabled = function(i) return not AloftSpellNameText.db.profile.enable or not Aloft:GetNameplateCVar("ShowVKeyCastbar") end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftSpellNameText:IsEnabled() and AloftSpellNameText.db and AloftSpellNameText.db.profile and Aloft:GetNameplateCVar("showVKeyCastbarSpellName")) |
end, |
get = function(i) return AloftSpellNameText.db.profile.alignment end, |
set = function(i, value) AloftSpellNameText.db.profile.alignment = value AloftSpellNameText:Update() end, |
values = {["LEFT"]= L["LEFT"], ["CENTER"]= L["CENTER"], ["RIGHT"]= L["RIGHT"] }, |
type = 'group', |
name = L["Position"], |
desc = L["Adjust spell name position"], |
disabled = function(i) return not Aloft:IsEnabled() or not AloftSpellNameText:IsEnabled() or not AloftSpellNameText.db or not AloftSpellNameText.db.profile or not AloftSpellNameText.db.profile.enable or not Aloft:GetNameplateCVar("ShowVKeyCastbar") end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftSpellNameText:IsEnabled() and AloftSpellNameText.db and AloftSpellNameText.db.profile and Aloft:GetNameplateCVar("showVKeyCastbarSpellName")) |
end, |
args = |
{ |
left = |
width = 'full', |
name = L["Color"], |
desc = L["Sets the spell name color"], |
disabled = function(i) return not AloftSpellNameText.db.profile.enable or not Aloft:GetNameplateCVar("ShowVKeyCastbar") end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftSpellNameText:IsEnabled() and AloftSpellNameText.db and AloftSpellNameText.db.profile and Aloft:GetNameplateCVar("showVKeyCastbarSpellName")) |
end, |
get = function(i) return unpack(AloftSpellNameText.db.profile.color) end, |
set = function(i, r, g, b, a) AloftSpellNameText.db.profile.color = { r, g, b, a } AloftSpellNameText:Update() end, |
hasAlpha = true |
local L = AloftLocale.AloftSpellIconOptions |
if not L then return end |
local AloftCastBar = Aloft:GetModule("CastBar", true) |
if not AloftCastBar then return end |
local AloftSpellIcon = Aloft:GetModule("SpellIcon", true) |
if not AloftSpellIcon then return end |
local AloftCastWarning = Aloft:GetModule("CastWarning", true) |
local SML = LibStub("LibSharedMedia-3.0") |
----------------------------------------------------------------------------- |
name = L["Spell Icon"], |
desc = L["Spell icon placement options"], |
disabled = function(i) |
-- ChatFrame7:AddMessage("Aloft.Options.args.castBar.args.spellIcon.disabled(): " .. tostring(AloftSpellIcon:IsEnabled()) .. "/" .. tostring(AloftSpellIcon:IsEnabled()) .. "/" .. tostring(AloftSpellIcon.db and AloftSpellIcon.db.profile) .. "/" .. tostring(Aloft:GetNameplateCVar("ShowVKeyCastbar"))) |
return not Aloft:IsEnabled() or not AloftSpellIcon:IsEnabled() or not AloftSpellIcon.db or not AloftSpellIcon.db.profile or not Aloft:GetNameplateCVar("ShowVKeyCastbar") |
end, |
--[[ |
ChatFrame7:AddMessage("Aloft.Options.args.castBar.args.spellIcon.disabled(): " .. |
tostring(not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar"))) .. "/" .. |
tostring(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) .. "/" .. |
tostring(not (AloftSpellIcon:IsEnabled() and AloftSpellIcon.db and AloftSpellIcon.db.profile))) |
]] |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftSpellIcon:IsEnabled() and AloftSpellIcon.db and AloftSpellIcon.db.profile) |
end, |
order = -1, |
args = |
{ |
width = 'full', |
name = L["Enable"], |
desc = L["Enable spell icon display on the nameplate"], |
disabled = function(i) return not Aloft:GetNameplateCVar("ShowVKeyCastbar") end, |
disabled = function(i) |
--[[ |
ChatFrame7:AddMessage("Aloft.Options.args.castBar.args.spellIcon.args.enable.disabled(): " .. |
tostring(not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar"))) .. "/" .. |
tostring(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) .. "/" .. |
tostring(not (AloftSpellIcon:IsEnabled() and AloftSpellIcon.db and AloftSpellIcon.db.profile))) |
]] |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftSpellIcon:IsEnabled() and AloftSpellIcon.db and AloftSpellIcon.db.profile) |
end, |
get = function(i) return AloftSpellIcon.db.profile.enable end, |
set = function(i, v) AloftSpellIcon.db.profile.enable = v AloftSpellIcon:UpdateAll() end, |
order = 1 |
type = 'group', |
name = L["Position"], |
desc = L["Adjust spell icon position"], |
disabled = function(i) return not Aloft:IsEnabled() or not AloftSpellIcon:IsEnabled() or not AloftSpellIcon.db or not AloftSpellIcon.db.profile or not AloftSpellIcon.db.profile.enable or not Aloft:GetNameplateCVar("ShowVKeyCastbar") end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftSpellIcon:IsEnabled() and AloftSpellIcon.db and AloftSpellIcon.db.profile and AloftSpellIcon.db.profile.enable) |
end, |
args = |
{ |
anchor = { |
min = 4, |
max = 32, |
step = 1, |
disabled = function(i) return not AloftSpellIcon.db.profile.enable or not Aloft:GetNameplateCVar("ShowVKeyCastbar") end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftSpellIcon:IsEnabled() and AloftSpellIcon.db and AloftSpellIcon.db.profile and AloftSpellIcon.db.profile.enable) |
end, |
get = function(i) return AloftSpellIcon.db.profile.size end, |
set = function(i, v) AloftSpellIcon.db.profile.size = v AloftSpellIcon:UpdateAll() end |
}, |
width = 'full', |
name = L["Shield"], |
desc = L["Shows a shield graphic around an uninterruptable spell icon"], |
disabled = function(i) return not Aloft:IsEnabled() or not AloftSpellIcon:IsEnabled() or not AloftSpellIcon.db or not AloftSpellIcon.db.profile or not AloftSpellIcon.db.profile.enable or not Aloft:GetNameplateCVar("ShowVKeyCastbar") end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftSpellIcon:IsEnabled() and AloftSpellIcon.db and AloftSpellIcon.db.profile and AloftSpellIcon.db.profile.enable) |
end, |
args = |
{ |
enable = |
name = L["Style"], |
desc = L["Sets the shield graphic style"], |
order = 8, |
disabled = function(i) return not AloftSpellIcon.db.profile.enable or not AloftSpellIcon.db.profile.nointerShield end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftSpellIcon:IsEnabled() and AloftSpellIcon.db and AloftSpellIcon.db.profile and AloftSpellIcon.db.profile.enable and AloftSpellIcon.db.profile.nointerShield) |
end, |
get = function(i) |
for k, v in pairs(Aloft.Options.args.castBar.args.spellIcon.args.shield.args.style.values) do |
if v == AloftSpellIcon.db.profile.nointerStyle then |
min = 1, |
max = 8, |
step = 0.01, |
disabled = function(i) return not AloftSpellIcon.db.profile.enable or not AloftSpellIcon.db.profile.nointerShield end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftSpellIcon:IsEnabled() and AloftSpellIcon.db and AloftSpellIcon.db.profile and AloftSpellIcon.db.profile.enable and AloftSpellIcon.db.profile.nointerShield) |
end, |
get = function(i) return AloftSpellIcon.db.profile.nointerScale end, |
set = function(i, v) AloftSpellIcon.db.profile.nointerScale = v AloftSpellIcon:UpdateAll() end |
}, |
name = L["Color"], |
desc = L["Sets the shield graphic color"], |
order = 1, |
disabled = function(i) return not AloftSpellIcon.db.profile.enable or not AloftSpellIcon.db.profile.nointerShield end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftSpellIcon:IsEnabled() and AloftSpellIcon.db and AloftSpellIcon.db.profile and AloftSpellIcon.db.profile.enable and AloftSpellIcon.db.profile.nointerShield) |
end, |
get = function(i) return unpack(AloftSpellIcon.db.profile.nointerColor) end, |
set = function(i, r, g, b, a) AloftSpellIcon.db.profile.nointerColor = { r, g, b, a } AloftSpellIcon:UpdateAll() end, |
hasAlpha = true, |
min = -32, |
max = 32, |
step = 1, |
disabled = function(i) return not AloftSpellIcon.db.profile.enable or not AloftSpellIcon.db.profile.nointerShield end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftSpellIcon:IsEnabled() and AloftSpellIcon.db and AloftSpellIcon.db.profile and AloftSpellIcon.db.profile.enable and AloftSpellIcon.db.profile.nointerShield) |
end, |
get = function(i) return AloftSpellIcon.db.profile.nointerOffsetX end, |
set = function(i, v) AloftSpellIcon.db.profile.nointerOffsetX = v AloftSpellIcon:UpdateAll() end |
}, |
min = -32, |
max = 32, |
step = 1, |
disabled = function(i) return not AloftSpellIcon.db.profile.enable or not AloftSpellIcon.db.profile.nointerShield end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) or |
not (AloftSpellIcon:IsEnabled() and AloftSpellIcon.db and AloftSpellIcon.db.profile and AloftSpellIcon.db.profile.enable and AloftSpellIcon.db.profile.nointerShield) |
end, |
get = function(i) return AloftSpellIcon.db.profile.nointerOffsetY end, |
set = function(i, v) AloftSpellIcon.db.profile.nointerOffsetY = v AloftSpellIcon:UpdateAll() end |
}, |
local AloftCastBar = Aloft:GetModule("CastBar", true) |
if not AloftCastBar then return end |
local AloftCastWarning = Aloft:GetModule("CastWarning", true) |
local SML = LibStub("LibSharedMedia-3.0") |
----------------------------------------------------------------------------- |
type = 'group', |
name = L["Cast Bar"], |
desc = L["Cast bar options"], |
disabled = function(i) return not Aloft:IsEnabled() or not AloftCastBar:IsEnabled() or not AloftCastBar.db or not AloftCastBar.db.profile end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) |
end, |
args = |
{ |
enable = |
width = 'full', |
name = L["Enable"], |
desc = L["Shows the current target's casting bar"], |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) |
end, |
get = function(i) |
-- ChatFrame7:AddMessage("AloftCastBarOptions:enbable.get(): " .. tostring(Aloft:GetNameplateCVar("ShowVKeyCastbar"))) |
-- ChatFrame7:AddMessage("AloftCastBarOptions:enable.get(): " .. tostring(Aloft:GetNameplateCVar("ShowVKeyCastbar"))) |
return Aloft:GetNameplateCVar("ShowVKeyCastbar") |
end, |
set = function(i, v) |
Aloft:SetNameplateCVar("ShowVKeyCastbar", v) |
-- ChatFrame7:AddMessage("AloftCastBarOptions:enbable.set(): " .. tostring(Aloft:GetNameplateCVar("ShowVKeyCastbar"))) |
-- ChatFrame7:AddMessage("AloftCastBarOptions:enable.set(): " .. tostring(Aloft:GetNameplateCVar("ShowVKeyCastbar"))) |
end, |
order = 1, |
}, |
width = 'full', |
name = L["Incremetal"], |
desc = L["Update incrementally; workaround for malformed borders, only relevant when borders are enabled"], |
disabled = function(i) return not Aloft:IsEnabled() or not AloftCastBar:IsEnabled() or not AloftCastBar.db or not AloftCastBar.db.profile or not Aloft:GetNameplateCVar("ShowVKeyCastbar") end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) |
end, |
get = function(i) return AloftCastBar.db.profile.incremental end, |
set = function(i, v) AloftCastBar.db.profile.incremental = v end, |
order = 2, |
min = 1, |
max = 32, |
step = 1, |
disabled = function(i) return not Aloft:IsEnabled() or not AloftCastBar:IsEnabled() or not AloftCastBar.db or not AloftCastBar.db.profile or not Aloft:GetNameplateCVar("ShowVKeyCastbar") end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) |
end, |
get = function(i) return AloftCastBar.db.profile.height end, |
set = function(i, v) AloftCastBar.db.profile.height = v AloftCastBar:UpdateAll() end, |
order = 3, |
name = L["Position"], |
desc = L["Adjust cast bar position"], |
order = 4, |
disabled = function(i) return not Aloft:IsEnabled() or not AloftCastBar:IsEnabled() or not AloftCastBar.db or not AloftCastBar.db.profile or not Aloft:GetNameplateCVar("ShowVKeyCastbar") end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) |
end, |
args = |
{ |
left = |
type = 'group', |
name = L["Interruptable Cast Bar"], |
desc = L["Cast bar appearance for interruptable spells"], |
disabled = function(i) return not Aloft:IsEnabled() or not AloftCastBar:IsEnabled() or not AloftCastBar.db or not AloftCastBar.db.profile or not Aloft:GetNameplateCVar("ShowVKeyCastbar") end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) |
end, |
order = 5, |
args = |
{ |
type = 'group', |
name = L["Uninterruptable Cast Bar"], |
desc = L["Cast bar appearance for uninterruptable spells"], |
disabled = function(i) return not Aloft:IsEnabled() or not AloftCastBar:IsEnabled() or not AloftCastBar.db or not AloftCastBar.db.profile or not Aloft:GetNameplateCVar("ShowVKeyCastbar") end, |
disabled = function(i) |
return not Aloft:IsEnabled() or not (AloftCastBar:IsEnabled() and AloftCastBar.db and AloftCastBar.db.profile and Aloft:GetNameplateCVar("ShowVKeyCastbar")) or |
(AloftCastWarning and AloftCastWarning:IsEnabled() and AloftCastWarning.db and AloftCastWarning.db.profile and AloftCastWarning.db.profile.enable) |
end, |
order = 6, |
args = |
{ |