[Nifty] Capture right click

Hello, I need to capture event on an other mouse bouton than the classiic Left button

Double click or right click is fine for me.

When checking the xsd, I found :


<xs:complexType name=“interactType”>

<xs:attribute name=“onClick” type=“onClickType”/>

<xs:attribute name=“onRelease” type=“onClickType”/>

<xs:attribute name=“onMouseOver” type=“onClickType”/>

<xs:attribute name=“onClickRepeat” type=“onClickType”/>

<xs:attribute name=“onClickMouseMove” type=“onClickType”/>

<xs:attribute name=“onClickAlternateKey” type=“xs:string”/>



So I tried “onClickRepeat” but it triggered on simple click :frowning:

How does the onClickAlternateKey works ?

( I’m still on Nifty 1.2 for now. Please tell me if the behevior change it 1.3 :slight_smile: )

Thanks in advance!

Nifty currently only support the left mouse button. Support for more buttons is already on the Feature Request Tracker … and planned for 1.3! It’s not done yet, tho.

onClickRepeat should automatically generate click events when you keep holding down the left mouse button.

onClickAlternateKey is hard to explain :slight_smile: please take a look at the effects reference in the wiki first: http://sourceforge.net/apps/mediawiki/nifty-gui/index.php?title=Effects … what you can change with “onClickAlternateKey” is the “alternate key” for the whole Nifty screen when the left mouse button has been clicked. you can then trigger events that have been tagged with that “key”. It’s a bit confusing and this feature needs to be renamed to “tag” or something but I’d suggest you read the explanation in the wiki it might make some sense afterwards :wink:

Ok, thanks for the answer.

I will wait for 1.3 then :slight_smile: