diff --git a/IceBarElement.lua b/IceBarElement.lua index 13fa948..042e521 100644 --- a/IceBarElement.lua +++ b/IceBarElement.lua @@ -112,7 +112,7 @@ function IceBarElement.prototype:GetOptions() opts["side"] = { type = 'select', - name = '|c' .. self.configColor .. 'Side|r', + name = 'Side|r', desc = 'Side of the HUD where the bar appears', get = function(info) if (self.moduleSettings.side == IceCore.Side.Right) then @@ -139,7 +139,7 @@ function IceBarElement.prototype:GetOptions() opts["offset"] = { type = 'range', - name = '|c' .. self.configColor .. 'Offset|r', + name = 'Offset', desc = 'Offset of the bar', min = -10, max = 15, @@ -154,13 +154,13 @@ function IceBarElement.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled end, - order = 31 + order = 30.01 } opts["scale"] = { type = 'range', - name = '|c' .. self.configColor .. 'Scale|r', + name = 'Scale', desc = 'Scale of the bar', min = 0.1, max = 2, @@ -176,7 +176,7 @@ function IceBarElement.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled end, - order = 32 + order = 30.02 } opts["inverse"] = @@ -195,7 +195,7 @@ function IceBarElement.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled end, - order = 32 + order = 30.03 } opts["reverse"] = @@ -214,14 +214,9 @@ function IceBarElement.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled end, - order = 32 + order = 30.04 } - opts["headerVisibility"] = { - type = 'header', - name = 'Visibility settings', - order = 27 - } opts["barVisible"] = { type = 'toggle', name = 'Bar visible', @@ -266,13 +261,13 @@ function IceBarElement.prototype:GetOptions() if not self.moduleSettings.hideAnimationSettings then opts["headerAnimation"] = { type = 'header', - name = 'Animation settings', + name = 'Animation Settings', order = 110 } opts["shouldAnimate"] = { type = 'toggle', - name = '|c' .. self.configColor .. 'Animate amount changes|r', + name = 'Animate changes', desc = 'Whether or not to animate the bar falloffs/gains', get = function() return self.moduleSettings.shouldAnimate @@ -290,7 +285,7 @@ if not self.moduleSettings.hideAnimationSettings then opts["desiredLerpTime"] = { type = 'range', - name = '|c' .. self.configColor .. 'Animation Duration|r', + name = 'Animation Duration', desc = 'How long the animation should take to play', min = 0, max = 2, @@ -311,7 +306,7 @@ end opts["widthModifier"] = { type = 'range', - name = '|c' .. self.configColor .. 'Bar width modifier|r', + name = 'Bar width modifier', desc = 'Make this bar wider or thinner than others', min = -80, max = 80, @@ -326,13 +321,13 @@ end disabled = function() return not self.moduleSettings.enabled end, - order = 33 + order = 30.05 } opts["barVerticalOffset"] = { type='range', - name = '|c' .. self.configColor .. 'Bar vertical offset|r', + name = 'Bar vertical offset', desc = 'Adjust the vertical placement of this bar', min = -400, max = 400, @@ -347,7 +342,7 @@ end disabled = function() return not self.moduleSettings.enabled end, - order = 34 + order = 30.06 } opts["shouldUseOverride"] = @@ -366,7 +361,7 @@ end disabled = function() return not self:IsEnabled() end, - order = 35 + order = 30.07 } opts["barTextureOverride"] = @@ -385,13 +380,13 @@ end return not self:IsEnabled() or not self.moduleSettings.shouldUseOverride end, values = IceHUD.validBarList, - order = 36 + order = 30.08 } opts["textSettings"] = { type = 'group', - name = '|c' .. self.configColor .. 'Text Settings|r', + name = '|c'..self.configColor..'Text Settings|r', desc = 'Settings related to texts', order = 32, disabled = function() @@ -536,7 +531,7 @@ end textVerticalOffset = { type = 'range', - name = '|c' .. self.configColor .. 'Text Vertical Offset|r', + name = 'Text Vertical Offset', desc = 'Offset of the text from the bar vertically (negative is farther below)', min = -250, max = 350, @@ -555,7 +550,7 @@ end textHorizontalOffset = { type = 'range', - name = '|c' .. self.configColor .. 'Text Horizontal Offset|r', + name = 'Text Horizontal Offset', desc = 'Offset of the text from the bar horizontally', min = -350, max = 350, diff --git a/IceCastBar.lua b/IceCastBar.lua index 19c28af..9120e97 100644 --- a/IceCastBar.lua +++ b/IceCastBar.lua @@ -197,8 +197,8 @@ function IceCastBar.prototype:GetOptions() opts["reverseChannel"] = { type = 'toggle', - name = "Reverse channel direction", - desc = "Whether or not to reverse the direction of a channel's castbar", + name = "Reverse channeling", + desc = "Whether or not to reverse the direction of the cast bar when a spell is being channeled. For example, if a normal cast causes this bar to fill up, then checking this option will cause a channeled spell to empty the bar instead.", get = function() return self.moduleSettings.reverseChannel end, diff --git a/IceCore.lua b/IceCore.lua index 149f59e..5e166ba 100644 --- a/IceCore.lua +++ b/IceCore.lua @@ -311,7 +311,7 @@ function IceCore.prototype:GetModuleOptions() options["aaaClickPlus"] = { type = 'description', fontSize = 'large', - name = 'Click the + next to Module Settings to see the available modules that you can tweak.\n\nAlso notice that some modules have a + next to them. This will open up additional settings such as text tweaks and icon tweaks on that module.', + name = 'Click the + next to |cffffdc42Module Settings|r to see the available modules that you can tweak.\n\nAlso notice that some modules have a + next to them. This will open up additional settings such as text tweaks and icon tweaks on that module.', order = 1 } diff --git a/IceElement.lua b/IceElement.lua index f27daad..9a25491 100644 --- a/IceElement.lua +++ b/IceElement.lua @@ -41,7 +41,7 @@ function IceElement.prototype:init(name) -- Some common colors self:SetDefaultColor("Text", 1, 1, 1) self:SetDefaultColor("undef", 0.7, 0.7, 0.7) - + LibStub("AceEvent-3.0"):Embed(self) LibStub("AceTimer-3.0"):Embed(self) @@ -119,7 +119,7 @@ function IceElement.prototype:GetOptions() opts["enabled"] = { type = "toggle", - name = "|c" .. self.configColor .. "Enabled|r", + name = "Enabled", desc = "Enable/disable module", get = function() return self.moduleSettings.enabled @@ -135,10 +135,16 @@ function IceElement.prototype:GetOptions() order = 20 } + opts["headerVisibility"] = { + type = 'header', + name = 'Visibility Settings', + order = 27 + } + opts["scale"] = { type = 'range', - name = "|c" .. self.configColor .. "Scale|r", + name = "Scale", desc = 'Scale of the element', min = 0.2, max = 2, @@ -155,7 +161,7 @@ function IceElement.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled end, - order = 21 + order = 27.1 } opts["alwaysFullAlpha"] = @@ -163,6 +169,7 @@ function IceElement.prototype:GetOptions() type = 'toggle', name = 'Always show at 100% alpha', desc = 'Whether to always show this module at 100% alpha or not', + width = 'double', get = function() return self.moduleSettings.alwaysFullAlpha end, diff --git a/IceHUD.lua b/IceHUD.lua index 85ddd26..d9962b7 100644 --- a/IceHUD.lua +++ b/IceHUD.lua @@ -9,6 +9,7 @@ local AceSerializer = LibStub("AceSerializer-3.0", 1) local pendingModuleLoads = {} local bReadyToRegisterModules = false +local lastCustomModule = 1 IceHUD.CurrTagVersion = 3 IceHUD.debugging = false @@ -16,6 +17,7 @@ IceHUD.debugging = false IceHUD.WowVer = select(4, GetBuildInfo()) IceHUD.validBarList = { "Bar", "HiBar", "RoundBar", "ColorBar", "RivetBar", "RivetBar2", "CleanCurves", "GlowArc", "BloodGlaives", "ArcHUD", "FangRune" } +IceHUD.validCustomModules = {"Buff/Debuff watcher", "Buff/Debuff stack counter", "Ability cooldown bar", "Health bar", "Mana bar"} local function deepcopy(object) local lookup_table = {} @@ -59,41 +61,41 @@ IceHUD.options = test = { type = 'description', fontSize = "medium", - name = [[Thanks for using IceHUD! Below you will find answers to all of the most commonly-asked questions. Be sure to check the addon's page on curse.com and wowinterface.com as well for more discussion and updates! + name = [[Thanks for using |cff9999ffIceHUD|r! Below you will find answers to all of the most commonly-asked questions. Be sure to check the addon's page on |cff33ff99curse.com|r and |cff33ff99wowinterface.com|r as well for more discussion and updates! You can also email |cff33ff99icehud@parnic.com|r directly if you prefer. -1. How do I hide the default Blizzard player and target unit frames? -Expand the "Module Settings" section, click "Player Health" or "Target Health," and check "Hide Blizzard Frame" +|cff9999ff1. How do I hide the default Blizzard player and target unit frames?|r +Expand the "|cffffdc42Module Settings|r" section, click "PlayerHealth" or "TargetHealth," and check "Hide Blizzard Frame" -2. How do I turn off click-targeting and menus on the player bar? -Expand the "Module Settings" section, click "Player Health," un-check "Allow click-targeting." Note that as of v1.3, there is now an option to allow click-targeting out of combat, but turn it off while in combat. +|cff9999ff2. How do I turn off click-targeting and menus on the player bar?|r +Expand the "|cffffdc42Module Settings|r" section, click "PlayerHealth," un-check "Allow click-targeting." Note that as of v1.3, there is now an option to allow click-targeting out of combat, but turn it off while in combat. -3. How do I hide the HUD or change its transparency based on combat, targeting, etc.? +|cff9999ff3. How do I hide the HUD or change its transparency based on combat, targeting, etc.?|r Check the "Transparency Settings" section. Nearly any combination of states should be available for tweaking. -4. Even if the rest of the HUD is transparent, the health percentages seem to show up. Why? -Expand the "Module Settings" section, expand "Player Health," click "Text Settings," look for options about keeping the lower/upper text blocks alpha locked. If the text is alpha locked, it will not drop below 100%, otherwise it respects its bar's transparency setting. Player Health/Mana, Target Health/Mana, and pet bars should all have these options. +|cff9999ff4. Even if the rest of the HUD is transparent, the health percentages seem to show up. Why?|r +Expand the "|cffffdc42Module Settings|r" section, expand "PlayerHealth," click "Text Settings," look for options about keeping the lower/upper text blocks alpha locked. If the text is alpha locked, it will not drop below 100%, otherwise it respects its bar's transparency setting. PlayerHealth/Mana, TargetHealth/Mana, and pet bars should all have these options. -5. Is there any way to see combo points for Rogues and Druids or sunder applications for Warriors? -Yes, check the "combo points" and "sunder count" modules in the configuration panel. (Note that these modules may not show up if you're not of the appropriate class to see them. They should be present for their respective classes, however.) +|cff9999ff5. Is there any way to see combo points for Rogues and Druids or sunder applications for Warriors?|r +Yes, check the "ComboPoints" and "SunderCount" modules in the configuration panel. (Note that these modules may not show up if you're not of the appropriate class to see them. They should be present for their respective classes, however.) -6. What's this thing at the top of the player's cast bar? It's darker than the rest of the bar. +|cff9999ff6. What's this thing at the top of the player's cast bar? It's darker than the rest of the bar.|r That's the Cast Lag Indicator that shows you when you can start casting a new spell and still be able to finish the current one (based on your lag to the server). You can disable this in the Player Cast Bar module settings. -7. Is there a bar that shows breath underwater and if so, how can I adjust it? -Yes, this is called the MirrorBarHandler in the module settings. It's called that because it mirrors casting bar behavior, displays more than just breathing (fatigue is one example), and that's what Blizzard calls it. It can be moved/adjusted/resized/etc. as with any other module. +|cff9999ff7. Is there a bar that shows breath underwater, and if so how can I adjust it?|r +Yes, this is called the MirrorBarHandler in the |cffffdc42Module Settings|r. It's called that because it mirrors casting bar behavior, displays more than just breathing (fatigue is one example), and that's what Blizzard calls it. It can be moved/adjusted/resized/etc. as with any other module. -8. There's a long green bar that sometimes shows up below everything else. What is it? +|cff9999ff8. There's a long green bar that sometimes shows up below everything else. What is it?|r That would be the TargetOfTarget module. That module is available for people who don't want the full ToT health/mana bars, but do want some sort of ToT representation on the screen. -9. IceHUD needs a bar or counter for buff/debuff X! -Good news: as of v1.5, you can create as many bars and counters for any buffs or debuffs you want! Click one of the "Create custom ..." buttons above. This will create a module named MyCustomBar# (where # is a number based on how many custom bars you've made so far) or MyCustomCounter#. You can then expand the Module Settings group and modify all sorts of settings on the new custom module. It is highly recommend that you rename the bar as soon as possible to avoid any confusion later. These custom modules are full-featured enough to replace some of the class-specific ones that are already there, but I will leave them so as not to upset people who are already using them. +|cff9999ff9. IceHUD needs a bar or counter for buff/debuff X!|r +Good news: as of v1.5, you can create as many bars and counters for any buffs or debuffs you want! Click one of the "Create custom ..." buttons above. This will create a module named MyCustomBar# (where # is a number based on how many custom bars you've made so far) or MyCustomCounter#. You can then expand the |cffffdc42Module Settings|r group and modify all sorts of settings on the new custom module. It is highly recommend that you rename the bar as soon as possible to avoid any confusion later. These custom modules are full-featured enough to replace some of the class-specific ones that are already there, but I will leave them so as not to upset people who are already using them. -10. How do I turn off the resting/combat/PvP/etc. icons on the player or target? -Expand Module Settings, expand PlayerHealth (or TargetHealth for targets), click Icon Settings. You can control every aspect of the icons there including location, visibility, draw order, etc. +|cff9999ff10. How do I turn off the resting/combat/PvP/etc. icons on the player or target?|r +Expand "|cffffdc42Module Settings|r", expand PlayerHealth (or TargetHealth for targets), click Icon Settings. You can control every aspect of the icons there including location, visibility, draw order, etc. -11. How do I turn off buffs/debuffs on the player's or target's bar? -Expand Module Settings, expand PlayerInfo (or TargetInfo for targets), and set the number of buffs per row to be 0. These cannot be controlled independently (e.g. you can turn off buffs and debuffs, but not just one or the other).]] +|cff9999ff11. How do I turn off buffs/debuffs on the player's or target's bar?|r +Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targets), and set the number of buffs per row to be 0. These cannot be controlled independently (e.g. you can turn off buffs and debuffs, but not just one or the other).]] } } }, @@ -529,12 +531,6 @@ Expand Module Settings, expand PlayerInfo (or TargetInfo for targets), and set t args = {}, order = 42 }, - - headerOther = { - type = 'header', - name = 'Other', - order = 90 - }, --[[ enabled = { type = "toggle", @@ -563,94 +559,77 @@ Expand Module Settings, expand PlayerInfo (or TargetInfo for targets), and set t set = function(info, value) IceHUD.IceCore:SetDebug(value) end, + hidden = + --[===[@non-debug@ + true + --@end-non-debug@]===] + --@debug@ + false + --@end-debug@ + , + disabled = + -- hello, snooper! this feature doesn't actually work yet, so enabling it won't help you much :) + --[===[@non-debug@ + true + --@end-non-debug@]===] + --@debug@ + false + --@end-debug@ + , order = 92 }, - reset = { - type = 'execute', - name = '|cffff0000Reset|r', - desc = "Resets all IceHUD options - WARNING: Reloads UI", - func = function() - StaticPopup_Show("ICEHUD_RESET") + customModuleSelect = { + type = "select", + name = "Create custom module", + desc = "Select a custom module that you want to create here, then press the 'Create' button.", + get = function(info) + return lastCustomModule end, - order = 93 + set = function(info, v) + lastCustomModule = v + end, + values = IceHUD.validCustomModules, + order = 94.5, }, - customBar = { - type = 'execute', - name = 'Create custom bar', - desc = 'Creates a new customized bar. This bar allows you to specify a buff or debuff to track on a variety of targets. Once that buff/debuff is applied, you will be able to watch it count down on the bar. You can create as many of these as you like.', + customModuleCreate = { + type = "execute", + name = "Create", + desc = "Creates the selected custom module", func = function() - local newMod = IceCustomBar:new() - IceHUD.IceCore:AddNewDynamicModule(newMod) - StaticPopup_Show("ICEHUD_CUSTOM_BAR_CREATED") - ConfigDialog:SelectGroup("IceHUD", "modules", newMod.elementName) + local v = lastCustomModule + local newMod = nil + local popupMsg + if v == 1 then -- custom bar + newMod = IceCustomBar:new() + popupMsg = "ICEHUD_CUSTOM_BAR_CREATED" + elseif v == 2 then -- custom counter + newMod = IceCustomCount:new() + popupMsg = "ICEHUD_CUSTOM_COUNTER_CREATED" + elseif v == 3 then -- cooldown bar + newMod = IceCustomCDBar:new() + popupMsg = "ICEHUD_CUSTOM_CD_CREATED" + elseif v == 4 then -- custom health bar + newMod = IceCustomHealth:new() + popupMsg = "ICEHUD_CUSTOM_HEALTH_CREATED" + elseif v == 5 then -- custom mana bar + newMod = IceCustomMana:new() + popupMsg = "ICEHUD_CUSTOM_MANA_CREATED" + end + if newMod ~= nil then + IceHUD.IceCore:AddNewDynamicModule(newMod) + ConfigDialog:SelectGroup("IceHUD", "modules", newMod.elementName) + StaticPopup_Show(popupMsg) + end end, - order = 94.5 - }, - - customCount = { - type = 'execute', - name = 'Create custom counter', - desc = 'Creates a new customized counter. This counter allows you to specify a stacking buff or debuff to track on a variety of targets. A number or graphic (whichever you choose) will count the number of applications of the specified buff/debuff. You can create as many of these as you like.', - func = function() - local newMod = IceCustomCount:new() - IceHUD.IceCore:AddNewDynamicModule(newMod) - StaticPopup_Show("ICEHUD_CUSTOM_COUNTER_CREATED") - ConfigDialog:SelectGroup("IceHUD", "modules", newMod.elementName) - end, - order = 94.6 - }, - - customCD = { - type = 'execute', - name = 'Create cooldown bar', - desc = 'Creates a new customized ability cooldown bar. This bar will monitor the cooldown of the specified skill/spell so you know when it is available to be used again. You can create as many of these as you like.', - func = function() - local newMod = IceCustomCDBar:new() - IceHUD.IceCore:AddNewDynamicModule(newMod) - StaticPopup_Show("ICEHUD_CUSTOM_CD_CREATED") - ConfigDialog:SelectGroup("IceHUD", "modules", newMod.elementName) - end, - order = 94.7 - }, - - customHealth = { - type = 'execute', - name = 'Custom health bar', - desc = 'Creates a new customized health bar. This bar monitors the health of whatever unit you specify. You can create as many of these as you like.', - func = function() - local newMod = IceCustomHealth:new() - IceHUD.IceCore:AddNewDynamicModule(newMod) - StaticPopup_Show("ICEHUD_CUSTOM_HEALTH_CREATED") - ConfigDialog:SelectGroup("IceHUD", "modules", newMod.elementName) - end, - hidden = function() - return IceCustomHealth == nil - end, - order = 94.8 - }, - - customMana = { - type = 'execute', - name = 'Custom mana bar', - desc = 'Creates a new customized mana bar. This bar monitors the mana of whatever unit you specify. You can create as many of these as you like.', - func = function() - local newMod = IceCustomMana:new() - IceHUD.IceCore:AddNewDynamicModule(newMod) - StaticPopup_Show("ICEHUD_CUSTOM_MANA_CREATED") - ConfigDialog:SelectGroup("IceHUD", "modules", newMod.elementName) - end, - hidden = function() - return IceCustomMana == nil - end, - order = 94.8 + order = 94.6, }, configMode = { type = 'toggle', - name = '|cffff0000Configuration Mode|r', - desc = 'Puts IceHUD into configuration mode so bars can be placed more easily', + name = 'Configuration Mode', + desc = "Makes all modules visible so you can see where they're placed and find any that are overlapping.", get = function() return IceHUD.IceCore:IsInConfigMode() end, @@ -663,22 +642,11 @@ Expand Module Settings, expand PlayerInfo (or TargetInfo for targets), and set t useDogTags = { type = 'toggle', name = 'Use Dog Tags', - desc = 'Whether or not the addon should use the DogTag library (this will increase the CPU usage of the mod)\n\nNOTE: after changing this option, you must reload the UI or else bad things happen', + desc = 'Whether or not the addon should use the DogTag library (this will increase the CPU usage of the mod). DogTag controls all text displayed around bars such as health or mana amounts. Type |cffffff78/dog|r to see all DogTag options.\n\nNOTE: after changing this option, you must reload the UI or else bad things happen', get = function() return IceHUD.IceCore:ShouldUseDogTags() end, set = function(info, v) - StaticPopupDialogs["ICEHUD_CHANGED_DOGTAG"] = { - text = "This option requires the UI to be reloaded. Do you wish to reload it now?", - button1 = "Yes", - OnAccept = function() - ReloadUI() - end, - button2 = "No", - timeout = 0, - whileDead = 1, - hideOnEscape = 1 - }; IceHUD.IceCore:SetShouldUseDogTags(v) StaticPopup_Show("ICEHUD_CHANGED_DOGTAG") end, @@ -876,6 +844,23 @@ StaticPopupDialogs["ICEHUD_DELETE_CUSTOM_MODULE"] = end, } +StaticPopupDialogs["ICEHUD_CHANGED_DOGTAG"] = { + text = "This option requires the UI to be reloaded. Do you wish to reload it now?", + button1 = "Yes", + OnShow = function(self) + self:SetFrameStrata("TOOLTIP") + end, + OnHide = function(self) + self:SetFrameStrata("DIALOG") + end, + OnAccept = function() + ReloadUI() + end, + button2 = "No", + timeout = 0, + whileDead = 1, + hideOnEscape = 0 +} function IceHUD:OnInitialize() self:SetDebugging(false) @@ -956,6 +941,15 @@ function IceHUD:SetupProfileImportButtons() false --@end-debug@ , + disabled = + -- hello, snooper! this feature doesn't actually work yet, so enabling it won't help you much :) + --[===[@non-debug@ + true + --@end-non-debug@]===] + --@debug@ + false + --@end-debug@ + , order = 98.1 } @@ -994,6 +988,15 @@ function IceHUD:SetupProfileImportButtons() false --@end-debug@ , + disabled = + -- hello, snooper! this feature doesn't actually work yet, so enabling it won't help you much :) + --[===[@non-debug@ + true + --@end-non-debug@]===] + --@debug@ + false + --@end-debug@ + , order = 98.2 } end diff --git a/IceUnitBar.lua b/IceUnitBar.lua index 448507d..59661a4 100644 --- a/IceUnitBar.lua +++ b/IceUnitBar.lua @@ -25,10 +25,10 @@ IceUnitBar.prototype.noFlash = nil function IceUnitBar.prototype:init(name, unit) IceUnitBar.super.prototype.init(self, name) assert(unit, "IceUnitBar 'unit' is nil") - + self:SetUnit(unit) self.noFlash = false - + self:SetDefaultColor("Dead", 0.5, 0.5, 0.5) self:SetDefaultColor("Tapped", 0.8, 0.8, 0.8) @@ -68,11 +68,11 @@ end -- OVERRIDE function IceUnitBar.prototype:GetOptions() local opts = IceUnitBar.super.prototype.GetOptions(self) - - opts["lowThreshold"] = + + opts["lowThreshold"] = { type = 'range', - name = '|cff22bb22Low Threshold|r', + name = 'Low Threshold', desc = 'Threshold of pulsing the bar (0 means never) (for player applies only to mana, not rage/energy/runic power)', get = function() return self.moduleSettings.lowThreshold @@ -88,12 +88,13 @@ function IceUnitBar.prototype:GetOptions() max = 1, step = 0.05, isPercent = true, - order = 37 + order = 30.091 } opts["lowThresholdFlash"] = { type = 'toggle', name = 'Flash bar below Low Threshold', desc = 'Flashes the bar when it is below the Low Threshold specified above', + width = 'double', get = function() return self.moduleSettings.lowThresholdFlash end, @@ -103,7 +104,7 @@ function IceUnitBar.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled end, - order = 38 + order = 30.092 } opts["lowThresholdColor"] = { type = "toggle", @@ -119,9 +120,9 @@ function IceUnitBar.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled or not (self.moduleSettings.scaleHealthColor and self.moduleSettings.scaleManaColor) end, - order = 39 + order = 30.093 } - + return opts end @@ -130,11 +131,11 @@ end function IceUnitBar.prototype:Enable() IceUnitBar.super.prototype.Enable(self) - + self:RegisterEvent("PLAYER_UNGHOST", "Alive") self:RegisterEvent("PLAYER_ALIVE", "Alive") self:RegisterEvent("PLAYER_DEAD", "Dead") - + self.alive = not UnitIsDeadOrGhost(self.unit) self.combat = UnitAffectingCombat(self.unit) end @@ -143,7 +144,7 @@ end -- OVERRIDE function IceUnitBar.prototype:Redraw() IceUnitBar.super.prototype.Redraw(self) - + if (self.moduleSettings.enabled) then self:Update(self.unit) end @@ -265,15 +266,15 @@ end -- OVERRIDE function IceUnitBar.prototype:UpdateBar(scale, color, alpha) IceUnitBar.super.prototype.UpdateBar(self, scale, color, alpha) - + if (not self.flashFrame) then -- skip if flashFrame hasn't been created yet return end self.flashFrame.flash:SetVertexColor(self:GetColor(color)) - - if (self.moduleSettings.lowThreshold > 0 and + + if (self.moduleSettings.lowThreshold > 0 and self.moduleSettings.lowThresholdFlash and self.moduleSettings.lowThreshold >= scale and self.alive and not self.noFlash) then @@ -288,13 +289,13 @@ end function IceUnitBar.prototype:OnFlashUpdate() local time = GetTime() local decimals = time - math.floor(time) - + if (decimals > 0.5) then decimals = 1 - decimals end - + decimals = decimals*1.1 -- add more dynamic to the color change - + self.flashFrame:SetAlpha(decimals) end diff --git a/modules/CastBar.lua b/modules/CastBar.lua index 7c23d00..dee3ad1 100644 --- a/modules/CastBar.lua +++ b/modules/CastBar.lua @@ -30,6 +30,7 @@ function CastBar.prototype:GetDefaultSettings() settings["lagAlpha"] = 0.7 settings["showBlizzCast"] = false settings["shouldAnimate"] = false + settings["hideAnimationSettings"] = true settings["usesDogTagStrings"] = false settings["rangeColor"] = true @@ -76,8 +77,8 @@ function CastBar.prototype:GetOptions() values = { "Always", "Caster", "Never" }, order = 41 } - - opts["lagAlpha"] = + + opts["lagAlpha"] = { type = 'range', name = 'Lag Indicator alpha', @@ -116,31 +117,6 @@ function CastBar.prototype:GetOptions() order = 43 } - -- Parnic - this exists solely for the console/rock config to work...animating cast bars doesn't make sense - opts["shouldAnimate"] = - { - type = 'toggle', - name = 's', - desc = 's', - set = 's', - get = 's', - hidden = function() - return true - end - } - - opts["desiredLerpTime"] = - { - type = 'toggle', - name = 'd', - desc = 'd', - set = 'd', - get = 'd', - hidden = function() - return true - end - } - opts["barVisible"] = { type = 'toggle', name = 'Bar visible', @@ -161,7 +137,7 @@ function CastBar.prototype:GetOptions() end, order = 28 } - + opts["bgVisible"] = { type = 'toggle', name = 'Bar background visible', @@ -225,7 +201,7 @@ function CastBar.prototype:GetOptions() step = 1, order = 11 }, - + lockFontAlpha = { type = "toggle", name = "Lock Bar Text Alpha", @@ -256,7 +232,7 @@ function CastBar.prototype:GetOptions() textVerticalOffset = { type = 'range', - name = '|c' .. self.configColor .. 'Text Vertical Offset|r', + name = 'Text Vertical Offset', desc = 'Offset of the text from the bar vertically (negative is farther below)', min = -250, max = 350, @@ -275,7 +251,7 @@ function CastBar.prototype:GetOptions() textHorizontalOffset = { type = 'range', - name = '|c' .. self.configColor .. 'Text Horizontal Offset|r', + name = 'Text Horizontal Offset', desc = 'Offset of the text from the bar horizontally', min = -350, max = 350, @@ -379,7 +355,7 @@ end -- OVERRIDE function CastBar.prototype:CreateFrame() CastBar.super.prototype.CreateFrame(self) - + self:CreateLagBar() end @@ -388,7 +364,7 @@ function CastBar.prototype:CreateLagBar() if not (self.lagBar) then self.lagBar = CreateFrame("Frame", nil, self.frame) end - + self.lagBar:SetWidth(self.settings.barWidth + (self.moduleSettings.widthModifier or 0)) self.lagBar:SetHeight(self.settings.barHeight) @@ -430,7 +406,7 @@ function CastBar.prototype:SpellCastStart(event, unit, spell, rank) if not self:IsVisible() or not self.actionDuration then return end - + self.lagBar:SetFrameStrata("BACKGROUND") self.lagBar:ClearAllPoints() if not IceHUD:xor(self.moduleSettings.reverse, self.moduleSettings.inverse) then @@ -440,13 +416,13 @@ function CastBar.prototype:SpellCastStart(event, unit, spell, rank) end local lag = GetTime() - (self.spellCastSent or 0) - + local pos = IceHUD:Clamp(lag / self.actionDuration, 0, 1) if self.unit == "vehicle" then pos = 0 end local y = self.settings.barHeight - (pos * self.settings.barHeight) - + local min_y = 0 local max_y = pos if IceHUD:xor(self.moduleSettings.reverse, self.moduleSettings.inverse) then @@ -465,7 +441,7 @@ function CastBar.prototype:SpellCastStart(event, unit, spell, rank) else self.lagBar.bar:Show() end - + self.lagBar:SetHeight(self.settings.barHeight * pos) end @@ -478,7 +454,7 @@ function CastBar.prototype:SpellCastChannelStart(event, unit) if not self:IsVisible() or not self.actionDuration then return end - + local lagTop = not IceHUD:xor(self.moduleSettings.reverse, self.moduleSettings.inverse) if self.moduleSettings.reverseChannel then lagTop = not lagTop @@ -518,7 +494,7 @@ function CastBar.prototype:SpellCastChannelStart(event, unit) else self.lagBar.bar:Show() end - + self.lagBar:SetHeight(self.settings.barHeight * pos) end diff --git a/modules/ComboPoints.lua b/modules/ComboPoints.lua index 660cb15..9739fb8 100644 --- a/modules/ComboPoints.lua +++ b/modules/ComboPoints.lua @@ -7,7 +7,7 @@ ComboPoints.prototype.comboSize = 20 -- Constructor -- function ComboPoints.prototype:init() ComboPoints.super.prototype.init(self, "ComboPoints") - + self:SetDefaultColor("ComboPoints", 1, 1, 0) self.scalingEnabled = true end @@ -21,6 +21,12 @@ end function ComboPoints.prototype:GetOptions() local opts = ComboPoints.super.prototype.GetOptions(self) + opts["headerLookAndFeel"] = { + type = 'header', + name = 'Look and Feel', + order = 29.9 + } + opts["vpos"] = { type = "range", name = "Vertical Position", @@ -179,7 +185,7 @@ end -- OVERRIDE function ComboPoints.prototype:Redraw() ComboPoints.super.prototype.Redraw(self) - + self:CreateFrame() self:UpdateComboPoints() end @@ -188,7 +194,7 @@ end -- OVERRIDE function ComboPoints.prototype:Enable(core) ComboPoints.super.prototype.Enable(self, core) - + self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateComboPoints") if IceHUD.WowVer >= 30000 then self:RegisterEvent("UNIT_COMBO_POINTS", "UpdateComboPoints") @@ -223,7 +229,7 @@ function ComboPoints.prototype:CreateFrame() end self.frame:ClearAllPoints() self.frame:SetPoint("TOP", self.parent, "BOTTOM", self.moduleSettings.hpos, self.moduleSettings.vpos) - + self:Show(true) self:CreateComboFrame() @@ -348,7 +354,7 @@ function ComboPoints.prototype:UpdateComboPoints() else self.frame.graphicalBG[i]:Hide() end - + if (points ~= nil and i <= points) then self.frame.graphical[i]:Show() else diff --git a/modules/CustomBar.lua b/modules/CustomBar.lua index e4fb0e3..870f2c7 100644 --- a/modules/CustomBar.lua +++ b/modules/CustomBar.lua @@ -141,7 +141,7 @@ function IceCustomBar.prototype:GetOptions() opts["customHeader"] = { type = 'header', name = "Custom bar settings", - order = 20.1, + order = 30.1, } opts["deleteme"] = { @@ -154,7 +154,7 @@ function IceCustomBar.prototype:GetOptions() dialog.data = self end end, - order = 20.2, + order = 20.1, } opts["name"] = { @@ -173,7 +173,7 @@ function IceCustomBar.prototype:GetOptions() return not self.moduleSettings.enabled end, usage = "", - order = 20.3, + order = 30.3, } opts["unitToTrack"] = { @@ -195,7 +195,7 @@ function IceCustomBar.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled end, - order = 20.4, + order = 30.4, } opts["buffOrDebuff"] = { @@ -214,7 +214,7 @@ function IceCustomBar.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled or self.unit == "main hand weapon" or self.unit == "off hand weapon" end, - order = 20.5, + order = 30.5, } opts["buffToTrack"] = { @@ -236,9 +236,9 @@ function IceCustomBar.prototype:GetOptions() return not self.moduleSettings.enabled or self.unit == "main hand weapon" or self.unit == "off hand weapon" end, usage = "", - order = 20.6, + order = 30.6, } - + opts["exactMatch"] = { type = 'toggle', name = 'Exact match only', @@ -254,7 +254,7 @@ function IceCustomBar.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled or self.unit == "main hand weapon" or self.unit == "off hand weapon" end, - order = 20.65, + order = 30.65, } opts["trackOnlyMine"] = { @@ -272,7 +272,7 @@ function IceCustomBar.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled or self.unit == "main hand weapon" or self.unit == "off hand weapon" end, - order = 20.7, + order = 30.7, } opts["barColor"] = { @@ -291,7 +291,7 @@ function IceCustomBar.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled end, - order = 20.8, + order = 30.8, } opts["displayWhenEmpty"] = { @@ -308,7 +308,7 @@ function IceCustomBar.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled end, - order = 20.9 + order = 30.9 } opts["buffTimerDisplay"] = { @@ -326,7 +326,7 @@ function IceCustomBar.prototype:GetOptions() return not self.moduleSettings.enabled end, values = validBuffTimers, - order = 21 + order = 31 } opts["maxDuration"] = { @@ -347,15 +347,15 @@ function IceCustomBar.prototype:GetOptions() return not self.moduleSettings.enabled end, usage = "", - order = 21.1, + order = 31.1, } - + opts["headerIcons"] = { type = 'header', name = 'Icons', order = 40 } - + opts["displayAuraIcon"] = { type = 'toggle', name = "Display aura icon", @@ -378,7 +378,7 @@ function IceCustomBar.prototype:GetOptions() end, order = 40.1, } - + opts["auraIconXOffset"] = { type = 'range', min = -250, @@ -438,7 +438,7 @@ function IceCustomBar.prototype:GetOptions() end, order = 40.4, } - + return opts end @@ -475,7 +475,7 @@ function IceCustomBar.prototype:GetAuraDuration(unitName, buffName) if self.moduleSettings.maxDuration and self.moduleSettings.maxDuration ~= 0 then duration = self.moduleSettings.maxDuration end - + if (((self.moduleSettings.exactMatch and buff:upper() == buffName:upper()) or (not self.moduleSettings.exactMatch and string.match(buff:upper(), buffName:upper()))) and (not self.moduleSettings.trackOnlyMine or isMine)) then diff --git a/modules/CustomCDBar.lua b/modules/CustomCDBar.lua index e497ae2..1ddb5f9 100644 --- a/modules/CustomCDBar.lua +++ b/modules/CustomCDBar.lua @@ -37,7 +37,7 @@ function IceCustomCDBar.prototype:Enable(core) self:UpdateCustomBar() self:UpdateIcon() self:EnableUpdates(false) - + if self.moduleSettings.auraIconXOffset == nil then self.moduleSettings.auraIconXOffset = 40 end @@ -132,7 +132,7 @@ function IceCustomCDBar.prototype:GetOptions() opts["customHeader"] = { type = 'header', name = "Custom CD settings", - order = 20.1, + order = 30.1, } opts["deleteme"] = { @@ -145,7 +145,7 @@ function IceCustomCDBar.prototype:GetOptions() dialog.data = self end end, - order = 20.2, + order = 20.1, } opts["name"] = { @@ -164,7 +164,7 @@ function IceCustomCDBar.prototype:GetOptions() return not self.moduleSettings.enabled end, usage = "", - order = 20.3, + order = 30.3, } opts["cooldownToTrack"] = { @@ -187,7 +187,7 @@ function IceCustomCDBar.prototype:GetOptions() return not self.moduleSettings.enabled end, usage = "", - order = 20.6, + order = 30.6, } opts["barColor"] = { @@ -206,7 +206,7 @@ function IceCustomCDBar.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled end, - order = 20.8, + order = 30.8, } opts["displayMode"] = { @@ -224,7 +224,7 @@ function IceCustomCDBar.prototype:GetOptions() return not self.moduleSettings.enabled end, values = validDisplayModes, - order = 20.9 + order = 30.9 } opts["cooldownTimerDisplay"] = { @@ -242,9 +242,9 @@ function IceCustomCDBar.prototype:GetOptions() return not self.moduleSettings.enabled end, values = validBuffTimers, - order = 21 + order = 31 } - + opts["maxDuration"] = { type = 'input', name = "Maximum duration", @@ -263,15 +263,15 @@ function IceCustomCDBar.prototype:GetOptions() return not self.moduleSettings.enabled end, usage = "", - order = 21.1, + order = 31.1, } - + opts["headerIcons"] = { type = 'header', name = 'Icons', order = 40 } - + opts["displayAuraIcon"] = { type = 'toggle', name = "Display aura icon", @@ -288,7 +288,7 @@ function IceCustomCDBar.prototype:GetOptions() end, order = 40.1, } - + opts["auraIconXOffset"] = { type = 'range', min = -250, @@ -500,7 +500,7 @@ function IceCustomCDBar.prototype:UpdateCustomBar(fromUpdate) end self.barFrame.bar:SetVertexColor(self:GetBarColor()) - + self.coolingDown = remaining ~= nil and remaining > 0 end @@ -559,6 +559,6 @@ function IceCustomCDBar.prototype:UseTargetAlpha(scale) if self.moduleSettings.displayMode == "When ready" and scale == 0 then return false end - + return true end diff --git a/modules/CustomCount.lua b/modules/CustomCount.lua index 5618172..13d6e6e 100644 --- a/modules/CustomCount.lua +++ b/modules/CustomCount.lua @@ -10,7 +10,7 @@ local buffOrDebuff = {"buff", "debuff"} -- Constructor -- function IceCustomCount.prototype:init() IceCustomCount.super.prototype.init(self, "CustomCount") - + self.scalingEnabled = true end @@ -22,7 +22,7 @@ function IceCustomCount.prototype:GetOptions() opts["customHeader"] = { type = 'header', name = "Aura settings", - order = 20.1, + order = 30.1, } opts["deleteme"] = { @@ -35,7 +35,7 @@ function IceCustomCount.prototype:GetOptions() dialog.data = self end end, - order = 20.2, + order = 20.1, } opts["name"] = { @@ -54,7 +54,7 @@ function IceCustomCount.prototype:GetOptions() return not self.moduleSettings.enabled end, usage = "", - order = 20.3, + order = 30.3, } opts["auraTarget"] = { @@ -74,7 +74,7 @@ function IceCustomCount.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled end, - order = 20.4, + order = 30.4, } opts["auraType"] = { @@ -92,7 +92,7 @@ function IceCustomCount.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled or self.unit == "main hand weapon" or self.unit == "off hand weapon" end, - order = 20.5, + order = 30.5, } opts["auraName"] = { @@ -110,7 +110,7 @@ function IceCustomCount.prototype:GetOptions() return not self.moduleSettings.enabled or self.unit == "main hand weapon" or self.unit == "off hand weapon" end, usage = "", - order = 20.6, + order = 30.6, } opts["trackOnlyMine"] = { @@ -127,7 +127,7 @@ function IceCustomCount.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled or self.unit == "main hand weapon" or self.unit == "off hand weapon" end, - order = 20.7, + order = 30.7, } opts["countColor"] = { @@ -146,7 +146,7 @@ function IceCustomCount.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled end, - order = 20.8, + order = 30.8, } opts["countMinColor"] = { @@ -165,7 +165,7 @@ function IceCustomCount.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled or not self.moduleSettings.gradient end, - order = 20.81, + order = 30.81, } opts["maxCount"] = { @@ -186,13 +186,13 @@ function IceCustomCount.prototype:GetOptions() return not self.moduleSettings.enabled end, usage = "", - order = 20.9, + order = 30.9, } opts["normalHeader"] = { type = 'header', name = "Counter look and feel", - order = 30, + order = 31, } opts["vpos"] = { @@ -212,7 +212,7 @@ function IceCustomCount.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled end, - order = 31 + order = 31.1 } opts["hpos"] = { @@ -232,7 +232,7 @@ function IceCustomCount.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled end, - order = 31 + order = 31.2 } opts["CustomFontSize"] = { @@ -369,7 +369,7 @@ end -- OVERRIDE function IceCustomCount.prototype:Redraw() IceCustomCount.super.prototype.Redraw(self) - + self:CreateFrame() self:UpdateCustomCount() end @@ -378,7 +378,7 @@ end -- OVERRIDE function IceCustomCount.prototype:Enable(core) IceCustomCount.super.prototype.Enable(self, core) - + self:RegisterEvent("UNIT_AURA", "UpdateCustomCount") self:RegisterEvent("UNIT_PET", "UpdateCustomCount") self:RegisterEvent("PLAYER_PET_CHANGED", "UpdateCustomCount") @@ -409,7 +409,7 @@ function IceCustomCount.prototype:CreateFrame() end self.frame:ClearAllPoints() self.frame:SetPoint("TOP", self.parent, "BOTTOM", self.moduleSettings.hpos, self.moduleSettings.vpos) - + self:Show(true) self:CreateCustomFrame() @@ -436,7 +436,7 @@ function IceCustomCount.prototype:CreateCustomFrame(doTextureUpdate) for i = 1, self.moduleSettings.maxCount do if (not self.frame.graphicalBG[i]) then local frame = CreateFrame("Frame", nil, self.frame) - self.frame.graphicalBG[i] = frame + self.frame.graphicalBG[i] = frame frame.texture = frame:CreateTexture() frame.texture:SetAllPoints(frame) end @@ -470,7 +470,7 @@ function IceCustomCount.prototype:CreateCustomFrame(doTextureUpdate) for i = 1, self.moduleSettings.maxCount do if (not self.frame.graphical[i]) then local frame = CreateFrame("Frame", nil, self.frame) - self.frame.graphical[i] = frame + self.frame.graphical[i] = frame frame.texture = frame:CreateTexture() frame.texture:SetAllPoints(frame) end @@ -505,7 +505,7 @@ function IceCustomCount.prototype:SetCustomColor() if (self.moduleSettings.gradient) then r,g,b = self:GetGradientColor(i) end - self.frame.graphical[i].texture:SetVertexColor(r, g, b) + self.frame.graphical[i].texture:SetVertexColor(r, g, b) end end @@ -566,7 +566,7 @@ function IceCustomCount.prototype:UpdateCustomCount() else self.frame.graphicalBG[i]:Hide() end - + if (points ~= nil and i <= points) then self.frame.graphical[i]:Show() else diff --git a/modules/CustomHealth.lua b/modules/CustomHealth.lua index ed4588c..084540d 100644 --- a/modules/CustomHealth.lua +++ b/modules/CustomHealth.lua @@ -38,7 +38,7 @@ function IceCustomHealth.prototype:GetOptions() opts["customHeader"] = { type = 'header', name = "Custom bar settings", - order = 20.1, + order = 30.1, } opts["deleteme"] = { @@ -51,7 +51,7 @@ function IceCustomHealth.prototype:GetOptions() dialog.data = self end end, - order = 20.2, + order = 20.1, } opts["name"] = { @@ -70,7 +70,7 @@ function IceCustomHealth.prototype:GetOptions() return not self.moduleSettings.enabled end, usage = "", - order = 20.3, + order = 30.3, } opts["unitToTrack"] = { @@ -90,7 +90,7 @@ function IceCustomHealth.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled end, - order = 20.4, + order = 30.4, } return opts diff --git a/modules/CustomMana.lua b/modules/CustomMana.lua index 7b27754..af92abe 100644 --- a/modules/CustomMana.lua +++ b/modules/CustomMana.lua @@ -39,7 +39,7 @@ function IceCustomMana.prototype:GetOptions() opts["customHeader"] = { type = 'header', name = "Custom bar settings", - order = 20.1, + order = 30.1, } opts["deleteme"] = { @@ -52,7 +52,7 @@ function IceCustomMana.prototype:GetOptions() dialog.data = self end end, - order = 20.2, + order = 20.1, } opts["name"] = { @@ -71,7 +71,7 @@ function IceCustomMana.prototype:GetOptions() return not self.moduleSettings.enabled end, usage = "", - order = 20.3, + order = 30.3, } opts["unitToTrack"] = { @@ -91,7 +91,7 @@ function IceCustomMana.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled end, - order = 20.4, + order = 30.4, } return opts diff --git a/modules/FocusHealth.lua b/modules/FocusHealth.lua index c2f477c..04b6882 100644 --- a/modules/FocusHealth.lua +++ b/modules/FocusHealth.lua @@ -1,6 +1,5 @@ local AceOO = AceLibrary("AceOO-2.0") -local MobHealth = nil local FocusHealth = AceOO.Class(IceUnitBar) FocusHealth.prototype.color = nil @@ -9,12 +8,10 @@ FocusHealth.prototype.color = nil -- Constructor -- function FocusHealth.prototype:init() FocusHealth.super.prototype.init(self, "FocusHealth", "focus") - + self:SetDefaultColor("FocusHealthHostile", 231, 31, 36) self:SetDefaultColor("FocusHealthFriendly", 46, 223, 37) self:SetDefaultColor("FocusHealthNeutral", 210, 219, 87) - - MobHealth = AceLibrary:HasInstance("LibMobHealth-4.0") and AceLibrary("LibMobHealth-4.0") or nil end @@ -25,7 +22,6 @@ function FocusHealth.prototype:GetDefaultSettings() settings["side"] = IceCore.Side.Right settings["offset"] = -1 settings["scale"] = 0.7 - settings["mobhealth"] = (MobHealth3 ~= nil) settings["classColor"] = false settings["hideBlizz"] = false settings["upperText"] = "[PercentHP:Round]" @@ -47,23 +43,6 @@ end function FocusHealth.prototype:GetOptions() local opts = FocusHealth.super.prototype.GetOptions(self) - opts["mobhealth"] = { - type = "toggle", - name = "MobHealth3 support", - desc = "Enable/disable MobHealth3 Focus HP data. If this option is gray, you do not have MobHealth3.", - get = function() - return self.moduleSettings.mobhealth - end, - set = function(info, value) - self.moduleSettings.mobhealth = value - self:Update(self.unit) - end, - disabled = function() - return (not self.moduleSettings.enabled) and (MobHealth3 == nil) - end, - order = 40 - } - opts["classColor"] = { type = "toggle", name = "Class color bar", @@ -119,6 +98,12 @@ function FocusHealth.prototype:GetOptions() order = 43 } + opts["headerIcons"] = { + type = 'header', + name = 'Icons', + order = 50 + } + opts["showRaidIcon"] = { type = "toggle", name = "Show Raid Icon", @@ -133,7 +118,7 @@ function FocusHealth.prototype:GetOptions() disabled = function() return not self.moduleSettings.enabled end, - order = 50 + order = 50.1 } opts["lockIconAlpha"] = { @@ -214,7 +199,7 @@ function FocusHealth.prototype:GetOptions() opts["shortenHealth"] = { type = 'toggle', - name = 'Abbreviate estimated health', + name = 'Abbreviate health', desc = 'If this is checked, then a health value of 1100 will display as 1.1k, otherwise it shows the number\n\nNote: this only applies if you are NOT using DogTag', get = function() return self.moduleSettings.abbreviateHealth @@ -310,8 +295,8 @@ function FocusHealth.prototype:EnableClickTargeting(bEnable) ClickCastFrames[self.frame.button] = true -- Parnic - debug code for showing the clickable region on this bar --- self.frame.button:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", --- edgeFile = "Interface/Tooltips/UI-Tooltip-Border", +-- self.frame.button:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", +-- edgeFile = "Interface/Tooltips/UI-Tooltip-Border", -- tile = false, -- insets = { left = 0, right = 0, top = 0, bottom = 0 }}); -- self.frame.button:SetBackdropColor(0,0,0,1); @@ -342,7 +327,7 @@ function FocusHealth.prototype:Update(unit) if not (UnitExists(unit)) then self:Show(false) return - else + else self:Show(true) end @@ -356,7 +341,7 @@ function FocusHealth.prototype:Update(unit) elseif (reaction and (reaction < 4)) then self.color = "FocusHealthHostile" end - + if (self.moduleSettings.classColor) then self.color = self.unitClass end @@ -374,17 +359,6 @@ function FocusHealth.prototype:Update(unit) if not IceHUD.IceCore:ShouldUseDogTags() then self:SetBottomText1(math.floor(self.healthPercentage * 100)) - -- first see if we have LibMobHealth that we can piggyback on - if MobHealth then - self.health = MobHealth:GetUnitCurrentHP(self.unit) - self.maxHealth = MobHealth:GetUnitMaxHP(self.unit) - elseif (self.maxHealth == 100 and self.moduleSettings.mobhealth and MobHealth3) then - -- assumption that if a unit's max health is 100, it's not actual amount - -- but rather a percentage - this obviously has one caveat though - - self.health, self.maxHealth, _ = MobHealth3:GetUnitHealth(self.unit, self.health, self.maxHealth) - end - if self.moduleSettings.abbreviateHealth then self.health = self:Round(self.health) self.maxHealth = self:Round(self.maxHealth) diff --git a/modules/GlobalCoolDown.lua b/modules/GlobalCoolDown.lua index 5d82455..6909022 100644 --- a/modules/GlobalCoolDown.lua +++ b/modules/GlobalCoolDown.lua @@ -24,7 +24,7 @@ end -- OVERRIDE function GlobalCoolDown.prototype:Enable(core) GlobalCoolDown.super.prototype.Enable(self, core) - + self:RegisterEvent("ACTIONBAR_UPDATE_COOLDOWN", "CooldownStateChanged") self.scheduledEvent = self:ScheduleRepeatingTimer("UpdateGlobalCoolDown", 0.05) @@ -78,6 +78,7 @@ function GlobalCoolDown.prototype:GetDefaultSettings() settings["side"] = IceCore.Side.Left settings["offset"] = 6 settings["shouldAnimate"] = false + settings["hideAnimationSettings"] = true settings["desiredLerpTime"] = nil settings["lowThreshold"] = 0 settings["barVisible"]["bg"] = false @@ -90,12 +91,10 @@ end function GlobalCoolDown.prototype:GetOptions() local opts = GlobalCoolDown.super.prototype.GetOptions(self) - opts["shouldAnimate"] = nil - opts["desiredLerpTime"] = nil opts["lowThreshold"] = nil opts["textSettings"] = nil - - return opts + + return opts end -- 'Protected' methods -------------------------------------------------------- diff --git a/modules/MirrorBar.lua b/modules/MirrorBar.lua index 8095196..6ad0384 100644 --- a/modules/MirrorBar.lua +++ b/modules/MirrorBar.lua @@ -196,10 +196,16 @@ end function MirrorBarHandler.prototype:GetOptions() local opts = MirrorBarHandler.super.prototype.GetOptions(self) - opts["side"] = + opts["headerLookAndFeel"] = { + type = 'header', + name = 'Look and Feel', + order = 29.9 + } + + opts["side"] = { type = 'select', - name = '|c' .. self.configColor .. 'Side|r', + name = 'Side', desc = 'Side of the HUD where the bar appears', get = function(info) if (self.moduleSettings.side == IceCore.Side.Right) then @@ -216,14 +222,14 @@ function MirrorBarHandler.prototype:GetOptions() end self:Redraw() end, - values = { "Left", "Right" }, + values = { "Left", "Right" }, order = 30 } - opts["offset"] = + opts["offset"] = { type = 'range', - name = '|c' .. self.configColor .. 'Offset|r', + name = 'Offset', desc = 'Offset of the bar', min = -1, max = 10, @@ -254,7 +260,7 @@ function MirrorBarHandler.prototype:GetOptions() end, order = 28 } - + opts["bgVisible"] = { type = 'toggle', name = 'Bar background visible', @@ -272,10 +278,10 @@ function MirrorBarHandler.prototype:GetOptions() order = 29 } - opts["barVerticalOffset"] = + opts["barVerticalOffset"] = { type='range', - name = '|c' .. self.configColor .. 'Bar vertical offset|r', + name = 'Bar vertical offset', desc = 'Adjust the vertical placement of this bar', min = -400, max = 400, @@ -375,7 +381,7 @@ function MirrorBarHandler.prototype:GetOptions() textVerticalOffset = { type = 'range', - name = '|c' .. self.configColor .. 'Text Vertical Offset|r', + name = 'Text Vertical Offset', desc = 'Offset of the text from the bar vertically (negative is farther below)', min = -250, max = 350, @@ -394,7 +400,7 @@ function MirrorBarHandler.prototype:GetOptions() textHorizontalOffset = { type = 'range', - name = '|c' .. self.configColor .. 'Text Horizontal Offset|r', + name = 'Text Horizontal Offset', desc = 'Offset of the text from the bar horizontally', min = -50, max = 50, diff --git a/modules/PlayerHealth.lua b/modules/PlayerHealth.lua index a9c14e2..f8eaabd 100644 --- a/modules/PlayerHealth.lua +++ b/modules/PlayerHealth.lua @@ -12,7 +12,7 @@ local incomingHealAmt = 0 -- Constructor -- function PlayerHealth.prototype:init() PlayerHealth.super.prototype.init(self, "PlayerHealth", "player") - + self:SetDefaultColor("PlayerHealth", 37, 164, 30) self:SetDefaultColor("PlayerHealthHealAmount", 37, 164, 30) end @@ -50,7 +50,7 @@ function PlayerHealth.prototype:GetDefaultSettings() settings["showPvPIcon"] = true settings["PvPIconOffset"] = {x=95, y=-40} settings["PvPIconScale"] = 0.9 - + settings["showPartyRoleIcon"] = true settings["PartyRoleIconOffset"] = {x=90, y=-59} settings["PartyRoleIconScale"] = 0.9 @@ -77,7 +77,7 @@ function PlayerHealth.prototype:Enable(core) self:RegisterEvent("LFG_PROPOSAL_UPDATE", "CheckPartyRole") self:RegisterEvent("LFG_PROPOSAL_FAILED", "CheckPartyRole") self:RegisterEvent("LFG_ROLE_UPDATE", "CheckPartyRole") - + --self:RegisterEvent("PARTY_MEMBERS_CHANGED", "CheckPartyFrameStatus") self:RegisterEvent("PARTY_LOOT_METHOD_CHANGED", "CheckLootMaster") @@ -155,7 +155,7 @@ end -- OVERRIDE function PlayerHealth.prototype:GetOptions() local opts = PlayerHealth.super.prototype.GetOptions(self) - + opts["classColor"] = { type = "toggle", name = "Class color bar", @@ -172,7 +172,7 @@ function PlayerHealth.prototype:GetOptions() end, order = 40 } - + opts["hideBlizz"] = { type = "toggle", name = "Hide Blizzard Frame", @@ -192,12 +192,12 @@ function PlayerHealth.prototype:GetOptions() return not self.moduleSettings.enabled end, order = 41 - } - + } + opts["hideBlizzParty"] = { type = "toggle", - name = "Hide Blizzard Party Frame", - desc = "Hides Blizzard Party frame and disables all events related to it", + name = "Hide Blizzard Party", + desc = "Hides Blizzard's default party frame and disables all events related to them", get = function() return self.moduleSettings.hideBlizzParty end, @@ -253,6 +253,7 @@ function PlayerHealth.prototype:GetOptions() type = 'toggle', name = 'Allow click-targeting in combat', desc = 'Whether or not to allow click targeting/casting and the player drop-down menu for this bar while the player is in combat (Note: does not work properly with HiBar, have to click near the base of the bar)', + width = 'double', get = function() return self.moduleSettings.allowMouseInteractionCombat end, @@ -780,7 +781,7 @@ function PlayerHealth.prototype:GetOptions() } } } - + return opts end @@ -871,7 +872,7 @@ function PlayerHealth.prototype:CreateHealBar() self.healFrame.bar:SetAllPoints(self.healFrame) self.healFrame.bar:SetVertexColor(self:GetColor("PlayerHealthHealAmount", self.alpha * self.moduleSettings.healAlpha)) - + if (self.moduleSettings.side == IceCore.Side.Left) then self.healFrame.bar:SetTexCoord(1, 0, 0, 1) else @@ -899,8 +900,8 @@ function PlayerHealth.prototype:EnableClickTargeting(bEnable) ClickCastFrames[self.frame.button] = true -- Parnic - debug code for showing the clickable region on this bar --- self.frame.button:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", --- edgeFile = "Interface/Tooltips/UI-Tooltip-Border", +-- self.frame.button:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", +-- edgeFile = "Interface/Tooltips/UI-Tooltip-Border", -- tile = false, -- insets = { left = 0, right = 0, top = 0, bottom = 0 }}) -- self.frame.button:SetBackdropColor(0,0,0,1) @@ -987,11 +988,11 @@ function PlayerHealth.prototype:CheckPartyRole() local IsLFGParty local mode, submode - mode, submode= GetLFGMode() + mode, submode= GetLFGMode() IsLFGParty = (mode ~= nil and mode ~= "abandonedInDungeon" and mode ~= "queued") if configMode or IsLFGParty then - if (configMode or self.moduleSettings.showPartyRoleIcon) and not self.frame.PartyRoleIcon then + if (configMode or self.moduleSettings.showPartyRoleIcon) and not self.frame.PartyRoleIcon then local isTank, isHeal, isDPS local proposalExists, typeID, id, name local texture, role, hasResponded, totalEncounters, completedEncounters, numMembers, isleader @@ -1015,7 +1016,7 @@ function PlayerHealth.prototype:CheckPartyRole() isTank = (role == "TANK") isHeal = (role == "HEALER") isDPS = (role == "DAMAGER") - else + else IceHUD:Debug("NoProposal") end @@ -1052,13 +1053,13 @@ function PlayerHealth.prototype:CheckPartyRole() IceHUD:Debug("Loading DPS") self.frame.PartyRoleIcon = self:CreateTexCoord(self.frame.PartyRoleIcon, "Interface\\LFGFrame\\UI-LFG-ICON-PORTRAITROLES", 20, 20, self.moduleSettings.PartyRoleIconScale, 20/64, 39/64, 22/64, 41/64) elseif configMode then - IceHUD:Debug("No Roles==Defaulting to Leader icon") + IceHUD:Debug("No Roles==Defaulting to Leader icon") self.frame.PartyRoleIcon = self:CreateTexCoord(self.frame.PartyRoleIcon, "Interface\\LFGFrame\\UI-LFG-ICON-PORTRAITROLES", 20, 20, self.moduleSettings.PartyRoleIconScale, 0/64, 19/64, 1/64, 20/64) else IceHUD:Debug("Clearing Frame") - self.frame.PartyRoleIcon = self:DestroyTexFrame(self.frame.PartyRoleIcon) + self.frame.PartyRoleIcon = self:DestroyTexFrame(self.frame.PartyRoleIcon) end - self:SetTexLoc(self.frame.PartyRoleIcon, self.moduleSettings.PartyRoleIconOffset['x'], self.moduleSettings.PartyRoleIconOffset['y']) + self:SetTexLoc(self.frame.PartyRoleIcon, self.moduleSettings.PartyRoleIconOffset['x'], self.moduleSettings.PartyRoleIconOffset['y']) self:SetIconAlpha() elseif not configMode and not self.moduleSettings.showPartyRoleIcon and self.frame.PartyRoleIcon then IceHUD:Debug("Clearing Frame") @@ -1109,9 +1110,9 @@ function PlayerHealth.prototype:CheckLootMaster() self.frame.lootMasterIcon = self:DestroyTexFrame(self.frame.lootMasterIcon) end end - + self:CheckPartyFrameStatus() - + end function PlayerHealth.prototype:CheckPartyFrameStatus() @@ -1191,7 +1192,7 @@ function PlayerHealth.prototype:Update(unit) local barValue, percent if incomingHealAmt > 0 then - percent = ((self.health + incomingHealAmt) / self.maxHealth) + percent = ((self.health + incomingHealAmt) / self.maxHealth) barValue = 1-percent else barValue = 1 @@ -1200,7 +1201,7 @@ function PlayerHealth.prototype:Update(unit) barValue = IceHUD:Clamp(barValue, 0, 1) percent = IceHUD:Clamp(percent, 0, 1) - + local min_y = barValue local max_y = 1 if self.moduleSettings.reverse then @@ -1214,7 +1215,7 @@ function PlayerHealth.prototype:Update(unit) self.healFrame.bar:SetTexCoord(0, 1, min_y, max_y) end self.healFrame:SetHeight(self.settings.barHeight * percent) - + if percent == 0 then self.healFrame.bar:Hide() else @@ -1248,7 +1249,7 @@ function PlayerHealth.prototype:SetIconAlpha() if self.frame.PvPIcon then self.frame.PvPIcon:SetAlpha(self.moduleSettings.lockIconAlpha and 1 or self.alpha) end - + if self.frame.PartyRoleIcon then self.frame.PartyRoleIcon:SetAlpha(self.moduleSettings.lockIconAlpha and 1 or self.alpha) end @@ -1353,7 +1354,7 @@ function PlayerHealth.prototype:ShowBlizzardParty() frame.Show = nil frame:GetScript("OnLoad")(frame) frame:GetScript("OnEvent")(frame, "PARTY_MEMBERS_CHANGED") - + PartyMemberFrame_UpdateMember(frame) end @@ -1390,7 +1391,7 @@ UIParent:RegisterEvent("RAID_ROSTER_UPDATE") -- UnitFrame_OnEvent('PARTY_MEMBERS_CHANGED') -- end -- UIParent:RegisterEvent('RAID_ROSTER_UPDATE') --- +-- -- ShowPartyFrame() -- Just call Blizzard default method --end diff --git a/modules/PlayerInfo.lua b/modules/PlayerInfo.lua index e8d2c42..936095c 100644 --- a/modules/PlayerInfo.lua +++ b/modules/PlayerInfo.lua @@ -29,8 +29,8 @@ function PlayerInfo.prototype:GetOptions() opts["hideBlizz"] = { type = "toggle", - name = "Hide Blizzard Buff Frame", - desc = "Hides Blizzard buffs frame and disables all events related to it", + name = "Hide Blizzard Buffs", + desc = "Hides Blizzard's default buffs frame and disables all events related to it", get = function() return self.moduleSettings.hideBlizz end, @@ -204,7 +204,7 @@ function PlayerInfo.prototype:UpdateBuffs(unit, fromRepeated) startingNum = startingNum + 1 end - + for i=startingNum, IceCore.BuffLimit do if self.frame.buffFrame.buffs[i]:IsVisible() then self.frame.buffFrame.buffs[i]:Hide() diff --git a/modules/TargetCC.lua b/modules/TargetCC.lua index 4bb3819..db8a56d 100644 --- a/modules/TargetCC.lua +++ b/modules/TargetCC.lua @@ -132,7 +132,7 @@ local SilenceCCList = { 50613, -- Arcane Torrent 28730, - -- Arcane Torrent + -- Arcane Torrent 25046, -- Improved Kick 13867, @@ -249,6 +249,7 @@ function TargetCC.prototype:GetDefaultSettings() settings["enabled"] = false settings["shouldAnimate"] = false + settings["hideAnimationSettings"] = true settings["desiredLerpTime"] = nil settings["lowThreshold"] = 0 settings["side"] = IceCore.Side.Left @@ -263,8 +264,6 @@ end function TargetCC.prototype:GetOptions() local opts = TargetCC.super.prototype.GetOptions(self) - opts["shouldAnimate"] = nil - opts["desiredLerpTime"] = nil opts["lowThreshold"] = nil opts["textSettings"].args["upperTextString"] = nil opts["textSettings"].args["lowerTextString"] = nil @@ -288,6 +287,7 @@ function TargetCC.prototype:GetOptions() type = 'toggle', name = 'Only show for my debuffs', desc = 'With this checked, the bar will only activate for your own CC spells and not those of others.', + width = 'double', get = function() return self.moduleSettings.onlyShowForMyDebuffs end, @@ -299,9 +299,9 @@ function TargetCC.prototype:GetOptions() end, } - return opts + return opts end - + -- 'Protected' methods -------------------------------------------------------- function TargetCC.prototype:GetMaxDebuffDuration(unitName, debuffNames) diff --git a/modules/TargetCast.lua b/modules/TargetCast.lua index b0617b8..4dcc034 100644 --- a/modules/TargetCast.lua +++ b/modules/TargetCast.lua @@ -51,6 +51,7 @@ function TargetCast.prototype:GetDefaultSettings() settings["flashInstants"] = "Never" settings["flashFailures"] = "Never" settings["shouldAnimate"] = false + settings["hideAnimationSettings"] = true settings["usesDogTagStrings"] = false settings["displayNonInterruptible"] = true @@ -88,31 +89,6 @@ end function TargetCast.prototype:GetOptions() local opts = TargetCast.super.prototype.GetOptions(self) - -- Parnic - this exists solely for the console/rock config to work...animating cast bars doesn't make sense - opts["shouldAnimate"] = - { - type = 'toggle', - name = 's', - desc = 's', - set = 's', - get = 's', - hidden = function() - return true - end - } - - opts["desiredLerpTime"] = - { - type = 'toggle', - name = 'd', - desc = 'd', - set = 'd', - get = 'd', - hidden = function() - return true - end - } - opts["barVisible"] = { type = 'toggle', name = 'Bar visible', @@ -133,7 +109,7 @@ function TargetCast.prototype:GetOptions() end, order = 28 } - + opts["bgVisible"] = { type = 'toggle', name = 'Bar background visible', @@ -154,7 +130,7 @@ function TargetCast.prototype:GetOptions() end, order = 29 } - + opts["displayNonInterruptible"] = { type = 'toggle', name = 'Display non-interruptible color', diff --git a/modules/TargetHealth.lua b/modules/TargetHealth.lua index 1ff1b8c..f0a0208 100644 --- a/modules/TargetHealth.lua +++ b/modules/TargetHealth.lua @@ -88,7 +88,7 @@ function IceTargetHealth.prototype:GetOptions() opts["npcHostilityColor"] = { type = "toggle", - name = "Color NPC's by hostility", + name = "Color NPC by hostility", desc = "If you are using the 'class color bar' setting above, then enabling this will color NPC's by their hostility toward you since NPC class isn't very helpful or applicable information.", get = function() return self.moduleSettings.npcHostilityColor @@ -605,8 +605,8 @@ function IceTargetHealth.prototype:EnableClickTargeting(bEnable) ClickCastFrames[self.frame.button] = true -- Parnic - debug code for showing the clickable region on this bar --- self.frame.button:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", --- edgeFile = "Interface/Tooltips/UI-Tooltip-Border", +-- self.frame.button:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", +-- edgeFile = "Interface/Tooltips/UI-Tooltip-Border", -- tile = false, -- insets = { left = 0, right = 0, top = 0, bottom = 0 }}); -- self.frame.button:SetBackdropColor(0,0,0,1); @@ -635,7 +635,7 @@ function IceTargetHealth.prototype:Update(unit) if unit and not (UnitExists(unit)) then -- self:Show(false) return - else + else -- self:Show(true) end @@ -681,7 +681,7 @@ function IceTargetHealth.prototype:Update(unit) elseif (reaction and (reaction < 4)) then self.color = "TargetHealthHostile" end - + if (self.moduleSettings.classColor) and (not self.moduleSettings.npcHostilityColor or UnitPlayerControlled("target")) then self.color = self.unitClass end @@ -887,7 +887,7 @@ function IceTargetHealth.prototype:ShowBlizz() TargetFrame:RegisterEvent("PLAYER_FLAGS_CHANGED") TargetFrame:RegisterEvent("PARTY_MEMBERS_CHANGED") TargetFrame:RegisterEvent("RAID_TARGET_UPDATE") - + ComboFrame:Show() ComboFrame:RegisterEvent("PLAYER_TARGET_CHANGED"); ComboFrame:RegisterEvent("PLAYER_COMBO_POINTS"); @@ -897,7 +897,7 @@ end function IceTargetHealth.prototype:HideBlizz() TargetFrame:Hide() TargetFrame:UnregisterAllEvents() - + ComboFrame:Hide() ComboFrame:UnregisterAllEvents() end diff --git a/modules/TargetInvuln.lua b/modules/TargetInvuln.lua index 83de41b..1c22cad 100644 --- a/modules/TargetInvuln.lua +++ b/modules/TargetInvuln.lua @@ -31,7 +31,7 @@ local InvulnList= { 47585, -- Bladestorm 46924, - -- Grounding Totem Effect + -- Grounding Totem Effect 8178, -- Aura Mastery 31821, @@ -57,7 +57,7 @@ function TargetInvuln.prototype:init(moduleName, unit) -- self.moduleSettings.shouldAnimate = false self:SetDefaultColor("CC:Invuln", 0.99, 0.99, 0.99) - + self.buffList = {} self:PopulateSpellList(self.buffList, InvulnList,"Invuln") @@ -101,6 +101,7 @@ function TargetInvuln.prototype:GetDefaultSettings() settings["enabled"] = false settings["shouldAnimate"] = false + settings["hideAnimationSettings"] = true settings["desiredLerpTime"] = nil settings["lowThreshold"] = 0 settings["side"] = IceCore.Side.Left @@ -114,8 +115,6 @@ end function TargetInvuln.prototype:GetOptions() local opts = TargetInvuln.super.prototype.GetOptions(self) - opts["shouldAnimate"] = nil - opts["desiredLerpTime"] = nil opts["lowThreshold"] = nil opts["textSettings"].args["upperTextString"] = nil opts["textSettings"].args["lowerTextString"] = nil @@ -135,9 +134,9 @@ function TargetInvuln.prototype:GetOptions() end, } - return opts + return opts end - + -- 'Protected' methods -------------------------------------------------------- function TargetInvuln.prototype:GetMaxbuffDuration(unitName, buffNames) @@ -150,9 +149,9 @@ function TargetInvuln.prototype:GetMaxbuffDuration(unitName, buffNames) while buff do remaining = endTime - GetTime() - + if (duration == 0) and (remaining<0) then - + duration =100000 remaining =100000 end @@ -181,20 +180,20 @@ function TargetInvuln.prototype:UpdateTargetBuffs(event, unit, isUpdate) if not isUpdate then self.frame:SetScript("OnUpdate", function() self:UpdateTargetBuffs(nil, self.unit, true) end) self.buffName, self.buffDuration, self.buffRemaining = self:GetMaxbuffDuration(self.unit, self.buffList) - + else self.buffRemaining = math.max(0, self.buffRemaining - (1.0 / GetFramerate())) - + if self.buffRemaining <= 0 then self.buffName = nil self.frame:SetScript("OnUpdate", nil) end end - + name = self.buffName duration = self.buffDuration remaining = self.buffRemaining - + local targetName = UnitName(self.unit) diff --git a/modules/TargetMana.lua b/modules/TargetMana.lua index 8a56018..7bde299 100644 --- a/modules/TargetMana.lua +++ b/modules/TargetMana.lua @@ -13,7 +13,7 @@ function IceTargetMana.prototype:init(moduleName, unit) else IceTargetMana.super.prototype.init(self, moduleName, unit) end - + self:SetDefaultColor("TargetMana", 52, 64, 221) self:SetDefaultColor("TargetRage", 235, 44, 26) self:SetDefaultColor("TargetEnergy", 228, 242, 31) @@ -80,7 +80,7 @@ function IceTargetMana.prototype:Update(unit) if ((not UnitExists(self.unit)) or (self.maxMana == 0)) then self:Show(false) return - else + else self:Show(true) end @@ -112,7 +112,7 @@ function IceTargetMana.prototype:Update(unit) self.color = "Tapped" end end - + self:UpdateBar(self.manaPercentage, self.color) if not IceHUD.IceCore:ShouldUseDogTags() then @@ -147,6 +147,7 @@ function IceTargetMana.prototype:GetOptions() type = 'toggle', name = 'Only show if target uses mana', desc = 'Will only show this bar if the target uses mana (as opposed to rage, energy, runic power, etc.)', + width = 'double', get = function() return self.moduleSettings.onlyShowMana end, diff --git a/modules/TargetOfTargetCast.lua b/modules/TargetOfTargetCast.lua index 2c2b2cf..d42d64f 100644 --- a/modules/TargetOfTargetCast.lua +++ b/modules/TargetOfTargetCast.lua @@ -24,6 +24,7 @@ function TargetTargetCast.prototype:GetDefaultSettings() settings["flashInstants"] = "Never" settings["flashFailures"] = "Never" settings["shouldAnimate"] = false + settings["hideAnimationSettings"] = true settings["usesDogTagStrings"] = false settings["enabled"] = false settings["barVerticalOffset"] = 35 @@ -43,7 +44,7 @@ end function TargetTargetCast.prototype:Disable(core) TargetTargetCast.super.prototype.Disable(self, core) - + self:CancelTimer(self.scheduledEvent, true) end @@ -52,7 +53,7 @@ function TargetTargetCast.prototype:UpdateTargetTarget() self:StopBar() return end - + if self.moduleSettings.selfDisplayMode == "Hide" and UnitIsUnit("player", self.unit) then self:StopBar() return @@ -77,31 +78,6 @@ end function TargetTargetCast.prototype:GetOptions() local opts = TargetTargetCast.super.prototype.GetOptions(self) - -- Parnic - this exists solely for the console/rock config to work...animating cast bars doesn't make sense - opts["shouldAnimate"] = - { - type = 'toggle', - name = 's', - desc = 's', - set = 's', - get = 's', - hidden = function() - return true - end - } - - opts["desiredLerpTime"] = - { - type = 'toggle', - name = 'd', - desc = 'd', - set = 'd', - get = 'd', - hidden = function() - return true - end - } - opts["barVisible"] = { type = 'toggle', name = 'Bar visible', @@ -143,7 +119,7 @@ function TargetTargetCast.prototype:GetOptions() end, order = 29 } - + opts["selfDisplayMode"] = { type = 'select', name = "Self Display Mode", diff --git a/modules/Threat.lua b/modules/Threat.lua index 4c04c21..710ed55 100644 --- a/modules/Threat.lua +++ b/modules/Threat.lua @@ -54,7 +54,7 @@ function IceThreat.prototype:GetOptions() opts["enabled"] = { type = "toggle", - name = "|c" .. self.configColor .. "Enabled|r", + name = "Enabled", desc = "Enable/disable module", get = function() return self.moduleSettings.enabled @@ -70,7 +70,7 @@ function IceThreat.prototype:GetOptions() order = 20 } - opts["aggroAlpha"] = + opts["aggroAlpha"] = { type = 'range', name = 'Aggro Indicator alpha', @@ -127,8 +127,9 @@ function IceThreat.prototype:GetOptions() opts["displaySecondPlaceThreat"] = { type = 'toggle', - name = 'Show second place threat', + name = 'Show second highest threat', desc = 'When tanking, this toggles whether or not the second-highest threat value found in your party or raid is displayed on top of your actual threat value', + width = 'double', get = function() return self.moduleSettings.displaySecondPlaceThreat end, @@ -141,7 +142,7 @@ function IceThreat.prototype:GetOptions() end, order = 27.8 } - + opts["secondPlaceThreatAlpha"] = { type = 'range', name = 'Second place threat alpha', @@ -184,7 +185,7 @@ end -- OVERRIDE function IceThreat.prototype:CreateFrame() IceThreat.super.prototype.CreateFrame(self) - + self:CreateAggroBar() self:CreateSecondThreatBar() end @@ -199,9 +200,9 @@ function IceThreat.prototype:CreateAggroBar() if not (self.aggroBar) then self.aggroBar = CreateFrame("Frame", nil, self.frame) end - + local aggroTop = not IceHUD:xor(self.moduleSettings.reverse, self.moduleSettings.inverse) - + self.aggroBar:SetFrameStrata("BACKGROUND") self.aggroBar:SetWidth(self.settings.barWidth + (self.moduleSettings.widthModifier or 0)) self.aggroBar:SetHeight(self.settings.barHeight) @@ -236,7 +237,7 @@ function IceThreat.prototype:CreateSecondThreatBar() if not (self.secondThreatBar) then self.secondThreatBar = CreateFrame("Frame", nil, self.frame) end - + self.secondThreatBar:SetFrameStrata("MEDIUM") self.secondThreatBar:SetWidth(self.settings.barWidth + (self.moduleSettings.widthModifier or 0)) self.secondThreatBar:SetHeight(self.settings.barHeight) @@ -317,7 +318,7 @@ function IceThreat.prototype:Update(unit) end scaledPercent = ((threatValue / rangeMulti) * 100) end - end + end if not self.combat and (scaledPercent == 0 or rawPercent == 0) then self:Show(false) @@ -349,7 +350,7 @@ function IceThreat.prototype:Update(unit) IceHUD:Debug( "isTanking="..(isTanking or "nil").." threatState="..(threatState or "nil").." scaledPercent="..(scaledPercent or "nil").." rawPercent="..(rawPercent or "nil") ) end - + -- set percentage text self:SetBottomText1( IceHUD:MathRound(self.moduleSettings.showScaledThreat and scaledPercent or rawPercent) .. "%" ) self:SetBottomText2() @@ -472,7 +473,7 @@ function IceThreat.prototype:GetSecondHighestThreat() i = i + 1 end end - + return secondHighestThreat end