void BaseApp::onCursorChange(const std::string &name) { if (!mCursorManager->cursorChanged(name)) return; // the cursor manager doesn't want any more info about this cursor // See if we can get the information we need out of the cursor resource ResourceImageSetPointerFix* imgSetPtr = dynamic_cast<ResourceImageSetPointerFix*>(MyGUI::PointerManager::getInstance().getByName(name)); if (imgSetPtr != NULL) { MyGUI::ResourceImageSet* imgSet = imgSetPtr->getImageSet(); std::string tex_name = imgSet->getIndexInfo(0,0).texture; Ogre::TexturePtr tex = Ogre::TextureManager::getSingleton().getByName(tex_name); // everything looks good, send it to the cursor manager if (!tex.isNull()) { Uint8 size_x = imgSetPtr->getSize().width; Uint8 size_y = imgSetPtr->getSize().height; Uint8 left = imgSetPtr->getTexturePosition().left; Uint8 top = imgSetPtr->getTexturePosition().top; Uint8 hotspot_x = imgSetPtr->getHotSpot().left; Uint8 hotspot_y = imgSetPtr->getHotSpot().top; mCursorManager->receiveCursorInfo(name, tex, left, top, size_x, size_y, hotspot_x, hotspot_y); } } }