diff --git a/IceBarElement.lua b/IceBarElement.lua index f5114d1..a74d6ec 100644 --- a/IceBarElement.lua +++ b/IceBarElement.lua @@ -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"] = diff --git a/IceElement.lua b/IceElement.lua index 9318c69..f84624e 100644 --- a/IceElement.lua +++ b/IceElement.lua @@ -171,7 +171,7 @@ function IceElement.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled end, - order = 22 + order = 27.5 } return opts diff --git a/modules/CastBar.lua b/modules/CastBar.lua index 10cbbb4..f8edc75 100644 --- a/modules/CastBar.lua +++ b/modules/CastBar.lua @@ -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, diff --git a/modules/PlayerHealth.lua b/modules/PlayerHealth.lua index f23cea6..7683110 100644 --- a/modules/PlayerHealth.lua +++ b/modules/PlayerHealth.lua @@ -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 diff --git a/modules/Threat.lua b/modules/Threat.lua index 0eac0b9..4aad6a3 100644 --- a/modules/Threat.lua +++ b/modules/Threat.lua @@ -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