- added description text to each custom module explaining what type of module it is. it was pretty difficult to figure out what kind of custom module you were looking at in the config after you created it

This commit is contained in:
Parnic
2010-10-20 05:08:49 +00:00
parent ef18b488da
commit 0fc23444e2
6 changed files with 51 additions and 0 deletions

View File

@ -116,6 +116,27 @@ function IceElement.prototype:Redraw()
end end
function IceElement.prototype:GetBarTypeDescription(barType)
local pre = "|cff00ff00"
local post = "|r"
local retval = ""
if barType == "CD" then
retval = L["Cooldown"]
elseif barType == "Bar" then
retval = L["(De)Buff watcher"]
elseif barType == "Counter" then
retval = L["Counter"]
elseif barType == "Health" then
retval = HEALTH
elseif barType == "Mana" then
retval = MANA
end
return string.format("%s%s%s", pre, retval, post)
end
-- inheriting classes should override this and provide -- inheriting classes should override this and provide
-- AceOptions table for configuration -- AceOptions table for configuration
function IceElement.prototype:GetOptions() function IceElement.prototype:GetOptions()

View File

@ -175,6 +175,12 @@ function IceCustomBar.prototype:GetOptions()
order = 20.2, order = 20.2,
} }
opts["type"] = {
type = "description",
name = string.format("%s %s", L["Module type:"], tostring(self:GetBarTypeDescription("Bar"))),
order = 21,
}
opts["name"] = { opts["name"] = {
type = 'input', type = 'input',
name = L["Bar name"], name = L["Bar name"],

View File

@ -160,6 +160,12 @@ function IceCustomCDBar.prototype:GetOptions()
order = 20.2, order = 20.2,
} }
opts["type"] = {
type = "description",
name = string.format("%s %s", L["Module type:"], tostring(self:GetBarTypeDescription("CD"))),
order = 21,
}
opts["name"] = { opts["name"] = {
type = 'input', type = 'input',
name = L["Bar name"], name = L["Bar name"],

View File

@ -48,6 +48,12 @@ function IceCustomCount.prototype:GetOptions()
order = 20.2, order = 20.2,
} }
opts["type"] = {
type = "description",
name = string.format("%s %s", L["Module type:"], tostring(self:GetBarTypeDescription("Counter"))),
order = 21,
}
opts["name"] = { opts["name"] = {
type = 'input', type = 'input',
name = L["Counter name"], name = L["Counter name"],

View File

@ -63,6 +63,12 @@ function IceCustomHealth.prototype:GetOptions()
order = 20.2, order = 20.2,
} }
opts["type"] = {
type = "description",
name = string.format("%s %s", L["Module type:"], tostring(self:GetBarTypeDescription("Health"))),
order = 21,
}
opts["name"] = { opts["name"] = {
type = 'input', type = 'input',
name = L["Bar name"], name = L["Bar name"],

View File

@ -64,6 +64,12 @@ function IceCustomMana.prototype:GetOptions()
order = 20.2, order = 20.2,
} }
opts["type"] = {
type = "description",
name = string.format("%s %s", L["Module type:"], tostring(self:GetBarTypeDescription("Mana"))),
order = 21,
}
opts["name"] = { opts["name"] = {
type = 'input', type = 'input',
name = L["Bar name"], name = L["Bar name"],