-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Classic: Added Naxxramas Raid Debuffs Retail: Added Shadowlands dungeon&raid debuffs Some improvements in raiddebuffs code, now spires of ascension dungeon is detected correctly. Heal Status: Added UNIT_CONNECTION event trying to fix ticket #907. Fixing shadowlands bug, when entering Maw zone layout was not visible (ticket #901) Fixing options crash with some debuffs due to a tooltip parsing bug (ticket #900). Shadowlands TOC Update Added RaidDebuffsModule for Shadowlands (only instances and bosses, not debuffs yet). Fixing a bug in icons indicator font change option (Ticket #893) Added an option to Hide Player when in group in layout editor (ticket #890) Added an option to display squares in icons indicators (ticket #888) Refactored RightClickPopupMenu Code, now the focus can be set using Grid2 RightClickMenu. Added maxhealth event to death status. Added some new exceptions to indicators names blacklist, see ticket (#882) Now Clean Database Profile button renames indicators with an invalid name. Retail TOC Update Disabled animations for square indicator (a shape indicator can be used instead). Minor bugs fixes. Removed animation options for text indicators. Added shape indicator to morph list. Updated shape icon. Optimizations and fixing some bugs in the new blink/animation code. Shape indicator bug fixes. IndicatorIcons and IndicatorMultibar fix of ancient bug. Refactored blink and zoom in/out animations code. Added textures for the new shape indicator. Added a new "Shape" Indicator: this indicator displays simple shapes (not only squares) like circles, triangles, etc. Some reactoring of the frames backdrops creation code in indicators. Refactored colors management code in options. Fixing some unlocalized strings (ticket #870). Classic: AOE heals status: removed raid cooldowns, and a lot of invalid aoe heals (ticket #869). Fixing some unlocalized strings (ticket #868) ReadCheck status: Some refactoring. Icons Indicator: added sanity check to color alpha component (ticket #866). Icon Indicator: Now cooldown background in flat textures are darker. Role Status: GetColor now always returns a valid color.
- Loading branch information
1 parent
5bb645a
commit bd721ac
Showing
61 changed files
with
1,514 additions
and
701 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
-- Implements blink and zoom in/out effects for indicators. | ||
|
||
local indicatorPrototype = Grid2.indicatorPrototype | ||
|
||
-- Zoom in/out effect, not using animation BOUNCE looping method because is bugged (generate glitches) | ||
local function CreateScaleAnimation(frame, dbx) | ||
local scale = dbx.animScale or 1.5 | ||
local durat = (dbx.animDuration or 0.7) / 2 | ||
local origin = dbx.animOrigin or 'CENTER' | ||
local group = frame:CreateAnimationGroup() | ||
local grow = group:CreateAnimation("Scale") | ||
local shrink = group:CreateAnimation("Scale") | ||
grow:SetOrder(1) | ||
grow:SetOrigin(origin,0,0) | ||
grow:SetScale(scale,scale) | ||
grow:SetDuration(durat) | ||
shrink:SetOrder(2) | ||
shrink:SetOrigin(origin,0,0) | ||
shrink:SetScale(1/scale,1/scale) | ||
shrink:SetDuration(durat) | ||
frame.scaleAnim, group.grow, group.shrink = group, grow, shrink | ||
return group | ||
end | ||
|
||
local function SetScaleEffect(indicator, frame, status) | ||
local anim = frame.scaleAnim | ||
if status then | ||
if not (anim and anim:IsPlaying()) and not (indicator.dbx.animOnEnabled and frame:IsVisible()) then | ||
(anim or CreateScaleAnimation(frame, indicator.dbx)):Play() | ||
end | ||
elseif anim then | ||
anim:Stop() | ||
end | ||
end | ||
|
||
-- Blink effect | ||
local function CreateBlinkAnimation(frame, dbx) | ||
local anim = frame:CreateAnimationGroup() | ||
local alpha = anim:CreateAnimation("Alpha") | ||
anim:SetLooping("REPEAT") | ||
alpha:SetOrder(1) | ||
alpha:SetFromAlpha(1) | ||
alpha:SetToAlpha(0.1) | ||
alpha:SetDuration(1/dbx.blinkFrequency) | ||
frame.blinkAnim = anim | ||
return anim | ||
end | ||
|
||
local function SetBlinkEffect(indicator, frame, enabled) | ||
local anim = frame.blinkAnim | ||
if enabled then | ||
(anim or CreateBlinkAnimation(frame,Grid2Frame.db.shared)):Play() | ||
elseif anim then | ||
anim:Stop() | ||
end | ||
end | ||
|
||
-- Indicator Update functions | ||
local function UpdateBlinkScale(self, parent, unit) | ||
local status, state = self:GetCurrentStatus(unit) | ||
local frame = self.GetBlinkFrame(self,parent) | ||
SetBlinkEffect( self, frame, state=="blink" ) | ||
SetScaleEffect( self, frame, status ) | ||
self:OnUpdate(parent, unit, status) | ||
end | ||
|
||
local function UpdateScale(self, parent, unit) | ||
local status, state = self:GetCurrentStatus(unit) | ||
SetScaleEffect( self, self.GetBlinkFrame(self,parent), status ) | ||
self:OnUpdate(parent, unit, status) | ||
end | ||
|
||
local function UpdateBlink(self, parent, unit) | ||
local status, state = self:GetCurrentStatus(unit) | ||
SetBlinkEffect( self, self.GetBlinkFrame(self,parent), state=="blink" ) | ||
self:OnUpdate(parent, unit, status) | ||
end | ||
|
||
-- Public method (overwriting the original UpdateDB defined in GridIndicator.lua) | ||
function indicatorPrototype:UpdateDB() | ||
if self.LoadDB then | ||
self:LoadDB() | ||
end | ||
if self.GetBlinkFrame then | ||
if Grid2Frame.db.shared.blinkType~="None" then | ||
self.Update = self.dbx.animEnabled and UpdateBlinkScale or UpdateBlink | ||
else | ||
self.Update = self.dbx.animEnabled and UpdateScale or indicatorPrototype.Update | ||
end | ||
elseif not rawget(self, "Update") then | ||
self.Update = indicatorPrototype.Update -- speed optimization | ||
end | ||
end |
Oops, something went wrong.