[Solved] eMouseRightInv does not work on empty inventory

Started by Kaio, Thu 25/02/2010 10:14:42

Previous topic - Next topic

Kaio

Hey, it's me again.

I have a popup inventory, and when I press the right button of my mouse (no matter where on the inventory screen, if over inventory items or not) the inventory is supposed to be closed.
However, clicks on the inventory on places where no items are (on the empty spots) are not handled by eMouseRight and not with eMouseRightInv.
So my inventory only closes right now, when I right-click any item...

Is there any thing I can do about it?

Thanks!

Khris

You need to catch the right-click otherwise.
One way is using on_event, there's an event called something like eEventGUIMouseDown.
Another way is using the InventoryWindow's or parent GUI's OnClick function.
A third way would be to use mouse.IsButtonDown(eMouseRight) in rep_ex.

Kaio

The on_event function works wonderfull! Thanks!

SMF spam blocked by CleanTalk