mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- 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:
@ -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()
|
||||||
|
@ -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"],
|
||||||
|
@ -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"],
|
||||||
|
@ -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"],
|
||||||
|
@ -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"],
|
||||||
|
@ -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"],
|
||||||
|
Reference in New Issue
Block a user