Swapping Mouse Cursor Image Instantly...
Posted: Sun Nov 13, 2005 18:38
Hello again everyone,
I am implementing a simple inventory-type GUI function. The usual: click on an item in an inventory slot, swap the mouse cursor to the image of that item, and place the item back in another slot when it is clicked on.
Everything is working as planned except for the mouse cursor swap. Granted, I'm probably not doing the most logical thing, but I've tried a couple things thus far and I've had no luck.
I call this method when a slot is clicked on. However, the mouse cursor only ACTUALLY changes when the mouse is moved fully out of the slot window (which is just a skinned StaticImage box).
Basically, Mr. CrazyEddie and friends, I'd like to know a way to force an instant swap of the mouse cursor when the item is clicked on. Any thoughts?
Thank you,
Ryan
I am implementing a simple inventory-type GUI function. The usual: click on an item in an inventory slot, swap the mouse cursor to the image of that item, and place the item back in another slot when it is clicked on.
Everything is working as planned except for the mouse cursor swap. Granted, I'm probably not doing the most logical thing, but I've tried a couple things thus far and I've had no luck.
I call this method when a slot is clicked on. However, the mouse cursor only ACTUALLY changes when the mouse is moved fully out of the slot window (which is just a skinned StaticImage box).
Code: Select all
System::getSingleton().setDefaultMouseCursor((static_cast<StaticImage*>(this->selectedItem))->getImage());
Basically, Mr. CrazyEddie and friends, I'd like to know a way to force an instant swap of the mouse cursor when the item is clicked on. Any thoughts?
Thank you,
Ryan