Ok, I have this weird thing.. I'm using AGS 3.1.1 stable and I have this inventory GUI with an inventory window.
Normally when you right-click having an inventory item I have it get deselected (player.ActiveInventory=null;)
When I right-click having an inventory as cursor, over the inventory window, the interact/look action occurs, which I don't want it to happen. I have handle_inventory clicks option set to false.. I've tried to put a code on mouse click section but it just won't run.
Any ideas where I should put something like this to have it work? I've placed on a top of a mouse_click section but it refuses to work..
Code: ags
Normally when you right-click having an inventory item I have it get deselected (player.ActiveInventory=null;)
When I right-click having an inventory as cursor, over the inventory window, the interact/look action occurs, which I don't want it to happen. I have handle_inventory clicks option set to false.. I've tried to put a code on mouse click section but it just won't run.
Any ideas where I should put something like this to have it work? I've placed on a top of a mouse_click section but it refuses to work..
if (button==eMouseRightClick) {
if (gInventory.Visible==true) {
if (player.ActiveInventory!=null) {
InventoryItem*greif=InventoryItem.GetAtScreen(mouse.x,mouse.y);
if (greif!=null) {
Display("Got it");
return;
}
}
}
}