Thread Tools Display Modes
Prev Previous Post   Next Post Next
12-01-22, 04:37 PM   #3
Uitat
A Chromatic Dragonspawn
 
Uitat's Avatar
AddOn Author - Click to view addons
Join Date: May 2011
Posts: 162
Originally Posted by Xrystal View Post
Looking at the code you put there I am sure you are missing the Script assignments for OnEnter and OnLeave to call your functions for that functionality. At the moment I think the frame is unaware of them and thus can't show a tooltip.

thank you for the eye balls, i fixed it and i will leave the code here so others may look at it later
Lua Code:
  1. local frame = CreateFrame("Button", "Options7", Config_BaseFrame, nil)
  2.    frame:SetHeight(96)
  3.    frame:SetWidth(96)
  4.    frame:SetNormalTexture("Interface\\AddOns\\_Deranjata\\media\\cfgiwin\\paladin.tga")
  5.    frame:SetPushedTexture("Interface\\AddOns\\_Deranjata\\media\\cfgiwin\\paladin.tag")
  6.    frame:SetHighlightTexture("Interface\\AddOns\\_Deranjata\\media\\cfgiwin\\paladin.tga")
  7.    frame:SetText("")
  8.    frame:ClearAllPoints()
  9.    frame:SetPoint("BOTTOM", 96, 60)
  10.  
  11. Options7:SetScript("OnEnter", function(self)
  12.    GameTooltip:SetOwner(self, "ANCHOR_CURSOR");
  13.    GameTooltip:ClearLines();
  14.    GameTooltip:SetText("PALADIN", 0.990, 0.614, 0.946, 0.75, 1)
  15.    GameTooltip:Show() PlaySound(53693)
  16. end)
  17.                        
  18. Options7:SetScript("OnLeave", function(self)
  19.    GameTooltip:Hide()
  20. end)
  21.                    
  22. Options7:SetScript("OnClick", function() PALADIN_OnClick()
  23.  
  24. end)
__________________
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » help creating a tooltip for button

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