So, I'm already adding functionality, made a tooltip so that when I add more info I won't get it 100% of the time on the screen.
Lua Code:
local function OnEnter(self)
GameTooltip:SetOwner(self, "ANCHOR_BOTTOM");
GameTooltip:SetText("Artifact Weapon name going here");
GameTooltip:AddLine("Move Artifact Knowledge info here and only keep one line on main frame");
GameTooltip:Show();
end
local function OnLeave(self)
GameTooltip:Hide();
end
frame:SetScript("OnEnter", OnEnter);
frame:SetScript("OnLeave", OnLeave);
It's working as it is, easy enough. Now I wonder, since I need to use variables I already have inside the
frame:SetScript("OnEvent", function(self, event, ...), should I put the tooltip code inside? Return the variables from that one so I can use them outside? Or just remake new ones outside?
What would be the correct way of doing it? The proper, efficient code way xD
I think I should return them and put it outside just because adding more and more stuff to that
frame:SetScript("OnEvent", function(self, event, ...) isn't probably a good idea? But on the other hand, the info that goes in the tooltip needs to be up to date with those Events.
I donno... that's why I'm learning