View Single Post
03-09-13, 06:36 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
If you just want to show textures and/or font strings on mouseover (like the highlight texture on buttons in default UI) you don't need to use scripts; you can just put them on the "HIGHLIGHT" layer:

Code:
-- A transparent yellow texture will appear on mouseover:
local highlightTexture = frame:CreateTexture(nil, "HIGHLIGHT")
highlightTexture:SetAllPoints(true)
highlightTexture:SetTexture(1, 1, 0, 0.5)

-- The word "Mouse!" will appear on mouseover:
local highlightFontString = frame:CreateFontString(nil, "HIGHLIGHT", "GameFontNormalLarge")
highlightFontString:SetPoint("CENTER")
highlightFontString:SetText("Mouse!")
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote