From 584bb6cc99e9d071917c37780d5b2f75aaadbc9c Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 26 Dec 2015 14:02:01 +0100 Subject: [PATCH] Changed: Renamed screenH and screenW to _ScreenH and _ScreenW --- code/nel/include/nel/gui/widget_manager.h | 6 +++--- code/nel/src/gui/widget_manager.cpp | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/code/nel/include/nel/gui/widget_manager.h b/code/nel/include/nel/gui/widget_manager.h index c30bdd663..21d1e7a38 100644 --- a/code/nel/include/nel/gui/widget_manager.h +++ b/code/nel/include/nel/gui/widget_manager.h @@ -481,7 +481,7 @@ namespace NLGUI void setIngame( bool i ){ inGame = i; } bool isIngame() const{ return inGame; } - void setScreenWH( uint32 w, uint32 h ){ screenW = w; screenH = h; } + void setScreenWH(uint32 w, uint32 h){ _ScreenW = w; _ScreenH = h; } void registerNewScreenSizeHandler( INewScreenSizeHandler *handler ); void removeNewScreenSizeHandler( INewScreenSizeHandler *handler ); @@ -612,8 +612,8 @@ namespace NLGUI CEventDescriptorKey lastKeyEvent; - uint32 screenH; - uint32 screenW; + uint32 _ScreenH; + uint32 _ScreenW; std::vector< CInterfaceAnim* > activeAnims; diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index 861866f77..d4a45c592 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -1722,8 +1722,8 @@ namespace NLGUI // *** First detect from which screen position the window is the more sticked (borders or center) // In X: best hotspot is left, middle or right? sint32 posXToLeft= x; - sint32 posXToMiddle= x+w/2-screenW/2; - sint32 posXToRight= screenW-(x+w); + sint32 posXToMiddle= x+w/2-_ScreenW/2; + sint32 posXToRight= _ScreenW-(x+w); sint32 bestXHotSpot= Hotspot_xL; sint32 bestXPosVal= posXToLeft; if(abs(posXToMiddle) < bestXPosVal) @@ -1740,8 +1740,8 @@ namespace NLGUI // Same In Y: best hotspot is bottom, middle or top? // remember here that y is the top of window (relative to bottom of screen) sint32 posYToBottom= y-h; - sint32 posYToMiddle= y-h/2-screenH/2; - sint32 posYToTop= screenH-y; + sint32 posYToMiddle= y-h/2-_ScreenH/2; + sint32 posYToTop= _ScreenH-y; sint32 bestYHotSpot= Hotspot_Bx; sint32 bestYPosVal= posYToBottom; const sint32 middleYWeight= 6; // Avoid default Mission/Team/Map/ContactList positions to be considered as "middle" @@ -1778,9 +1778,9 @@ namespace NLGUI { std::vector< CWidgetManager::SMasterGroup > &_MasterGroups = getAllMasterGroup(); // If resolutions correctly setuped, and really different from new setup - if( screenW >0 && screenH>0 && + if( _ScreenW >0 && _ScreenH>0 && newScreenW >0 && newScreenH>0 && - ( screenW != newScreenW || screenH != newScreenH) + ( _ScreenW != newScreenW || _ScreenH != newScreenH) ) { // *** Do it for the Active Desktop (if wanted) @@ -1842,8 +1842,8 @@ namespace NLGUI // Now those are the last screen coordinates used for window position correction if(newScreenW >0 && newScreenH>0) { - screenW = newScreenW; - screenH = newScreenH; + _ScreenW = newScreenW; + _ScreenH = newScreenH; } } @@ -1966,7 +1966,7 @@ namespace NLGUI uint32 w, h; CViewRenderer::getInstance()->checkNewScreenSize (); CViewRenderer::getInstance()->getScreenSize (w, h); - if ((w != screenW) || (h != screenH)) + if ((w != _ScreenW) || (h != _ScreenH)) { // No Op if screen minimized if(w!=0 && h!=0 && !CViewRenderer::getInstance()->isMinimized())