I'm trying to create a frame that, if clicked, selects the Target of Target. I'm currently using this to create the frame:
Code:
local ToTSelectHelper = CreateFrame("Frame","ToTSelectHelper",self)
ToTSelectHelper:SetWidth(80)
ToTSelectHelper:SetHeight(20)
ToTSelectHelper:SetPoint("TOPLEFT", self, "TOPRIGHT", 0, -30)
ToTSelectHelper:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 0, right = 0, top = 0, bottom = 0 }})
(the backdrop is just there for config purposes to make the frame visible)
The question is: How do I make this interactive/clickable. And I guess after it is clickable, it still needs to "know" what it should do when clicked?