From 99b89dae2de713d471424f93bbddb855e5b55b8b Mon Sep 17 00:00:00 2001 From: shagu Date: Fri, 2 Aug 2019 17:56:09 +0200 Subject: [PATCH] nameplates: use alpha to skip flicker on init --- modules/nameplates.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/nameplates.lua b/modules/nameplates.lua index 607dfd82..46aaf634 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -25,12 +25,11 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function () if nameplate:GetObjectType() == NAMEPLATE_FRAMETYPE then regions = nameplate:GetRegions() if regions and regions:GetObjectType() == "Texture" and regions:GetTexture() == "Interface\\Tooltips\\Nameplate-Border" then - local visible = nameplate:IsVisible() - nameplate:Hide() + local visible = nameplate:GetAlpha() + nameplate:SetAlpha(0) nameplate:SetScript("OnShow", pfUI.nameplates.OnShow) nameplate:SetScript("OnUpdate", pfUI.nameplates.OnUpdate) - nameplate:SetAlpha(1) - if visible then nameplate:Show() end + nameplate:SetAlpha(visible) end end end