Thread Tools Display Modes
Prev Previous Post   Next Post Next
09-20-20, 10:25 AM   #1
draikos
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 4
Creating first addon - Talking Head Frame - Help please

Hi all,

I'm quite impressed with how ElvUI has styled the Talking Head Frame and wanted to do something similar but use the vanilla wow ui.

I'm very new to LUA coding and this is my first addon creation for WoW and would really like to get it working. I have tested the codes below in-game using the "/run XX" to see if it would have the desired changes I want - and it does! I noticed it has to be reapplied each time the Talking Head Frame is loaded. I though it would be best to include this in an addon rather than macro format hence why I wanted to create this addon.
Below is my code - it would be very much appreciated if you can assist with getting this working or perhaps someone create this option in their own addon or something similar.
Any help is much appreciated thanks!

Code:
local TalkingHeadFrame = CreateFrame("FRAME","THF")
local TALKINGHEAD_OPEN = "TALKINGHEAD_REQUESTED"

local function main(frame, event, ...)
	if event == 'TALKINGHEAD_REQUESTED' then
		TalkingHeadFrame.BackgroundFrame:SetAlpha(0)
		TalkingHeadFrame.MainFrame.CloseButton:Hide()

		TalkingHeadFrame.NameFrame.Name:SetTextColor(1, 0.82, 0.02)
		TalkingHeadFrame.NameFrame.Name:SetShadowColor(0, 0, 0, 1)
		TalkingHeadFrame.NameFrame.Name:SetShadowOffset(2, -2)

		TalkingHeadFrame.TextFrame.Text:SetTextColor(255,255,255)
		TalkingHeadFrame.TextFrame.Text:SetShadowColor(0, 0, 0, 1)
		TalkingHeadFrame.TextFrame.Text:SetShadowOffset(2, -2)
	end
end

TalkingHeadFrame:RegisterEvent(TALKINGHEAD_OPEN)
TalkingHeadFrame:SetScript("OnEvent", main)
  Reply With Quote
 

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Creating first addon - Talking Head Frame - Help please

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