|
|
@ -203,19 +203,14 @@ namespace SDLUtil
|
|
|
|
void SDLCursorManager::cursorChanged(const std::string& name)
|
|
|
|
void SDLCursorManager::cursorChanged(const std::string& name)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
mCurrentCursor = name;
|
|
|
|
mCurrentCursor = name;
|
|
|
|
|
|
|
|
_setGUICursor(name);
|
|
|
|
CursorMap::const_iterator curs_iter = mCursorMap.find(name);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(curs_iter != mCursorMap.end())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//we have this cursor
|
|
|
|
|
|
|
|
_setGUICursor(name);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void SDLCursorManager::_setGUICursor(const std::string &name)
|
|
|
|
void SDLCursorManager::_setGUICursor(const std::string &name)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
SDL_SetCursor(mCursorMap.find(name)->second);
|
|
|
|
auto it = mCursorMap.find(name);
|
|
|
|
|
|
|
|
if (it != mCursorMap.end())
|
|
|
|
|
|
|
|
SDL_SetCursor(it->second);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void SDLCursorManager::createCursor(const std::string& name, int rotDegrees, osg::Image* image, Uint8 hotspot_x, Uint8 hotspot_y)
|
|
|
|
void SDLCursorManager::createCursor(const std::string& name, int rotDegrees, osg::Image* image, Uint8 hotspot_x, Uint8 hotspot_y)
|
|
|
|