diff --git a/components/widgets/imagebutton.cpp b/components/widgets/imagebutton.cpp index 24e4d9a623..1cd8829751 100644 --- a/components/widgets/imagebutton.cpp +++ b/components/widgets/imagebutton.cpp @@ -1,6 +1,6 @@ #include "imagebutton.hpp" -#include +#include namespace Gui { @@ -44,8 +44,8 @@ namespace Gui MyGUI::IntSize ImageButton::getRequestedSize(bool logError) { - Ogre::TexturePtr texture = Ogre::TextureManager::getSingleton().getByName(mImageNormal); - if (texture.isNull()) + MyGUI::ITexture* texture = MyGUI::RenderManager::getInstance().getTexture(mImageNormal); + if (!texture) { if (logError) std::cerr << "ImageButton: can't find " << mImageNormal << std::endl;