View Single Post
09-20-20, 08:31 PM   #7
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
If you are running any other addon(s) that alter the TH frame, they might be "undoing" your code.

With what you have, it's probably easier to reduce all the code (after making a copy) to just:

Lua Code:
  1. TalkingHeadFrame.MainFrame.CloseButton:Hide()
  2. TalkingHeadFrame.BackgroundFrame:SetAlpha(0)
  3.  
  4. TalkingHeadFrame:HookScript("OnShow", function(self)
  5.     self.NameFrame.Name:SetTextColor(1, 0.82, 0.02)
  6.     self.NameFrame.Name:SetShadowColor(0, 0, 0, 1)
  7.     self.NameFrame.Name:SetShadowOffset(2, -2)
  8.  
  9.     self.TextFrame.Text:SetTextColor(255,255,255)
  10.     self.TextFrame.Text:SetShadowColor(0, 0, 0, 1)
  11.     self.TextFrame.Text:SetShadowOffset(2, -2)
  12. end)

and add the following to your addons .toc file:
Code:
## LoadOnDemand: 1
## LoadWith: Blizzard_TalkingHeadUI
This will automatically load the addon when the TH addon loads and hook the OnShow function only once (your other code adds a new hook every time the event is called).

You only need the other "plumbing" if the addon will be doing other things as well.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 09-20-20 at 08:35 PM.
  Reply With Quote