Go Back   WowAce Forums > World of Warcraft > Development Help
Development Help Need help from other developers, come here to talk about it!

Reply
 
Thread Tools
Old 05-01-2012   #1
Azzash
Newbie
 
Join Date: Dec 2011
Posts: 2
Default Usual question : Onlick to get RightButton (<- mouse) doesn't work... any idea ?

in xml file :
Quote:
[...]
<Scripts>
<OnClick>
NameOfButton_OnClick(self, button);
</OnClick>
</Scripts>
[...]
in lua file :
Quote:
function NameOfButton_OnClick(self, button)
print(button);
end
When i click on "NameOfButton" it's only work to the "LeftButton".
On "RighButton", nothing happening (same as MiddleButton).

I tried a lot of different things but OnClick seem to work only with the mouse's LeftButton...
I didn't find any solution on the web...
I know that for a lot of addon's developper it's probably a simple question but i'm block.

(Sorry, i don't speak well, i'm french (so if your answer(s) are in french it's can be great ^^)
Azzash is offline   Reply With Quote
Old 05-01-2012   #2
Dridzt
Hero Member
 
Dridzt's Avatar
 
Join Date: Nov 2005
Posts: 872
Default Re: Usual question : Onlick to get RightButton (<- mouse) doesn't work... any idea ?

Buttons only have the left-click registered by default.

For other clicks to fire you need to Button:RegisterForClicks("clicktype"[,"clicktype"])
Dridzt is offline   Reply With Quote
Old 05-01-2012   #3
Azzash
Newbie
 
Join Date: Dec 2011
Posts: 2
Default Re: Usual question : Onlick to get RightButton (<- mouse) doesn't work... any idea ?

Thanks a lot...
It's working
Azzash is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:19 PM.