From b149858441b5daa499743cbdcb27c4d9a87fd6c9 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Wed, 21 Dec 2016 23:16:27 +0200 Subject: [PATCH] Fixed: Wrong element width when using scaled texture. --- code/nel/src/gui/ctrl_button.cpp | 5 +---- code/nel/src/gui/view_bitmap.cpp | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/code/nel/src/gui/ctrl_button.cpp b/code/nel/src/gui/ctrl_button.cpp index 02fd4b7d4..a0e7111a2 100644 --- a/code/nel/src/gui/ctrl_button.cpp +++ b/code/nel/src/gui/ctrl_button.cpp @@ -446,10 +446,7 @@ namespace NLGUI // *************************************************************************** sint32 CCtrlButton::getMaxUsedW() const { - sint32 txw, txh; - CViewRenderer &rVR = *CViewRenderer::getInstance(); - rVR.getTextureSizeFromId (_TextureIdNormal, txw, txh); - return txw; + return _W; } // *************************************************************************** diff --git a/code/nel/src/gui/view_bitmap.cpp b/code/nel/src/gui/view_bitmap.cpp index 75a84dc77..2628b8e93 100644 --- a/code/nel/src/gui/view_bitmap.cpp +++ b/code/nel/src/gui/view_bitmap.cpp @@ -511,10 +511,7 @@ namespace NLGUI // *************************************************************************** sint32 CViewBitmap::getMaxUsedW() const { - sint32 txw, txh; - CViewRenderer &rVR = *CViewRenderer::getInstance(); - rVR.getTextureSizeFromId (_TextureId, txw, txh); - return txw; + return _W; } // ***************************************************************************