Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Kaio on Thu 25/02/2010 10:14:42

Title: [Solved] eMouseRightInv does not work on empty inventory
Post by: Kaio on Thu 25/02/2010 10:14:42
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!
Title: Re: eMouseRightInv does not work on empty inventory
Post by: Khris on Thu 25/02/2010 12:57:14
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.
Title: Re: eMouseRightInv does not work on empty inventory
Post by: Kaio on Thu 25/02/2010 16:27:37
The on_event function works wonderfull! Thanks!