[SOLVED] Ways to manipulate iItem.CursorHotspot ?

Started by StillInThe90s, Thu 20/02/2014 13:18:16

Previous topic - Next topic

StillInThe90s

Is there a way of setting a cursor hotspot in-code, equivalent of "iItem.CursorGraphic=123"?

I am using two different sprites for an inventory object and its cursor. The "Use selected inventory graphic for cursor" -mode is on.
Setting "CursorGraphic" seems to center its hotspot instead of keeping the one set in the editor. (Oops! Guess I was wrong about this. It keeps the editor settings.)
Workaround, anyone (other than having a huge cursor sprite)?

Thanks.

Khris

Try
mouse.ChangeModeHotspot(eModeUseinv, x, y);

StillInThe90s

#2
Would that change the actual hotspot or do I have to call this when the inv item is selected?

Edit: I got it semi-working. Looks like it will work one it's integrated with global script.

Thanks Khris!

Khris

You have to call this whenever an item is selected and whenever you change an item's cursor graphic I guess.

StillInThe90s

Yup. Seems to be working. Thanks again.

SMF spam blocked by CleanTalk