From 4e93009e13f2dab2625e59ab8a1c0b9258a09264 Mon Sep 17 00:00:00 2001 From: iceroth Date: Mon, 4 Sep 2006 18:20:43 +0000 Subject: [PATCH] Bugfixes --- IceHUD.toc | 2 +- modules/ComboPoints.lua | 31 +++++++++++++++++++++++++++++-- modules/TargetInfo.lua | 5 +++-- modules/TargetOfTarget.lua | 6 +++--- 4 files changed, 36 insertions(+), 8 deletions(-) diff --git a/IceHUD.toc b/IceHUD.toc index 04f416b..e040ea8 100644 --- a/IceHUD.toc +++ b/IceHUD.toc @@ -3,7 +3,7 @@ ## Name: IceHUD ## Title: IceHUD |cff7fff7f -Ace2-|r ## Notes: Another HUD mod -## Version: 0.6.1 ($Revision$) +## Version: 0.6.2 ($Revision$) ## SavedVariables: IceCoreDB ## OptionalDeps: Ace2, DewdropLib, FuBar_ToFu, DruidBar, SoleManax, MobHealth ## X-Category: UnitFrame diff --git a/modules/ComboPoints.lua b/modules/ComboPoints.lua index 6dd3991..63e88c8 100644 --- a/modules/ComboPoints.lua +++ b/modules/ComboPoints.lua @@ -79,6 +79,23 @@ function ComboPoints.prototype:GetOptions() order = 33 } + opts["gradient"] = { + type = "toggle", + name = "Change color", + desc = "1 compo point: yellow, 5 combo points: red", + get = function() + return self.moduleSettings.gradient + end, + set = function(v) + self.moduleSettings.gradient = v + self:Redraw() + end, + disabled = function() + return not self.moduleSettings.enabled + end, + order = 34 + } + return opts end @@ -89,6 +106,7 @@ function ComboPoints.prototype:GetDefaultSettings() defaults["vpos"] = 0 defaults["comboFontSize"] = 20 defaults["comboMode"] = "Graphical" + defaults["gradient"] = false return defaults end @@ -138,7 +156,6 @@ function ComboPoints.prototype:CreateComboFrame() self.frame.numeric:SetWidth(50) self.frame.numeric:SetJustifyH("CENTER") - self.frame.numeric:SetTextColor(self:GetColor("combo", 0.7)) self.frame.numeric:SetPoint("TOP", self.frame, "TOP", 0, 0) self.frame.numeric:Show() @@ -173,7 +190,11 @@ function ComboPoints.prototype:CreateComboFrame() self.frame.graphical[i]:SetFrameStrata("BACKGROUND") self.frame.graphical[i]:SetAllPoints(self.frame.graphicalBG[i]) - self.frame.graphical[i]:SetStatusBarColor(self:GetColor("combo")) + local r, g, b = self:GetColor("combo") + if (self.moduleSettings.gradient) then + g = g - (0.15*i) + end + self.frame.graphical[i]:SetStatusBarColor(r, g, b) self.frame.graphical[i]:Hide() end @@ -189,6 +210,12 @@ function ComboPoints.prototype:UpdateComboPoints() end if (self.moduleSettings.comboMode == "Numeric") then + local r, g, b = self:GetColor("combo") + if (self.moduleSettings.gradient and points) then + g = g - (0.15*points) + end + self.frame.numeric:SetTextColor(r, g, b, 0.7) + self.frame.numeric:SetText(points) else self.frame.numeric:SetText() diff --git a/modules/TargetInfo.lua b/modules/TargetInfo.lua index 8333da4..940cd5d 100644 --- a/modules/TargetInfo.lua +++ b/modules/TargetInfo.lua @@ -235,6 +235,7 @@ end function TargetInfo.prototype:CreateGuildTextFrame() self.frame.targetGuild = self:FontFactory(nil, self.moduleSettings.fontSize, nil, self.frame.targetGuild) + self.frame.targetInfo:SetWidth(self.width) self.frame.targetGuild:SetHeight(14) self.frame.targetGuild:SetJustifyH("CENTER") self.frame.targetGuild:SetJustifyV("TOP") @@ -323,7 +324,7 @@ function TargetInfo.prototype:CreateIconFrames(parent, direction, buffs, type) local pos = (i > 8) and i-8 or i local x = (((pos-1) * self.moduleSettings.buffSize) + (pos-0)) * direction - local y = (i > 8) and -self.moduleSettings.buffSize-0 or 0 + local y = (i > 8) and -self.moduleSettings.buffSize-1 or 0 buffs[i]:ClearAllPoints() buffs[i]:SetPoint("TOP", x, y) @@ -374,7 +375,7 @@ function TargetInfo.prototype:UpdateBuffs() self.frame.buffFrame.buffs[i].icon.texture:SetTexture(buffTexture) self.frame.buffFrame.buffs[i].icon.texture:SetTexCoord(zoom, 1-zoom, zoom, 1-zoom) - local alpha = buffTexture and 0.3 or 0 + local alpha = buffTexture and 0.5 or 0 self.frame.buffFrame.buffs[i].texture:SetTexture(0, 0, 0, alpha) self.frame.buffFrame.buffs[i].texture:SetVertexColor(color.r, color.g, color.b) diff --git a/modules/TargetOfTarget.lua b/modules/TargetOfTarget.lua index 351d01c..c4c140e 100644 --- a/modules/TargetOfTarget.lua +++ b/modules/TargetOfTarget.lua @@ -217,8 +217,8 @@ function TargetOfTarget.prototype:CreateDebuffFrame() self.frame.debuffFrame = CreateFrame("Frame", nil, self.frame) self.frame.debuffFrame:SetFrameStrata("BACKGROUND") - self.frame.debuffFrame:SetWidth(200) - self.frame.debuffFrame:SetHeight(20) + self.frame.debuffFrame:SetWidth(10) + self.frame.debuffFrame:SetHeight(self.height) self.frame.debuffFrame:SetPoint("TOPLEFT", self.frame, "TOPRIGHT", 4, 0) self.frame.debuffFrame:Show() @@ -229,7 +229,7 @@ end function TargetOfTarget.prototype:CreateIconFrames(parent) local buffs = {} - + for i = 1, 16 do buffs[i] = CreateFrame("Frame", nil, parent) buffs[i]:SetFrameStrata("BACKGROUND")