You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.1 KiB

4 years ago
NarciCompetitiveDisplayMixin = {};
function NarciCompetitiveDisplayMixin:OnLoad()
self:ClearAllPoints();
self:SetPoint("TOP", Narci_ConciseStatFrame.Primary, "TOP", 0, 0);
self.LoadingOverlay.LoadingIndicator:SetTexture("Interface\\AddOns\\Narcissus\\Art\\Modules\\Competitive\\LoadingIndicator", nil, nil, "TRILINEAR");
end
function NarciCompetitiveDisplayMixin:ShowMythicPlus()
5 months ago
self.MythicPlus:PostUpdate();
4 years ago
end
function NarciCompetitiveDisplayMixin:HideLoading()
5 months ago
self:SetScript("OnUpdate", nil);
4 years ago
if self.LoadingOverlay:IsShown() then
self.LoadingOverlay.FadeOut:Play();
5 months ago
return true
4 years ago
end
end
function NarciCompetitiveDisplayMixin:ShowLoading()
if not self.LoadingOverlay:IsShown() then
self.LoadingOverlay.FadeIn:Play();
self.LoadingOverlay:Show();
5 months ago
self.t = 0;
self:SetScript("OnUpdate", self.OnUpdate);
end
end
function NarciCompetitiveDisplayMixin:OnUpdate(elapsed)
self.t = self.t + elapsed;
if self.t > 2 then
self.t = 0;
if self:HideLoading() then
self.MythicPlus:PostUpdate();
end
4 years ago
end
end