forked from teamnwah/openmw-tes3coop
ImageButton: get texture size from MyGUI, rather than from Ogre
This commit is contained in:
parent
c6bcd75058
commit
a413e91442
1 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
#include "imagebutton.hpp"
|
#include "imagebutton.hpp"
|
||||||
|
|
||||||
#include <OgreTextureManager.h>
|
#include <MyGUI_RenderManager.h>
|
||||||
|
|
||||||
namespace Gui
|
namespace Gui
|
||||||
{
|
{
|
||||||
|
@ -44,8 +44,8 @@ namespace Gui
|
||||||
|
|
||||||
MyGUI::IntSize ImageButton::getRequestedSize(bool logError)
|
MyGUI::IntSize ImageButton::getRequestedSize(bool logError)
|
||||||
{
|
{
|
||||||
Ogre::TexturePtr texture = Ogre::TextureManager::getSingleton().getByName(mImageNormal);
|
MyGUI::ITexture* texture = MyGUI::RenderManager::getInstance().getTexture(mImageNormal);
|
||||||
if (texture.isNull())
|
if (!texture)
|
||||||
{
|
{
|
||||||
if (logError)
|
if (logError)
|
||||||
std::cerr << "ImageButton: can't find " << mImageNormal << std::endl;
|
std::cerr << "ImageButton: can't find " << mImageNormal << std::endl;
|
||||||
|
|
Loading…
Reference in a new issue