- added separate configuration for the "resting" and "combat" portions of the player status icon

- prettified/organized some configuration screens a bit
This commit is contained in:
Parnic
2008-12-02 07:01:47 +00:00
parent f2b2d8d78d
commit 4420d84209
5 changed files with 90 additions and 15 deletions

View File

@ -88,7 +88,12 @@ end
-- OVERRIDE
function IceBarElement.prototype:GetOptions()
local opts = IceBarElement.super.prototype.GetOptions(self)
opts["headerLookAndFeel"] = {
type = 'header',
name = 'Look and Feel',
order = 29.9
}
opts["side"] =
{
type = 'text',
@ -159,6 +164,11 @@ function IceBarElement.prototype:GetOptions()
order = 32
}
opts["headerVisibility"] = {
type = 'header',
name = 'Visibility settings',
order = 27
}
opts["barVisible"] = {
type = 'toggle',
name = 'Bar visible',
@ -201,6 +211,11 @@ function IceBarElement.prototype:GetOptions()
order = 29
}
opts["headerAnimation"] = {
type = 'header',
name = 'Animation settings',
order = 110
}
opts["shouldAnimate"] =
{
type = 'toggle',
@ -215,7 +230,8 @@ function IceBarElement.prototype:GetOptions()
end,
disabled = function()
return not self.moduleSettings.enabled
end
end,
order = 111
}
opts["desiredLerpTime"] =
@ -234,7 +250,8 @@ function IceBarElement.prototype:GetOptions()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.shouldAnimate
end
end,
order = 112
}
opts["widthModifier"] =
@ -254,7 +271,8 @@ function IceBarElement.prototype:GetOptions()
end,
disabled = function()
return not self.moduleSettings.enabled
end
end,
order = 33
}
opts["barVerticalOffset"] =
@ -274,7 +292,8 @@ function IceBarElement.prototype:GetOptions()
end,
disabled = function()
return not self.moduleSettings.enabled
end
end,
order = 34
}
opts["textSettings"] =

View File

@ -171,7 +171,7 @@ function IceElement.prototype:GetOptions()
disabled = function()
return not self.moduleSettings.enabled
end,
order = 22
order = 27.5
}
return opts

View File

@ -78,7 +78,7 @@ function CastBar.prototype:GetOptions()
opts["lagAlpha"] =
{
type = 'range',
name = 'Lag Indicator',
name = 'Lag Indicator alpha',
desc = 'Lag indicator alpha (0 is disabled)',
min = 0,
max = 1,

View File

@ -29,6 +29,8 @@ function PlayerHealth.prototype:GetDefaultSettings()
settings["showStatusIcon"] = true
settings["statusIconOffset"] = {x=110, y=0}
settings["statusIconScale"] = 1
settings["showStatusCombat"] = true
settings["showStatusResting"] = true
settings["showLeaderIcon"] = true
settings["leaderIconOffset"] = {x=135, y=15}
@ -209,10 +211,15 @@ function PlayerHealth.prototype:GetOptions()
order = 6
},
headerStatusIcon = {
type = 'header',
name = "Status icon",
order = 9.9
},
statusIcon = {
type = "toggle",
name = "Show status icon",
desc = "Whether or not to show the status icon (resting/combat) above this bar",
desc = "Whether or not to show the status icon (resting/combat) above this bar\n\nNote: You can configure resting/combat separately below, but disabling both resting and combat is the same as disabling the icon altogether",
get = function()
return self.moduleSettings.showStatusIcon
end,
@ -226,6 +233,40 @@ function PlayerHealth.prototype:GetOptions()
end,
order = 10
},
showStatusCombat = {
type = "toggle",
name = "Show combat status",
desc = "Whether or not to show the combat status portion of the status icon (for example, if you only care when you're resting, not when you're in combat)",
get = function()
return self.moduleSettings.showStatusCombat
end,
set = function(value)
self.moduleSettings.showStatusCombat = value
self:Resting()
self:CheckCombat()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.showStatusIcon
end,
order = 10.1
},
showStatusResting = {
type = "toggle",
name = "Show resting status",
desc = "Whether or not to show the resting status portion of the status icon (for example, if you only care when you're in combat, but not when you're resting)",
get = function()
return self.moduleSettings.showStatusResting
end,
set = function(value)
self.moduleSettings.showStatusResting = value
self:Resting()
self:CheckCombat()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.showStatusIcon
end,
order = 10.2
},
statusIconOffsetX = {
type = "range",
name = "Status Icon Horizontal Offset",
@ -284,6 +325,11 @@ function PlayerHealth.prototype:GetOptions()
order = 13
},
headerLeaderIcon = {
type = 'header',
name = "Leader icon",
order = 19.9
},
leaderIcon = {
type = "toggle",
name = "Show leader icon",
@ -358,6 +404,11 @@ function PlayerHealth.prototype:GetOptions()
order = 23
},
headerLootMasterIcon = {
type = 'header',
name = "Loot Master icon",
order = 29.9
},
lootMasterIcon = {
type = "toggle",
name = "Show loot master icon",
@ -432,6 +483,11 @@ function PlayerHealth.prototype:GetOptions()
order = 33
},
headerPvPIcon = {
type = 'header',
name = "PvP icon",
order = 39.9
},
PvPIcon = {
type = "toggle",
name = "Show PvP icon",
@ -582,11 +638,11 @@ function PlayerHealth.prototype:Resting()
-- moved icon logic above :Update so that it will trigger the alpha settings properly
if (self.resting) then
if self.moduleSettings.showStatusIcon and not self.frame.statusIcon then
if self.moduleSettings.showStatusIcon and self.moduleSettings.showStatusResting and not self.frame.statusIcon then
self.frame.statusIcon = self:CreateTexCoord(self.frame.statusIcon, "Interface\\CharacterFrame\\UI-StateIcon", 20, 20,
self.moduleSettings.statusIconScale, 0.0625, 0.4475, 0.0625, 0.4375)
self:SetTexLoc(self.frame.statusIcon, self.moduleSettings.statusIconOffset['x'], self.moduleSettings.statusIconOffset['y'])
elseif not self.moduleSettings.showStatusIcon and self.frame.statusIcon and not self.combat then
elseif (not self.moduleSettings.showStatusIcon or not self.moduleSettings.showStatusResting) and self.frame.statusIcon and not self.combat then
self.frame.statusIcon = self:DestroyTexFrame(self.frame.statusIcon)
end
else
@ -613,11 +669,11 @@ function PlayerHealth.prototype:CheckCombat()
end
if self.combat or configMode then
if (configMode or self.moduleSettings.showStatusIcon) and not self.frame.statusIcon then
if (configMode or (self.moduleSettings.showStatusIcon and self.moduleSettings.showStatusCombat)) and not self.frame.statusIcon then
self.frame.statusIcon = self:CreateTexCoord(self.frame.statusIcon, "Interface\\CharacterFrame\\UI-StateIcon", 20, 20,
self.moduleSettings.statusIconScale, 0.5625, 0.9375, 0.0625, 0.4375)
self:SetTexLoc(self.frame.statusIcon, self.moduleSettings.statusIconOffset['x'], self.moduleSettings.statusIconOffset['y'])
elseif not configMode and not self.resting and not self.moduleSettings.showStatusIcon and self.frame.statusIcon then
elseif not configMode and not self.resting and (not self.moduleSettings.showStatusIcon or not self.moduleSettings.showStatusCombat) and self.frame.statusIcon then
self.frame.statusIcon = self:DestroyTexFrame(self.frame.statusIcon)
end
else

View File

@ -64,7 +64,7 @@ function IHUD_Threat.prototype:GetOptions()
opts["aggroAlpha"] =
{
type = 'range',
name = 'Aggro Indicator',
name = 'Aggro Indicator alpha',
desc = 'Aggro indicator alpha (0 is disabled)',
min = 0,
max = 1,
@ -79,7 +79,7 @@ function IHUD_Threat.prototype:GetOptions()
disabled = function()
return not self.moduleSettings.enabled
end,
order = 21
order = 27.5
}
opts["onlyShowInGroups"] = {
@ -96,7 +96,7 @@ function IHUD_Threat.prototype:GetOptions()
disabled = function()
return not self.moduleSettings.enabled
end,
order = 22
order = 27.6
}
return opts