From 485c4721bc16b38e60c039048d05430b5c57c8e5 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Wed, 21 Dec 2016 23:48:28 +0200 Subject: [PATCH] Merge with develop --- code/nel/src/gui/ctrl_button.cpp | 8 +++++++- code/nel/src/gui/view_bitmap.cpp | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/code/nel/src/gui/ctrl_button.cpp b/code/nel/src/gui/ctrl_button.cpp index a0e7111a2..457010859 100644 --- a/code/nel/src/gui/ctrl_button.cpp +++ b/code/nel/src/gui/ctrl_button.cpp @@ -446,7 +446,13 @@ namespace NLGUI // *************************************************************************** sint32 CCtrlButton::getMaxUsedW() const { - return _W; + if (_Scale) + return _WReal; + + 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..b479cb889 100644 --- a/code/nel/src/gui/view_bitmap.cpp +++ b/code/nel/src/gui/view_bitmap.cpp @@ -511,7 +511,13 @@ namespace NLGUI // *************************************************************************** sint32 CViewBitmap::getMaxUsedW() const { - return _W; + if (_Scale) + return _WReal; + + sint32 txw, txh; + CViewRenderer &rVR = *CViewRenderer::getInstance(); + rVR.getTextureSizeFromId (_TextureId, txw, txh); + return txw; } // ***************************************************************************