diff --git a/code/nel/src/gui/ctrl_button.cpp b/code/nel/src/gui/ctrl_button.cpp index a0e7111a2..02fd4b7d4 100644 --- a/code/nel/src/gui/ctrl_button.cpp +++ b/code/nel/src/gui/ctrl_button.cpp @@ -446,7 +446,10 @@ namespace NLGUI // *************************************************************************** sint32 CCtrlButton::getMaxUsedW() const { - return _W; + sint32 txw, txh; + CViewRenderer &rVR = *CViewRenderer::getInstance(); + rVR.getTextureSizeFromId (_TextureIdNormal, txw, txh); + return txw; } // *************************************************************************** diff --git a/code/nel/src/gui/view_bitmap.cpp b/code/nel/src/gui/view_bitmap.cpp index 2628b8e93..75a84dc77 100644 --- a/code/nel/src/gui/view_bitmap.cpp +++ b/code/nel/src/gui/view_bitmap.cpp @@ -511,7 +511,10 @@ namespace NLGUI // *************************************************************************** sint32 CViewBitmap::getMaxUsedW() const { - return _W; + sint32 txw, txh; + CViewRenderer &rVR = *CViewRenderer::getInstance(); + rVR.getTextureSizeFromId (_TextureId, txw, txh); + return txw; } // ***************************************************************************