how to redefine an offical <OnEnter>?
what i thought is to show my tooltip when mouse moves over the default EXPBar....
i check the offical MainMenuBar.xml and found Code:
<OnEnter> if no results.....i will define a new frame over the default EXPBar..... but ...it's not what I want..... :confused: |
Try hooking GameTooltip_AddNewbieTip?
GameTooltip_AddNewbieTip(XPBAR_LABEL, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_XPBAR, 1) Something like: oldGameTooltip_AddNewbieTip = GameTooltip_AddNewbieTip GameTooltip_AddNewbieTip = newGameTooltip_AddNewbieTip function newGameTooltip_AddNewbieTip(v1,v2,v3,v4,v5,v6) oldGameTooltip_AddNewbieTip(v1,v2,v3,v4,v5,v6)end There's a way to pack/unpack arguments (the v1..v6 bit) which I've seen used but don't understand it completely. |
local enterFunc = MainMenuExpBar:GetScript("OnEnter");
local newFunc function () -- your stuff here end MainMenuExpBar:SetScript("OnEnter", function () enterFunc() newFunc(); end); |
:eek: GREAT!!!
i learned a lot!!!!!! THX both Gello and mondinga!!! hmmm.i will try and back with Qs(hope not) :) :o |
All times are GMT -6. The time now is 07:20 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI