- added graphical gap settings to combo points, lacerate/sunder/malestrom count, and runes modules

This commit is contained in:
Parnic
2009-01-02 07:37:26 +00:00
parent e979bb9345
commit 6cb944be08
5 changed files with 118 additions and 7 deletions

View File

@ -120,6 +120,26 @@ function ComboPoints.prototype:GetOptions()
order = 33.1
}
opts["comboGap"] = {
type = 'range',
name = 'Combo gap',
desc = 'Spacing between each combo point (only works for graphical mode)',
min = 0,
max = 100,
step = 1,
get = function()
return self.moduleSettings.comboGap
end,
set = function(v)
self.moduleSettings.comboGap = v
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled or self.moduleSettings.comboMode == "Numeric"
end,
order = 33.2
}
opts["gradient"] = {
type = "toggle",
name = "Change color",
@ -152,6 +172,7 @@ function ComboPoints.prototype:GetDefaultSettings()
defaults["usesDogTagStrings"] = false
defaults["alwaysFullAlpha"] = true
defaults["graphicalLayout"] = "Horizontal"
defaults["comboGap"] = 0
return defaults
end
@ -248,9 +269,9 @@ function ComboPoints.prototype:CreateComboFrame(forceTextureUpdate)
self.frame.graphicalBG[i]:SetWidth(self.comboSize)
self.frame.graphicalBG[i]:SetHeight(self.comboSize)
if self.moduleSettings.graphicalLayout == "Horizontal" then
self.frame.graphicalBG[i]:SetPoint("TOPLEFT", (i-1) * (self.comboSize-5) + (i-1), 0)
self.frame.graphicalBG[i]:SetPoint("TOPLEFT", ((i-1) * (self.comboSize-5)) + (i-1) + ((i-1) * self.moduleSettings.comboGap), 0)
else
self.frame.graphicalBG[i]:SetPoint("TOPLEFT", 0, -1 * ((i-1) * (self.comboSize-5) + (i-1)))
self.frame.graphicalBG[i]:SetPoint("TOPLEFT", 0, -1 * (((i-1) * (self.comboSize-5)) + (i-1) + ((i-1) * self.moduleSettings.comboGap)))
end
self.frame.graphicalBG[i]:SetAlpha(0.15)
self.frame.graphicalBG[i]:SetStatusBarColor(self:GetColor("ComboPoints"))

View File

@ -1,6 +1,7 @@
local AceOO = AceLibrary("AceOO-2.0")
local LacerateCount = AceOO.Class(IceElement)
local waterfall = AceLibrary("Waterfall-1.0")
LacerateCount.prototype.lacerateSize = 20
@ -72,6 +73,7 @@ function LacerateCount.prototype:GetOptions()
self.moduleSettings.lacerateMode = v
self:CreateLacerateFrame(true)
self:Redraw()
waterfall:Refresh("IceHUD")
end,
validate = { "Numeric", "Graphical Bar", "Graphical Circle", "Graphical Glow", "Graphical Clean Circle" },
disabled = function()
@ -80,6 +82,26 @@ function LacerateCount.prototype:GetOptions()
order = 33
}
opts["lacerateGap"] = {
type = 'range',
name = 'Lacerate gap',
desc = 'Spacing between each lacerate count (only works for graphical mode)',
min = 0,
max = 100,
step = 1,
get = function()
return self.moduleSettings.lacerateGap
end,
set = function(v)
self.moduleSettings.lacerateGap = v
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled or self.moduleSettings.lacerateMode == "Numeric"
end,
order = 33.2
}
opts["gradient"] = {
type = "toggle",
name = "Change color",
@ -110,6 +132,7 @@ function LacerateCount.prototype:GetDefaultSettings()
defaults["gradient"] = false
defaults["usesDogTagStrings"] = false
defaults["alwaysFullAlpha"] = true
defaults["lacerateGap"] = 0
return defaults
end
@ -194,7 +217,7 @@ function LacerateCount.prototype:CreateLacerateFrame(doTextureUpdate)
self.frame.graphicalBG[i]:SetFrameStrata("BACKGROUND")
self.frame.graphicalBG[i]:SetWidth(self.lacerateSize)
self.frame.graphicalBG[i]:SetHeight(self.lacerateSize)
self.frame.graphicalBG[i]:SetPoint("TOPLEFT", (i-1) * (self.lacerateSize-5) + (i-1), 0)
self.frame.graphicalBG[i]:SetPoint("TOPLEFT", (i-1) * (self.lacerateSize-5) + (i-1) + ((i-1) * self.moduleSettings.lacerateGap), 0)
self.frame.graphicalBG[i]:SetAlpha(0.15)
self.frame.graphicalBG[i]:SetStatusBarColor(self:GetColor("LacerateCount"))

View File

@ -1,6 +1,7 @@
local AceOO = AceLibrary("AceOO-2.0")
local MaelstromCount = AceOO.Class(IceElement)
local waterfall = AceLibrary("Waterfall-1.0")
MaelstromCount.prototype.maelstromSize = 20
@ -72,6 +73,7 @@ function MaelstromCount.prototype:GetOptions()
self.moduleSettings.maelstromMode = v
self:CreateMaelstromFrame(true)
self:Redraw()
waterfall:Refresh("IceHUD")
end,
validate = { "Numeric", "Graphical Bar", "Graphical Circle", "Graphical Glow", "Graphical Clean Circle" },
disabled = function()
@ -80,6 +82,26 @@ function MaelstromCount.prototype:GetOptions()
order = 33
}
opts["maelstromGap"] = {
type = 'range',
name = 'Maelstrom gap',
desc = 'Spacing between each maelstromGap point (only works for graphical mode)',
min = 0,
max = 100,
step = 1,
get = function()
return self.moduleSettings.maelstromGap
end,
set = function(v)
self.moduleSettings.maelstromGap = v
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled or self.moduleSettings.maelstromMode == "Numeric"
end,
order = 33.2
}
opts["gradient"] = {
type = "toggle",
name = "Change color",
@ -110,6 +132,7 @@ function MaelstromCount.prototype:GetDefaultSettings()
defaults["gradient"] = false
defaults["usesDogTagStrings"] = false
defaults["alwaysFullAlpha"] = true
defaults["maelstromGap"] = 0
return defaults
end
@ -189,7 +212,7 @@ function MaelstromCount.prototype:CreateMaelstromFrame(doTextureUpdate)
self.frame.graphicalBG[i]:SetFrameStrata("BACKGROUND")
self.frame.graphicalBG[i]:SetWidth(self.maelstromSize)
self.frame.graphicalBG[i]:SetHeight(self.maelstromSize)
self.frame.graphicalBG[i]:SetPoint("TOPLEFT", (i-1) * (self.maelstromSize-5) + (i-1), 0)
self.frame.graphicalBG[i]:SetPoint("TOPLEFT", (i-1) * (self.maelstromSize-5) + (i-1) + ((i-1) * self.moduleSettings.maelstromGap), 0)
self.frame.graphicalBG[i]:SetAlpha(0.15)
self.frame.graphicalBG[i]:SetStatusBarColor(self:GetColor("MaelstromCount"))

View File

@ -177,6 +177,26 @@ function Runes.prototype:GetOptions()
order = 34
}
]]--
opts["runeGap"] = {
type = 'range',
name = 'Rune gap',
desc = 'Spacing between each rune (only works for graphical mode)',
min = 0,
max = 100,
step = 1,
get = function()
return self.moduleSettings.runeGap
end,
set = function(v)
self.moduleSettings.runeGap = v
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
order = 34.1
}
return opts
end
@ -194,6 +214,7 @@ function Runes.prototype:GetDefaultSettings()
defaults["alwaysFullAlpha"] = false
defaults["displayMode"] = "Horizontal"
defaults["cooldownMode"] = "Cooldown"
defaults["runeGap"] = 0
return defaults
end
@ -346,9 +367,9 @@ function Runes.prototype:CreateRune(i, type, name)
runeSwapI = i
end
if self.moduleSettings.displayMode == "Horizontal" then
self.frame.graphical[i]:SetPoint("TOPLEFT", (runeSwapI-1) * (self.runeSize-5) + (runeSwapI-1), 0)
self.frame.graphical[i]:SetPoint("TOPLEFT", (runeSwapI-1) * (self.runeSize-5) + (runeSwapI-1) + ((runeSwapI-1) * self.moduleSettings.runeGap), 0)
else
self.frame.graphical[i]:SetPoint("TOPLEFT", 0, -1 * ((runeSwapI-1) * (self.runeSize-5) + (runeSwapI-1)))
self.frame.graphical[i]:SetPoint("TOPLEFT", 0, -1 * ((runeSwapI-1) * (self.runeSize-5) + (runeSwapI-1) + ((runeSwapI-1) * self.moduleSettings.runeGap)))
end
self.frame.graphical[i]:SetStatusBarColor(self:GetColor("Runes"..name))

View File

@ -1,6 +1,7 @@
local AceOO = AceLibrary("AceOO-2.0")
local SunderCount = AceOO.Class(IceElement)
local waterfall = AceLibrary("Waterfall-1.0")
SunderCount.prototype.sunderSize = 20
@ -72,6 +73,7 @@ function SunderCount.prototype:GetOptions()
self.moduleSettings.sunderMode = v
self:CreateSunderFrame(true)
self:Redraw()
waterfall:Refresh("IceHUD")
end,
validate = { "Numeric", "Graphical Bar", "Graphical Circle", "Graphical Glow", "Graphical Clean Circle" },
disabled = function()
@ -80,6 +82,26 @@ function SunderCount.prototype:GetOptions()
order = 33
}
opts["sunderGap"] = {
type = 'range',
name = 'Sunder gap',
desc = 'Spacing between each sunder count (only works for graphical mode)',
min = 0,
max = 100,
step = 1,
get = function()
return self.moduleSettings.sunderGap
end,
set = function(v)
self.moduleSettings.sunderGap = v
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled or self.moduleSettings.sunderMode == "Numeric"
end,
order = 33.2
}
opts["gradient"] = {
type = "toggle",
name = "Change color",
@ -110,6 +132,7 @@ function SunderCount.prototype:GetDefaultSettings()
defaults["gradient"] = false
defaults["usesDogTagStrings"] = false
defaults["alwaysFullAlpha"] = true
defaults["sunderGap"] = 0
return defaults
end
@ -194,7 +217,7 @@ function SunderCount.prototype:CreateSunderFrame(doTextureUpdate)
self.frame.graphicalBG[i]:SetFrameStrata("BACKGROUND")
self.frame.graphicalBG[i]:SetWidth(self.sunderSize)
self.frame.graphicalBG[i]:SetHeight(self.sunderSize)
self.frame.graphicalBG[i]:SetPoint("TOPLEFT", (i-1) * (self.sunderSize-5) + (i-1), 0)
self.frame.graphicalBG[i]:SetPoint("TOPLEFT", (i-1) * (self.sunderSize-5) + (i-1) + ((i-1) * self.moduleSettings.sunderGap), 0)
self.frame.graphicalBG[i]:SetAlpha(0.15)
self.frame.graphicalBG[i]:SetStatusBarColor(self:GetColor("SunderCount"))