Cancelling 'Mouse.SaveCursorUntilItLeaves()' (solved)

Started by Ali, Thu 22/06/2006 23:51:39

Previous topic - Next topic

Ali

Hello,

I have created exit hotspots that call 'Mouse.SaveCursorUntilItLeaves()' before changing the cursor to the 'Exit' Cursor.

I call the CMI-style inventory by right-clicking, which works fine unless I right-click while over an exit hotspot. The inventory opens, I can pick up items, but as soon as I leave the GUI my cursor returns to the cursor it was before I went onto the exit hotspot and I lose the item.

Is there a way of erasing the game's memory of the saved cursor at the point of right-clicking?

Thanks!

-Ali.

GarageGothic

SaveCursorUntilItLeaves() is a horribly glitchy function that doesn't take all kinds of fun stuff into consideration. I had so much trouble with it that I simply ended up scripting my own replacement, and I recommend you do the same. It is after all only a single int that needs to be stored to remember the cursor and one pointer to remember the hotspot (or an int if you store the ID instead).

Ali

Thanks for pointing me in the right direction. I followed your instructions and re-coded it using hotspot properties, a hotspot pointer and an integer as you suggested.

It works perfic now!

SMF spam blocked by CleanTalk