From b6ab159229945fa2ce7cc33256df97373337675b Mon Sep 17 00:00:00 2001 From: Nimetu Date: Wed, 21 Dec 2016 23:46:32 +0200 Subject: [PATCH] Backed out changeset: c1085bbb3dae --- code/nel/src/gui/ctrl_button.cpp | 5 ++++- code/nel/src/gui/view_bitmap.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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; } // ***************************************************************************