- moved all "icons" settings from being under a header to being in their own group. this should unify the "icon settings" features of all modules

This commit is contained in:
Parnic
2010-09-19 06:39:59 +00:00
parent 7646dba873
commit a242f50cb4
4 changed files with 345 additions and 345 deletions

View File

@ -101,97 +101,97 @@ function IceCastBar.prototype:GetOptions()
order = 39.999 order = 39.999
} }
opts["headerIcons"] = { opts["iconSettings"] = {
type = 'header', type = 'group',
name = 'Icons', name = '|c'..self.configColor..'Icon Settings|r',
order = 50 args = {
displayAuraIcon = {
type = 'toggle',
name = "Display aura icon",
desc = "Whether or not to display an icon for the aura that this bar is tracking",
get = function()
return self.moduleSettings.displayAuraIcon
end,
set = function(info, v)
self.moduleSettings.displayAuraIcon = v
if self.barFrame.icon then
if v then
self.barFrame.icon:Show()
else
self.barFrame.icon:Hide()
end
end
end,
disabled = function()
return not self.moduleSettings.enabled
end,
order = 51,
},
auraIconXOffset = {
type = 'range',
min = -250,
max = 250,
step = 1,
name = "Aura icon horizontal offset",
desc = "Adjust the horizontal position of the aura icon",
get = function()
return self.moduleSettings.auraIconXOffset
end,
set = function(info, v)
self.moduleSettings.auraIconXOffset = v
self:PositionIcons()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end,
order = 52,
},
auraIconYOffset = {
type = 'range',
min = -250,
max = 250,
step = 1,
name = "Aura icon vertical offset",
desc = "Adjust the vertical position of the aura icon",
get = function()
return self.moduleSettings.auraIconYOffset
end,
set = function(info, v)
self.moduleSettings.auraIconYOffset = v
self:PositionIcons()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end,
order = 53,
},
auraIconScale = {
type = 'range',
min = 0.1,
max = 3.0,
step = 0.05,
name = 'Aura icon scale',
desc = 'Adjusts the size of the aura icon for this bar',
get = function()
return self.moduleSettings.auraIconScale
end,
set = function(info, v)
self.moduleSettings.auraIconScale = v
self:PositionIcons()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end,
order = 54,
},
},
} }
opts["displayAuraIcon"] = { opts["reverseChannel"] = {
type = 'toggle', type = 'toggle',
name = "Display aura icon",
desc = "Whether or not to display an icon for the aura that this bar is tracking",
get = function()
return self.moduleSettings.displayAuraIcon
end,
set = function(info, v)
self.moduleSettings.displayAuraIcon = v
if self.barFrame.icon then
if v then
self.barFrame.icon:Show()
else
self.barFrame.icon:Hide()
end
end
end,
disabled = function()
return not self.moduleSettings.enabled
end,
order = 51,
}
opts["auraIconXOffset"] = {
type = 'range',
min = -250,
max = 250,
step = 1,
name = "Aura icon horizontal offset",
desc = "Adjust the horizontal position of the aura icon",
get = function()
return self.moduleSettings.auraIconXOffset
end,
set = function(info, v)
self.moduleSettings.auraIconXOffset = v
self:PositionIcons()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end,
order = 52,
}
opts["auraIconYOffset"] = {
type = 'range',
min = -250,
max = 250,
step = 1,
name = "Aura icon vertical offset",
desc = "Adjust the vertical position of the aura icon",
get = function()
return self.moduleSettings.auraIconYOffset
end,
set = function(info, v)
self.moduleSettings.auraIconYOffset = v
self:PositionIcons()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end,
order = 53,
}
opts["auraIconScale"] = {
type = 'range',
min = 0.1,
max = 3.0,
step = 0.05,
name = 'Aura icon scale',
desc = 'Adjusts the size of the aura icon for this bar',
get = function()
return self.moduleSettings.auraIconScale
end,
set = function(info, v)
self.moduleSettings.auraIconScale = v
self:PositionIcons()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end,
order = 54,
}
opts["reverseChannel"] = {
type = 'toggle',
name = "Reverse channeling", name = "Reverse channeling",
desc = "Whether or not to reverse the direction of the cast bar when a spell is being channeled. For example, if a normal cast causes this bar to fill up, then checking this option will cause a channeled spell to empty the bar instead.", desc = "Whether or not to reverse the direction of the cast bar when a spell is being channeled. For example, if a normal cast causes this bar to fill up, then checking this option will cause a channeled spell to empty the bar instead.",
get = function() get = function()
@ -204,7 +204,7 @@ function IceCastBar.prototype:GetOptions()
return not self.moduleSettings.enabled return not self.moduleSettings.enabled
end, end,
order = 32.5, order = 32.5,
} }
return opts return opts
end end

View File

@ -348,93 +348,93 @@ function IceCustomBar.prototype:GetOptions()
order = 31.1, order = 31.1,
} }
opts["headerIcons"] = { opts["iconSettings"] = {
type = 'header', type = 'group',
name = 'Icons', name = '|c'..self.configColor..'Icon Settings|r',
order = 40 args = {
} displayAuraIcon = {
type = 'toggle',
name = "Display aura icon",
desc = "Whether or not to display an icon for the aura that this bar is tracking",
get = function()
return self.moduleSettings.displayAuraIcon
end,
set = function(info, v)
self.moduleSettings.displayAuraIcon = v
if self.barFrame.icon then
if v then
self.barFrame.icon:Show()
else
self.barFrame.icon:Hide()
end
end
end,
disabled = function()
return not self.moduleSettings.enabled
end,
order = 40.1,
},
opts["displayAuraIcon"] = { auraIconXOffset = {
type = 'toggle', type = 'range',
name = "Display aura icon", min = -250,
desc = "Whether or not to display an icon for the aura that this bar is tracking", max = 250,
get = function() step = 1,
return self.moduleSettings.displayAuraIcon name = "Aura icon horizontal offset",
end, desc = "Adjust the horizontal position of the aura icon",
set = function(info, v) get = function()
self.moduleSettings.displayAuraIcon = v return self.moduleSettings.auraIconXOffset
if self.barFrame.icon then end,
if v then set = function(info, v)
self.barFrame.icon:Show() self.moduleSettings.auraIconXOffset = v
else self:PositionIcons()
self.barFrame.icon:Hide() end,
end disabled = function()
end return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end, end,
disabled = function() order = 40.2,
return not self.moduleSettings.enabled },
end,
order = 40.1,
}
opts["auraIconXOffset"] = { auraIconYOffset = {
type = 'range', type = 'range',
min = -250, min = -250,
max = 250, max = 250,
step = 1, step = 1,
name = "Aura icon horizontal offset", name = "Aura icon vertical offset",
desc = "Adjust the horizontal position of the aura icon", desc = "Adjust the vertical position of the aura icon",
get = function() get = function()
return self.moduleSettings.auraIconXOffset return self.moduleSettings.auraIconYOffset
end, end,
set = function(info, v) set = function(info, v)
self.moduleSettings.auraIconXOffset = v self.moduleSettings.auraIconYOffset = v
self:PositionIcons() self:PositionIcons()
end, end,
disabled = function() disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end, end,
order = 40.2, order = 40.3,
} },
opts["auraIconYOffset"] = { auraIconScale = {
type = 'range', type = 'range',
min = -250, min = 0.1,
max = 250, max = 3.0,
step = 1, step = 0.05,
name = "Aura icon vertical offset", name = 'Aura icon scale',
desc = "Adjust the vertical position of the aura icon", desc = 'Adjusts the size of the aura icon for this bar',
get = function() get = function()
return self.moduleSettings.auraIconYOffset return self.moduleSettings.auraIconScale
end, end,
set = function(info, v) set = function(info, v)
self.moduleSettings.auraIconYOffset = v self.moduleSettings.auraIconScale = v
self:PositionIcons() self:PositionIcons()
end, end,
disabled = function() disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end, end,
order = 40.3, order = 40.4,
} },
},
opts["auraIconScale"] = {
type = 'range',
min = 0.1,
max = 3.0,
step = 0.05,
name = 'Aura icon scale',
desc = 'Adjusts the size of the aura icon for this bar',
get = function()
return self.moduleSettings.auraIconScale
end,
set = function(info, v)
self.moduleSettings.auraIconScale = v
self:PositionIcons()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end,
order = 40.4,
} }
return opts return opts

View File

@ -264,87 +264,87 @@ function IceCustomCDBar.prototype:GetOptions()
order = 31.1, order = 31.1,
} }
opts["headerIcons"] = { opts["iconSettings"] = {
type = 'header', type = 'group',
name = 'Icons', name = '|c'..self.configColor..'Icon Settings|r',
order = 40 args = {
} displayAuraIcon = {
type = 'toggle',
name = "Display aura icon",
desc = "Whether or not to display an icon for the aura that this bar is tracking",
get = function()
return self.moduleSettings.displayAuraIcon
end,
set = function(info, v)
self.moduleSettings.displayAuraIcon = v
self:UpdateIcon()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
order = 40.1,
},
opts["displayAuraIcon"] = { auraIconXOffset = {
type = 'toggle', type = 'range',
name = "Display aura icon", min = -250,
desc = "Whether or not to display an icon for the aura that this bar is tracking", max = 250,
get = function() step = 1,
return self.moduleSettings.displayAuraIcon name = "Aura icon horizontal offset",
end, desc = "Adjust the horizontal position of the aura icon",
set = function(info, v) get = function()
self.moduleSettings.displayAuraIcon = v return self.moduleSettings.auraIconXOffset
self:UpdateIcon() end,
end, set = function(info, v)
disabled = function() self.moduleSettings.auraIconXOffset = v
return not self.moduleSettings.enabled self:PositionIcons()
end, end,
order = 40.1, disabled = function()
} return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end,
order = 40.2,
},
opts["auraIconXOffset"] = { auraIconYOffset = {
type = 'range', type = 'range',
min = -250, min = -250,
max = 250, max = 250,
step = 1, step = 1,
name = "Aura icon horizontal offset", name = "Aura icon vertical offset",
desc = "Adjust the horizontal position of the aura icon", desc = "Adjust the vertical position of the aura icon",
get = function() get = function()
return self.moduleSettings.auraIconXOffset return self.moduleSettings.auraIconYOffset
end, end,
set = function(info, v) set = function(info, v)
self.moduleSettings.auraIconXOffset = v self.moduleSettings.auraIconYOffset = v
self:PositionIcons() self:PositionIcons()
end, end,
disabled = function() disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end, end,
order = 40.2, order = 40.3,
} },
opts["auraIconYOffset"] = { auraIconScale = {
type = 'range', type = 'range',
min = -250, min = 0.1,
max = 250, max = 3.0,
step = 1, step = 0.05,
name = "Aura icon vertical offset", name = 'Aura icon scale',
desc = "Adjust the vertical position of the aura icon", desc = 'Adjusts the size of the aura icon for this bar',
get = function() get = function()
return self.moduleSettings.auraIconYOffset return self.moduleSettings.auraIconScale
end, end,
set = function(info, v) set = function(info, v)
self.moduleSettings.auraIconYOffset = v self.moduleSettings.auraIconScale = v
self:PositionIcons() self:PositionIcons()
end, end,
disabled = function() disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end, end,
order = 40.3, order = 40.4,
} },
},
opts["auraIconScale"] = {
type = 'range',
min = 0.1,
max = 3.0,
step = 0.05,
name = 'Aura icon scale',
desc = 'Adjusts the size of the aura icon for this bar',
get = function()
return self.moduleSettings.auraIconScale
end,
set = function(info, v)
self.moduleSettings.auraIconScale = v
self:PositionIcons()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end,
order = 40.4,
} }
return opts return opts

View File

@ -96,104 +96,104 @@ function FocusHealth.prototype:GetOptions()
order = 43 order = 43
} }
opts["headerIcons"] = { opts["iconSettings"] = {
type = 'header', type = 'group',
name = 'Icons', name = '|c'..self.configColor..'Icon Settings|r',
order = 50 args = {
} showRaidIcon = {
type = "toggle",
name = "Show Raid Icon",
desc = "Whether or not to show the raid icon above this bar",
get = function()
return self.moduleSettings.showRaidIcon
end,
set = function(info, value)
self.moduleSettings.showRaidIcon = value
self:UpdateRaidFocusIcon()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
order = 50.1
},
opts["showRaidIcon"] = { lockIconAlpha = {
type = "toggle", type = "toggle",
name = "Show Raid Icon", name = "Lock raid icon to 100% alpha",
desc = "Whether or not to show the raid icon above this bar", desc = "With this enabled, the raid icon is always 100% alpha, regardless of the bar's alpha. Otherwise, it assumes the bar's alpha level.",
get = function() width = 'double',
return self.moduleSettings.showRaidIcon get = function()
end, return self.moduleSettings.lockIconAlpha
set = function(info, value) end,
self.moduleSettings.showRaidIcon = value set = function(info, value)
self:UpdateRaidFocusIcon() self.moduleSettings.lockIconAlpha = value
end, self:Redraw()
disabled = function() end,
return not self.moduleSettings.enabled disabled = function()
end, return not self.moduleSettings.enabled
order = 50.1 end,
} order = 51
},
opts["lockIconAlpha"] = { raidIconOnTop = {
type = "toggle", type = "toggle",
name = "Lock raid icon to 100% alpha", name = "Draw Raid Icon On Top",
desc = "With this enabled, the raid icon is always 100% alpha, regardless of the bar's alpha. Otherwise, it assumes the bar's alpha level.", desc = "Whether to draw the raid icon in front of or behind this bar",
width = 'double', get = function()
get = function() return self.moduleSettings.raidIconOnTop
return self.moduleSettings.lockIconAlpha end,
end, set = function(info, value)
set = function(info, value) self.moduleSettings.raidIconOnTop = value
self.moduleSettings.lockIconAlpha = value self:UpdateRaidFocusIcon()
self:Redraw() end,
end, disabled = function()
disabled = function() return not self.moduleSettings.enabled or not self.moduleSettings.showRaidIcon
return not self.moduleSettings.enabled end,
end, order = 52
order = 51 },
}
opts["raidIconOnTop"] = { raidIconXOffset = {
type = "toggle", type = "range",
name = "Draw Raid Icon On Top", name = "Raid Icon X Offset",
desc = "Whether to draw the raid icon in front of or behind this bar", desc = "How far to push the raid icon right or left",
get = function() min = -300,
return self.moduleSettings.raidIconOnTop max = 300,
end, step = 1,
set = function(info, value) get = function()
self.moduleSettings.raidIconOnTop = value return self.moduleSettings.raidIconXOffset
self:UpdateRaidFocusIcon() end,
end, set = function(info, value)
disabled = function() self.moduleSettings.raidIconXOffset = value
return not self.moduleSettings.enabled or not self.moduleSettings.showRaidIcon self:SetRaidIconPlacement()
end, self:Redraw()
order = 52 end,
} disabled = function()
return not self.moduleSettings.enabled
end,
order = 53
},
opts["raidIconXOffset"] = { raidIconYOffset = {
type = "range", type = "range",
name = "Raid Icon X Offset", name = "Raid Icon Y Offset",
desc = "How far to push the raid icon right or left", desc = "How far to push the raid icon up or down",
min = -300, min = -300,
max = 300, max = 300,
step = 1, step = 1,
get = function() get = function()
return self.moduleSettings.raidIconXOffset return self.moduleSettings.raidIconYOffset
end, end,
set = function(info, value) set = function(info, value)
self.moduleSettings.raidIconXOffset = value self.moduleSettings.raidIconYOffset = value
self:SetRaidIconPlacement() self:SetRaidIconPlacement()
self:Redraw() self:Redraw()
end, end,
disabled = function() disabled = function()
return not self.moduleSettings.enabled return not self.moduleSettings.enabled
end, end,
order = 53 order = 54
} },
},
opts["raidIconYOffset"] = {
type = "range",
name = "Raid Icon Y Offset",
desc = "How far to push the raid icon up or down",
min = -300,
max = 300,
step = 1,
get = function()
return self.moduleSettings.raidIconYOffset
end,
set = function(info, value)
self.moduleSettings.raidIconYOffset = value
self:SetRaidIconPlacement()
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
order = 54
} }
opts["shortenHealth"] = { opts["shortenHealth"] = {