From 89f60cb34fd5145d6472d627a8d4a1bfe81fd068 Mon Sep 17 00:00:00 2001 From: Parnic Date: Wed, 30 Aug 2017 23:29:20 -0500 Subject: [PATCH] Added raid icon toggle to Info modules --- changelog.txt | 11 +++++++---- modules/TargetInfo.lua | 20 +++++++++++++++++++- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/changelog.txt b/changelog.txt index 36b3d42..8ae3ada 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,14 +1,17 @@ +v1.10.16.1: +- Added option to hide the raid icon for Info frames. + v1.10.16: -- Updated shard texture for Warlocks +- Updated shard texture for Warlocks. v1.10.15.2: -- Updated shard display for Destro Warlocks (ticket #234, thanks stencil!) +- Updated shard display for Destro Warlocks (ticket #234, thanks stencil!). v1.10.15.1: -- Fixed an error in IceHUD's usage of GetLFGProposal()'s return values exposed by the 7.2.5 Chromie quests +- Fixed an error in IceHUD's usage of GetLFGProposal()'s return values exposed by the 7.2.5 Chromie quests. v1.10.15: -- Fixed error on 7.2 due to a CVar being removed +- Fixed error on 7.2 due to a CVar being removed. - Updated TOC for 7.2 v1.10.14: diff --git a/modules/TargetInfo.lua b/modules/TargetInfo.lua index a584b4f..25a38d8 100644 --- a/modules/TargetInfo.lua +++ b/modules/TargetInfo.lua @@ -958,6 +958,23 @@ function IceTargetInfo.prototype:GetOptions() order = 39.3, } + opts["showRaidIcon"] = { + type = 'toggle', + name = L['Show raid icon'], + desc = L['Whether or not to show the raid icon for this unit.'], + get = function() + return self.moduleSettings.showRaidIcon + end, + set = function(info, v) + self.moduleSettings.showRaidIcon = v + self:UpdateRaidTargetIcon() + end, + disabled = function() + return not self.moduleSettings.enabled + end, + order = 37.02, + } + return opts end @@ -1011,6 +1028,7 @@ function IceTargetInfo.prototype:GetDefaultSettings() ["sortByExpiration"] = true, } } + defaults["showRaidIcon"] = true return defaults end @@ -1480,7 +1498,7 @@ function IceTargetInfo.prototype:AuraChanged(event, unit) end function IceTargetInfo.prototype:UpdateRaidTargetIcon() - if not (UnitExists(self.unit)) then + if not (UnitExists(self.unit)) or not self.moduleSettings.showRaidIcon then self.frame.raidIcon:Hide() return end