Quantcast weird ui fade out. - WoWInterface
Thread Tools Display Modes
08-23-16, 04:14 AM   #1
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
weird ui fade out.

Hi, i have a problem while using this code the UI does a weird fade out like i was pressing Alt Z but it does it self. I do not get any taints or errors.

Lua Code:
  1. local FONT = "Fonts\\ARIALN.TTF"
  2.  
  3. hooksecurefunc(QUEST_TRACKER_MODULE, "SetBlockHeader", function(self, block)
  4.     local Button = block.itemButton
  5.     if Button and not Button.IsSkinned then
  6.         local Icon = Button.icon
  7.         Button:SetNormalTexture("")
  8.         Button:SetBackdropColor(nil)
  9.        
  10.         --A.CreateBorder(Button, true, 28, 28)
  11.  
  12.         Icon:SetTexCoord(.1,.9,.1,.9)
  13.         Icon:SetDrawLayer("OVERLAY")
  14.  
  15.         Button.isSkinned = true
  16.     end
  17. end)
  18.  
  19. hooksecurefunc(AUTO_QUEST_POPUP_TRACKER_MODULE, "Update", function()
  20.     for i = 1, GetNumAutoQuestPopUps() do
  21.         local questID, popUpType = GetAutoQuestPopUp(i)
  22.         local questTitle, level, suggestedGroup, isHeader, isCollapsed, isComplete, isDaily, _ = GetQuestLogTitle(GetQuestLogIndexByID(questID));
  23.         if ( questTitle and questTitle ~= "" ) then
  24.             local Block = AUTO_QUEST_POPUP_TRACKER_MODULE:GetBlock(questID)
  25.             local ScrollChild = Block.ScrollChild
  26.             if not ScrollChild.IsSkinned then
  27.            
  28.                 --A.Skin(ScrollChild)
  29.                
  30.                 ScrollChild:SetScale(0.90)
  31.                 ScrollChild:ClearAllPoints()
  32.                 ScrollChild:SetPoint("CENTER", ObjectiveTrackerBlocksFrame.QuestHeader, -20, -60)
  33.                
  34.                 ScrollChild.BorderTopRight:Hide()
  35.                 ScrollChild.BorderTopLeft:Hide()
  36.                 ScrollChild.BorderTop:Hide()
  37.                 ScrollChild.BorderRight:Hide()
  38.                 ScrollChild.BorderLeft:Hide()
  39.                 ScrollChild.BorderBotLeft:Hide()
  40.                 ScrollChild.BorderBotRight:Hide()
  41.                 ScrollChild.BorderBottom:Hide()
  42.                
  43.                 A.Kill(ScrollChild.QuestIconBadgeBorder)
  44.                 A.Kill(ScrollChild.QuestIconBg)
  45.                 A.Kill(ScrollChild.Bg)
  46.                 A.Kill(ScrollChild.FlashFrame.IconFlash)
  47.                
  48.                 ScrollChild.IsSkinned = true
  49.             end
  50.         end
  51.     end
  52. end)
  53.  
  54. hooksecurefunc(QUEST_TRACKER_MODULE, "Update", function(self)
  55.     for i = 1, GetNumQuestWatches() do
  56.         local questID = GetQuestWatchInfo(i)
  57.         if not questID then break end
  58.         local block = QUEST_TRACKER_MODULE:GetBlock(questID)
  59.         block.HeaderText:SetFont(FONT, 13.5, "THINOUTLINE")
  60.         block.HeaderText:SetShadowOffset(1, -1)
  61.         block.HeaderText:SetShadowColor(0, 0, 0)
  62.         block.HeaderText:SetHeight(15)
  63.     end
  64. end)
  65.  
  66. hooksecurefunc(DEFAULT_OBJECTIVE_TRACKER_MODULE, "AddObjective", function(self, block, objectiveKey, _, lineType)
  67.     local line = self:GetLine(block, objectiveKey, lineType)
  68.     if not line.styled then
  69.         line.Text:SetFont(FONT, 11, "THINOUTLINE")
  70.         line.Text:SetShadowOffset(1, -1)
  71.         line.Text:SetShadowColor(0, 0, 0)
  72.         line.styled = true
  73.     end
  74.     if line.Dash and line.Dash:IsShown() then line.Dash:SetText("") end
  75. end)
  76.  
  77. hooksecurefunc("ObjectiveTracker_Update", function()
  78.     if ObjectiveTrackerFrame.MODULES then
  79.         for i = 1, #ObjectiveTrackerFrame.MODULES do
  80.             ObjectiveTrackerFrame.MODULES[i].Header.Background:SetAtlas(nil)
  81.             ObjectiveTrackerFrame.MODULES[i].Header.Text:SetFont(FONT, 16, "THINOUTLINE")
  82.             ObjectiveTrackerFrame.MODULES[i].Header.Text:SetShadowOffset(1, -1)
  83.             ObjectiveTrackerFrame.MODULES[i].Header.Text:SetShadowColor(0,0,0)
  84.            
  85.             local AObjectiveTrackerHeaderPanel = CreateFrame("Frame", nil, ObjectiveTrackerFrame.MODULES[i].Header)
  86.             AObjectiveTrackerHeaderPanel:SetFrameStrata("BACKGROUND")
  87.             AObjectiveTrackerHeaderPanel:SetFrameLevel(0)
  88.             AObjectiveTrackerHeaderPanel:SetAllPoints(ObjectiveTrackerFrame.MODULES[i].Header)
  89.             AObjectiveTrackerHeaderPanel:SetPoint("CENTER")
  90.            
  91.             local BackgroundObjective = AObjectiveTrackerHeaderPanel:CreateTexture(nil, "BORDER")
  92.             BackgroundObjective:SetPoint("CENTER", AObjectiveTrackerHeaderPanel, 0, -7)
  93.             BackgroundObjective:SetSize(240, 8)
  94.             BackgroundObjective:SetTexture("Interface\\Buttons\\WHITE8x8")
  95.             BackgroundObjective:SetVertexColor(0.8, 0.8, 0.8)
  96.            
  97.             local BackgroundObjectiveBorder = CreateFrame("Frame", nil, AObjectiveTrackerHeaderPanel)
  98.             BackgroundObjectiveBorder:SetPoint("CENTER", AObjectiveTrackerHeaderPanel, 0, -7)
  99.             BackgroundObjectiveBorder:SetSize(240, 8)
  100.            
  101.             --A.CreateBorder(BackgroundObjectiveBorder)
  102.            
  103.         end
  104.     end
  105. end)
  106.  
  107. hooksecurefunc(DEFAULT_OBJECTIVE_TRACKER_MODULE, "AddProgressBar", function(self, block, line, questId, finished)
  108.     local AProgressBar = line.ProgressBar
  109.     if AProgressBar and not AProgressBar.skinned then
  110.         AProgressBar.Bar:SetHeight(20)
  111.         AProgressBar.Bar:SetStatusBarTexture("Interface\\Buttons\\WHITE8x8")
  112.        
  113.         AProgressBar.Bar.Label:SetFont(FONT, 12, "THINOUTLINE")
  114.         AProgressBar.Bar.Label:SetShadowOffset(1, -1)
  115.         AProgressBar.Bar.Label:SetShadowColor(0,0,0)
  116.        
  117.         AProgressBar.Bar.Label:ClearAllPoints()
  118.         AProgressBar.Bar.Label:SetPoint("CENTER", AProgressBar.Bar, 2, 0)
  119.         AProgressBar.Bar.Label:SetDrawLayer("OVERLAY", 7)
  120.        
  121.         A.CreateBorder(AProgressBar.Bar)
  122.  
  123.         AProgressBar.Bar.BorderLeft:Hide()
  124.         AProgressBar.Bar.BorderRight:Hide()
  125.         AProgressBar.Bar.BorderMid:Hide()
  126.        
  127.         AProgressBar.skinned = true
  128.     end
  129. end)
  130.  
  131. hooksecurefunc(BONUS_OBJECTIVE_TRACKER_MODULE, "AddProgressBar", function(self, block, line)
  132.     local AProgressBar = line.ProgressBar
  133.     if AProgressBar and not AProgressBar.skinned then
  134.         AProgressBar.Bar:SetHeight(20)
  135.         AProgressBar.Bar:SetStatusBarTexture("Interface\\Buttons\\WHITE8x8")
  136.        
  137.         AProgressBar.Bar.Label:SetFont(FONT, 12, "THINOUTLINE")
  138.         AProgressBar.Bar.Label:SetShadowOffset(1, -1)
  139.         AProgressBar.Bar.Label:SetShadowColor(0,0,0)
  140.        
  141.         AProgressBar.Bar.Label:ClearAllPoints()
  142.         AProgressBar.Bar.Label:SetPoint("CENTER", AProgressBar.Bar, 2, 0)
  143.         AProgressBar.Bar.Label:SetDrawLayer("OVERLAY", 7)
  144.        
  145.         --A.CreateBorder(AProgressBar.Bar)
  146.  
  147.         AProgressBar.Bar.BarFrame:Hide()
  148.         AProgressBar.Bar.IconBG:Hide()
  149.         AProgressBar.Bar.Icon:Hide()
  150.        
  151.         AProgressBar.skinned = true
  152.     end
  153. end)
  154.    
  155. hooksecurefunc(SCENARIO_TRACKER_MODULE, "AddProgressBar", function(self, block, line)
  156.     local AProgressBar = line.ProgressBar
  157.     if AProgressBar and not AProgressBar.skinned then
  158.         AProgressBar.Bar:SetHeight(20)
  159.         AProgressBar.Bar:SetStatusBarTexture("Interface\\Buttons\\WHITE8x8")
  160.  
  161.         AProgressBar.Bar.Label:SetFont(FONT, 12, "OUTLINE")
  162.         AProgressBar.Bar.Label:SetShadowOffset(1, -1)
  163.         AProgressBar.Bar.Label:SetShadowColor(0,0,0)
  164.        
  165.         AProgressBar.Bar.Label:ClearAllPoints()
  166.         AProgressBar.Bar.Label:SetPoint("CENTER", AProgressBar.Bar, 2, 0)
  167.         AProgressBar.Bar.Label:SetDrawLayer("OVERLAY", 7)
  168.  
  169.         --A.CreateBorder(AProgressBar.Bar)
  170.  
  171.         for _, v in pairs({AProgressBar.Bar.BarFrame, AProgressBar.Bar.Icon, AProgressBar.Bar.IconBG}) do
  172.             v:Hide()
  173.         end
  174.  
  175.         AProgressBar.skinned = true
  176.     end
  177. end)   
  178.  
  179. function SkinScenario()
  180.     local AObjectiveTrackerScenarioStageText = ScenarioStageBlock.Stage
  181.     AObjectiveTrackerScenarioStageText:SetFont(FONT, 14, "THINOUTLINE")
  182.     AObjectiveTrackerScenarioStageText:SetShadowOffset(1, -1)
  183.     AObjectiveTrackerScenarioStageText:SetShadowColor(0,0,0)
  184.  
  185.     local AObjectiveTrackerScenarioNameText = ScenarioStageBlock.Name
  186.     AObjectiveTrackerScenarioNameText:SetFont(FONT, 14, "THINOUTLINE")
  187.     AObjectiveTrackerScenarioNameText:SetShadowOffset(1, -1)
  188.     AObjectiveTrackerScenarioNameText:SetShadowColor(0,0,0)
  189.  
  190.     local AScenarioStageBlock = _G["ScenarioStageBlock"]
  191.     AScenarioStageBlock:SetHeight(70)
  192.  
  193.     A.Kill(ScenarioStageBlock.NormalBG)
  194.     A.Kill(ScenarioStageBlock.GlowTexture)
  195.     ScenarioStageBlock.FinalBG:SetAlpha(0)
  196. end
  197.  
  198. hooksecurefunc(SCENARIO_CONTENT_TRACKER_MODULE, "Update", SkinScenario)
  199. hooksecurefunc("ScenarioBlocksFrame_OnLoad", SkinScenario)
  200.  
  201. -- Minimize Button
  202.  
  203. local AMinimizeButton = ObjectiveTrackerFrame.HeaderMenu.MinimizeButton
  204. AMinimizeButton:SetPoint("TOPRIGHT", UIParent, -6.5, -148)
  205. AMinimizeButton:SetSize(14, 14)
  206. AMinimizeButton:SetNormalTexture("")
  207. AMinimizeButton:SetPushedTexture("")
  208. AMinimizeButton:SetHighlightTexture("")
  209. AMinimizeButton:SetDisabledTexture("")
  210.  
  211. AMinimizeButton:SetBackdrop({
  212.     bgFile = "Interface\\Buttons\\WHITE8x8",
  213.     insets = {top = 1, left = 1, bottom = 1, right = 1},
  214. })
  215. AMinimizeButton:SetBackdropColor(0,0,0,0.80)
  216.  
  217. --A.CreateBorder(AMinimizeButton)
  218.  
  219. local AMinimizeButtonText = AMinimizeButton:CreateFontString(nil, "OVERLAY")
  220. AMinimizeButtonText:SetPoint("CENTER", 1.5, 0.5)
  221. AMinimizeButtonText:SetFont(FONT 18, "THINOUTLINE")
  222. AMinimizeButtonText:SetShadowOffset(1, -1)
  223. AMinimizeButtonText:SetShadowColor(0, 0, 0)
  224. AMinimizeButtonText:SetText("-")
  225. AMinimizeButtonText:SetTextColor(1,1,1)
  226.  
  227. local BorderColor = 0.125, 0.125, 0.125
  228.  
  229. AMinimizeButton:HookScript("OnEnter", function() AMinimizeButtonText:SetTextColor(1, 0, 0) A.ColorBorder(AMinimizeButton, 1, 0, 0) end)
  230. AMinimizeButton:HookScript("OnLeave", function() AMinimizeButtonText:SetTextColor(1, 1, 1) A.ColorBorder(AMinimizeButton, BorderColor, BorderColor, BorderColor) end)
  Reply With Quote
08-23-16, 03:10 PM   #2
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Never mind, it wasn't that, its my buff frames.. if anyone could help out i will be very happy!


http://hastebin.com/iteweyohun.lua
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » weird ui fade out.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off