From a413e91442a212a156cce118eeb03250da8a138f Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 12 Sep 2014 05:17:45 +0200 Subject: [PATCH] ImageButton: get texture size from MyGUI, rather than from Ogre --- components/widgets/imagebutton.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/widgets/imagebutton.cpp b/components/widgets/imagebutton.cpp index 24e4d9a62..1cd882975 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;