From 3fbfa4743bcf5428e3a3f21212e3e8fd049cad70 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Wed, 21 Dec 2016 23:47:50 +0200 Subject: [PATCH] Fixed: Wrong element width when using scaled texture. --HG-- branch : develop --- code/nel/src/gui/ctrl_button.cpp | 3 +++ code/nel/src/gui/view_bitmap.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/code/nel/src/gui/ctrl_button.cpp b/code/nel/src/gui/ctrl_button.cpp index 02fd4b7d4..457010859 100644 --- a/code/nel/src/gui/ctrl_button.cpp +++ b/code/nel/src/gui/ctrl_button.cpp @@ -446,6 +446,9 @@ namespace NLGUI // *************************************************************************** sint32 CCtrlButton::getMaxUsedW() const { + if (_Scale) + return _WReal; + sint32 txw, txh; CViewRenderer &rVR = *CViewRenderer::getInstance(); rVR.getTextureSizeFromId (_TextureIdNormal, txw, txh); diff --git a/code/nel/src/gui/view_bitmap.cpp b/code/nel/src/gui/view_bitmap.cpp index 75a84dc77..b479cb889 100644 --- a/code/nel/src/gui/view_bitmap.cpp +++ b/code/nel/src/gui/view_bitmap.cpp @@ -511,6 +511,9 @@ namespace NLGUI // *************************************************************************** sint32 CViewBitmap::getMaxUsedW() const { + if (_Scale) + return _WReal; + sint32 txw, txh; CViewRenderer &rVR = *CViewRenderer::getInstance(); rVR.getTextureSizeFromId (_TextureId, txw, txh);