mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- removed most of the rest of the garbage that was being generated during combat or when changing targets
- reduced cpu usage by 33%-50% across the board (and more in some cases) by changing how updates are registered and how often they run. now the 'update period' slider actually matters. it defaults to 0.033 meaning that frames update about 30 times a second instead of every frame - fixed the "always" display mode for cooldown bars to respect alpha settings (ooc/with target/in combat/etc.)
This commit is contained in:
@ -54,8 +54,10 @@ end
|
||||
function PlayerInfo.prototype:CreateFrame(redraw)
|
||||
PlayerInfo.super.prototype.CreateFrame(self, redraw)
|
||||
|
||||
self.frame.menu = function()
|
||||
ToggleDropDownMenu(1, nil, PlayerFrameDropDown, "cursor")
|
||||
if not self.frame.menu then
|
||||
self.frame.menu = function()
|
||||
ToggleDropDownMenu(1, nil, PlayerFrameDropDown, "cursor")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -68,26 +70,28 @@ StaticPopupDialogs["ICEHUD_BUFF_DISMISS_UNAVAILABLE"] =
|
||||
hideOnEscape = 0,
|
||||
}
|
||||
|
||||
local function OnBuffMouseUp(frame, button)
|
||||
if IceHUD.WowVer >= 40000 then
|
||||
StaticPopup_Show("ICEHUD_BUFF_DISMISS_UNAVAILABLE")
|
||||
else
|
||||
--[[ if( button == "RightButton" ) then
|
||||
if buffs[i].type == "mh" then
|
||||
CancelItemTempEnchantment(1)
|
||||
elseif buffs[i].type == "oh" then
|
||||
CancelItemTempEnchantment(2)
|
||||
else
|
||||
CancelUnitBuff("player", i)
|
||||
end
|
||||
end]]
|
||||
end
|
||||
end
|
||||
|
||||
function PlayerInfo.prototype:CreateIconFrames(parent, direction, buffs, type)
|
||||
local buffs = PlayerInfo.super.prototype.CreateIconFrames(self, parent, direction, buffs, type)
|
||||
|
||||
for i = 1, IceCore.BuffLimit do
|
||||
if (self.moduleSettings.mouseBuff) then
|
||||
buffs[i]:SetScript("OnMouseUp", function( self, button)
|
||||
if IceHUD.WowVer >= 40000 then
|
||||
StaticPopup_Show("ICEHUD_BUFF_DISMISS_UNAVAILABLE")
|
||||
else
|
||||
if( button == "RightButton" ) then
|
||||
if buffs[i].type == "mh" then
|
||||
CancelItemTempEnchantment(1)
|
||||
elseif buffs[i].type == "oh" then
|
||||
CancelItemTempEnchantment(2)
|
||||
else
|
||||
CancelUnitBuff("player", i)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
buffs[i]:SetScript("OnMouseUp", OnBuffMouseUp)
|
||||
else
|
||||
buffs[i]:SetScript("OnMouseUp", nil)
|
||||
end
|
||||
|
Reference in New Issue
Block a user