diff options
Diffstat (limited to 'indra/newview')
| -rwxr-xr-x | indra/newview/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | indra/newview/llappviewer.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llfloaterbuycontents.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/llglsandbox.cpp | 8 | ||||
| -rwxr-xr-x | indra/newview/llinventorybridge.cpp | 3 | ||||
| -rw-r--r-- | indra/newview/llinventoryicon.cpp | 183 | ||||
| -rw-r--r-- | indra/newview/llinventoryicon.h | 56 | ||||
| -rw-r--r-- | indra/newview/llinventorylistitem.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/llmediactrl.cpp | 18 | ||||
| -rw-r--r-- | indra/newview/llpanelgroupnotices.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/llpanelobjectinventory.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/lltoastgroupnotifypanel.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/llviewerdisplay.cpp | 10 | ||||
| -rwxr-xr-x | indra/newview/llviewerwindow.cpp | 12 | ||||
| -rwxr-xr-x | indra/newview/llwearableitemslist.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/llworldmapview.cpp | 2 | 
16 files changed, 275 insertions, 27 deletions
| diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 21b1512e58..a17a3b11ec 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -304,6 +304,7 @@ set(viewer_SOURCE_FILES      llinventorybridge.cpp      llinventoryfilter.cpp      llinventoryfunctions.cpp +    llinventoryicon.cpp      llinventoryitemslist.cpp      llinventorylistitem.cpp      llinventorymodel.cpp @@ -872,6 +873,7 @@ set(viewer_HEADER_FILES      llinventorybridge.h      llinventoryfilter.h      llinventoryfunctions.h +    llinventoryicon.h      llinventoryitemslist.h      llinventorylistitem.h      llinventorymodel.h diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6ca77ba4dd..fbf15ff5ce 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -771,7 +771,7 @@ bool LLAppViewer::init()  	LLUI::initClass(settings_map,  		LLUIImageList::getInstance(),  		ui_audio_callback, -		&LLUI::sGLScaleFactor); +		&LLUI::getScaleFactor());  	LL_INFOS("InitInfo") << "UI initialized." << LL_ENDL ;  	// Setup paths and LLTrans after LLUI::initClass has been called. diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp index 809d344d01..df802f0a0e 100644 --- a/indra/newview/llfloaterbuycontents.cpp +++ b/indra/newview/llfloaterbuycontents.cpp @@ -40,6 +40,7 @@  #include "llcheckboxctrl.h"  #include "llinventorydefines.h"  #include "llinventoryfunctions.h" +#include "llinventoryicon.h"  #include "llinventorymodel.h"	// for gInventory  #include "llfirstuse.h"  #include "llfloaterreg.h" diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 1208c9378e..60fa53f491 100644 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -79,10 +79,10 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)  	S32 top =	llmax(y, mDragStartY);  	S32 bottom =llmin(y, mDragStartY); -	left = llround((F32) left * LLUI::sGLScaleFactor.mV[VX]); -	right = llround((F32) right * LLUI::sGLScaleFactor.mV[VX]); -	top = llround((F32) top * LLUI::sGLScaleFactor.mV[VY]); -	bottom = llround((F32) bottom * LLUI::sGLScaleFactor.mV[VY]); +	left = llround((F32) left * LLUI::getScaleFactor().mV[VX]); +	right = llround((F32) right * LLUI::getScaleFactor().mV[VX]); +	top = llround((F32) top * LLUI::getScaleFactor().mV[VY]); +	bottom = llround((F32) bottom * LLUI::getScaleFactor().mV[VY]);  	F32 old_far_plane = LLViewerCamera::getInstance()->getFar();  	F32 old_near_plane = LLViewerCamera::getInstance()->getNear(); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index dc6147898a..4834d8dd70 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -50,6 +50,7 @@  #include "llclipboard.h"  #include "llinventorydefines.h"  #include "llinventoryfunctions.h" +#include "llinventoryicon.h"  #include "llinventorymodel.h"  #include "llinventorymodelbackgroundfetch.h"  #include "llinventorypanel.h" @@ -1510,7 +1511,7 @@ LLUIImagePtr LLItemBridge::getIcon() const  										mIsLink);  	} -	return LLInventoryIcon::getIcon(LLInventoryIcon::ICONNAME_OBJECT); +	return LLInventoryIcon::getIcon(LLInventoryType::ICONNAME_OBJECT);  }  PermissionMask LLItemBridge::getPermissionMask() const diff --git a/indra/newview/llinventoryicon.cpp b/indra/newview/llinventoryicon.cpp new file mode 100644 index 0000000000..14efc25fb9 --- /dev/null +++ b/indra/newview/llinventoryicon.cpp @@ -0,0 +1,183 @@ +/**  + * @file llinventoryicon.cpp + * @brief Implementation of the inventory icon. + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + *  + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + *  + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU + * Lesser General Public License for more details. + *  + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA + *  + * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * $/LicenseInfo$ + */ + +#include "linden_common.h" +#include "llinventoryicon.h" + +#include "lldictionary.h" +#include "llinventorydefines.h" +#include "llui.h" +#include "llwearabletype.h" + +struct IconEntry : public LLDictionaryEntry +{ +	IconEntry(const std::string &item_name) +		: +		LLDictionaryEntry(item_name) +	{} +}; + +class LLIconDictionary : public LLSingleton<LLIconDictionary>, +						 public LLDictionary<LLInventoryType::EIconName, IconEntry> +{ +public: +	LLIconDictionary(); +}; + +LLIconDictionary::LLIconDictionary() +{ +	addEntry(LLInventoryType::ICONNAME_TEXTURE, 				new IconEntry("Inv_Texture")); +	addEntry(LLInventoryType::ICONNAME_SOUND, 					new IconEntry("Inv_Sound")); +	addEntry(LLInventoryType::ICONNAME_CALLINGCARD_ONLINE, 		new IconEntry("Inv_CallingCard")); +	addEntry(LLInventoryType::ICONNAME_CALLINGCARD_OFFLINE, 	new IconEntry("Inv_CallingCard")); +	addEntry(LLInventoryType::ICONNAME_LANDMARK, 				new IconEntry("Inv_Landmark")); +	addEntry(LLInventoryType::ICONNAME_LANDMARK_VISITED, 		new IconEntry("Inv_Landmark")); +	addEntry(LLInventoryType::ICONNAME_SCRIPT, 					new IconEntry("Inv_Script")); +	addEntry(LLInventoryType::ICONNAME_CLOTHING, 				new IconEntry("Inv_Clothing")); +	addEntry(LLInventoryType::ICONNAME_OBJECT, 					new IconEntry("Inv_Object")); +	addEntry(LLInventoryType::ICONNAME_OBJECT_MULTI, 			new IconEntry("Inv_Object_Multi")); +	addEntry(LLInventoryType::ICONNAME_NOTECARD, 				new IconEntry("Inv_Notecard")); +	addEntry(LLInventoryType::ICONNAME_BODYPART, 				new IconEntry("Inv_Skin")); +	addEntry(LLInventoryType::ICONNAME_SNAPSHOT, 				new IconEntry("Inv_Snapshot")); + +	addEntry(LLInventoryType::ICONNAME_BODYPART_SHAPE, 			new IconEntry("Inv_BodyShape")); +	addEntry(LLInventoryType::ICONNAME_BODYPART_SKIN, 			new IconEntry("Inv_Skin")); +	addEntry(LLInventoryType::ICONNAME_BODYPART_HAIR, 			new IconEntry("Inv_Hair")); +	addEntry(LLInventoryType::ICONNAME_BODYPART_EYES, 			new IconEntry("Inv_Eye")); + +	addEntry(LLInventoryType::ICONNAME_CLOTHING_SHIRT, 			new IconEntry("Inv_Shirt")); +	addEntry(LLInventoryType::ICONNAME_CLOTHING_PANTS, 			new IconEntry("Inv_Pants")); +	addEntry(LLInventoryType::ICONNAME_CLOTHING_SHOES, 			new IconEntry("Inv_Shoe")); +	addEntry(LLInventoryType::ICONNAME_CLOTHING_SOCKS, 			new IconEntry("Inv_Socks")); +	addEntry(LLInventoryType::ICONNAME_CLOTHING_JACKET, 		new IconEntry("Inv_Jacket")); +	addEntry(LLInventoryType::ICONNAME_CLOTHING_GLOVES, 		new IconEntry("Inv_Gloves")); +	addEntry(LLInventoryType::ICONNAME_CLOTHING_UNDERSHIRT, 	new IconEntry("Inv_Undershirt")); +	addEntry(LLInventoryType::ICONNAME_CLOTHING_UNDERPANTS, 	new IconEntry("Inv_Underpants")); +	addEntry(LLInventoryType::ICONNAME_CLOTHING_SKIRT, 			new IconEntry("Inv_Skirt")); +	addEntry(LLInventoryType::ICONNAME_CLOTHING_ALPHA, 			new IconEntry("Inv_Alpha")); +	addEntry(LLInventoryType::ICONNAME_CLOTHING_TATTOO, 		new IconEntry("Inv_Tattoo")); +	addEntry(LLInventoryType::ICONNAME_ANIMATION, 				new IconEntry("Inv_Animation")); +	addEntry(LLInventoryType::ICONNAME_GESTURE, 				new IconEntry("Inv_Gesture")); + +	addEntry(LLInventoryType::ICONNAME_CLOTHING_PHYSICS, 		new IconEntry("Inv_Physics")); + +	addEntry(LLInventoryType::ICONNAME_LINKITEM, 				new IconEntry("Inv_LinkItem")); +	addEntry(LLInventoryType::ICONNAME_LINKFOLDER, 				new IconEntry("Inv_LinkFolder")); +	addEntry(LLInventoryType::ICONNAME_MESH,	 				new IconEntry("Inv_Mesh")); + +	addEntry(LLInventoryType::ICONNAME_INVALID, 				new IconEntry("Inv_Invalid")); + +	addEntry(LLInventoryType::ICONNAME_NONE, 					new IconEntry("NONE")); +} + +LLUIImagePtr LLInventoryIcon::getIcon(LLAssetType::EType asset_type, +									  LLInventoryType::EType inventory_type, +									  U32 misc_flag, +									  BOOL item_is_multi) +{ +	const std::string& icon_name = getIconName(asset_type, inventory_type, misc_flag, item_is_multi); +	return LLUI::getUIImage(icon_name); +} + +LLUIImagePtr LLInventoryIcon::getIcon(LLInventoryType::EIconName idx) +{ +	return LLUI::getUIImage(getIconName(idx)); +} + +const std::string& LLInventoryIcon::getIconName(LLAssetType::EType asset_type, +												LLInventoryType::EType inventory_type, +												U32 misc_flag, +												BOOL item_is_multi) +{ +	LLInventoryType::EIconName idx = LLInventoryType::ICONNAME_OBJECT; +	if (item_is_multi) +	{ +		idx = LLInventoryType::ICONNAME_OBJECT_MULTI; +		return getIconName(idx); +	} +	 +	switch(asset_type) +	{ +		case LLAssetType::AT_TEXTURE: +			idx = (inventory_type == LLInventoryType::IT_SNAPSHOT) ? LLInventoryType::ICONNAME_SNAPSHOT : LLInventoryType::ICONNAME_TEXTURE; +			break; +		case LLAssetType::AT_SOUND: +			idx = LLInventoryType::ICONNAME_SOUND; +			break; +		case LLAssetType::AT_CALLINGCARD: +			idx = (misc_flag != 0) ? LLInventoryType::ICONNAME_CALLINGCARD_ONLINE : LLInventoryType::ICONNAME_CALLINGCARD_OFFLINE; +			break; +		case LLAssetType::AT_LANDMARK: +			idx = (misc_flag != 0) ? LLInventoryType::ICONNAME_LANDMARK_VISITED : LLInventoryType::ICONNAME_LANDMARK; +			break; +		case LLAssetType::AT_SCRIPT: +		case LLAssetType::AT_LSL_TEXT: +		case LLAssetType::AT_LSL_BYTECODE: +			idx = LLInventoryType::ICONNAME_SCRIPT; +			break; +		case LLAssetType::AT_CLOTHING: +		case LLAssetType::AT_BODYPART: +			idx = assignWearableIcon(misc_flag); +			break; +		case LLAssetType::AT_NOTECARD: +			idx = LLInventoryType::ICONNAME_NOTECARD; +			break; +		case LLAssetType::AT_ANIMATION: +			idx = LLInventoryType::ICONNAME_ANIMATION; +			break; +		case LLAssetType::AT_GESTURE: +			idx = LLInventoryType::ICONNAME_GESTURE; +			break; +		case LLAssetType::AT_LINK: +			idx = LLInventoryType::ICONNAME_LINKITEM; +			break; +		case LLAssetType::AT_LINK_FOLDER: +			idx = LLInventoryType::ICONNAME_LINKFOLDER; +			break; +		case LLAssetType::AT_OBJECT: +			idx = LLInventoryType::ICONNAME_OBJECT; +			break; +		case LLAssetType::AT_MESH: +			idx = LLInventoryType::ICONNAME_MESH; +		default: +			break; +	} +	 +	return getIconName(idx); +} + + +const std::string& LLInventoryIcon::getIconName(LLInventoryType::EIconName idx) +{ +	const IconEntry *entry = LLIconDictionary::instance().lookup(idx); +	return entry->mName; +} + +LLInventoryType::EIconName LLInventoryIcon::assignWearableIcon(U32 misc_flag) +{ +	const LLWearableType::EType wearable_type = LLWearableType::EType(LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK & misc_flag); +	return LLWearableType::getIconName(wearable_type); +} diff --git a/indra/newview/llinventoryicon.h b/indra/newview/llinventoryicon.h new file mode 100644 index 0000000000..659448143d --- /dev/null +++ b/indra/newview/llinventoryicon.h @@ -0,0 +1,56 @@ +/**  + * @file llinventoryfunctions.h + * @brief Miscellaneous inventory-related functions and classes + * class definition + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + *  + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + *  + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU + * Lesser General Public License for more details. + *  + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA + *  + * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLINVENTORYICON_H +#define LL_LLINVENTORYICON_H + +#include "llassettype.h" +#include "llinventorytype.h" +#include "lluiimage.h" + +class LLInventoryIcon +{ +public: +	static const std::string& getIconName(LLAssetType::EType asset_type, +										  LLInventoryType::EType inventory_type = LLInventoryType::IT_NONE, +										  U32 misc_flag = 0, // different meanings depending on item type +										  BOOL item_is_multi = FALSE); +	static const std::string& getIconName(LLInventoryType::EIconName idx); + +	static LLUIImagePtr getIcon(LLAssetType::EType asset_type, +								LLInventoryType::EType inventory_type = LLInventoryType::IT_NONE, +								U32 misc_flag = 0, // different meanings depending on item type +								BOOL item_is_multi = FALSE); +	static LLUIImagePtr getIcon(LLInventoryType::EIconName idx); + +protected: +	static LLInventoryType::EIconName assignWearableIcon(U32 misc_flag); +}; +#endif // LL_LLINVENTORYICON_H + + + diff --git a/indra/newview/llinventorylistitem.cpp b/indra/newview/llinventorylistitem.cpp index 3e0849a795..26041767fd 100644 --- a/indra/newview/llinventorylistitem.cpp +++ b/indra/newview/llinventorylistitem.cpp @@ -37,6 +37,7 @@  #include "lltextutil.h"  // newview +#include "llinventoryicon.h"  #include "llinventorymodel.h"  #include "llviewerinventory.h" diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 7650fe9229..04744ab34c 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -119,8 +119,8 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :  	if(!getDecoupleTextureSize())  	{ -		S32 screen_width = llround((F32)getRect().getWidth() * LLUI::sGLScaleFactor.mV[VX]); -		S32 screen_height = llround((F32)getRect().getHeight() * LLUI::sGLScaleFactor.mV[VY]); +		S32 screen_width = llround((F32)getRect().getWidth() * LLUI::getScaleFactor().mV[VX]); +		S32 screen_height = llround((F32)getRect().getHeight() * LLUI::getScaleFactor().mV[VY]);  		setTextureSize(screen_width, screen_height);  	} @@ -469,8 +469,8 @@ void LLMediaCtrl::reshape( S32 width, S32 height, BOOL called_from_parent )  {  	if(!getDecoupleTextureSize())  	{ -		S32 screen_width = llround((F32)width * LLUI::sGLScaleFactor.mV[VX]); -		S32 screen_height = llround((F32)height * LLUI::sGLScaleFactor.mV[VY]); +		S32 screen_width = llround((F32)width * LLUI::getScaleFactor().mV[VX]); +		S32 screen_height = llround((F32)height * LLUI::getScaleFactor().mV[VY]);  		// when floater is minimized, these sizes are negative  		if ( screen_height > 0 && screen_width > 0 ) @@ -687,7 +687,7 @@ bool LLMediaCtrl::ensureMediaSourceExists()  			mMediaSource->addObserver( this );  			mMediaSource->setBackgroundColor( getBackgroundColor() );  			mMediaSource->setTrustedBrowser(mTrusted); -			mMediaSource->setPageZoomFactor( LLUI::sGLScaleFactor.mV[ VX ] ); +			mMediaSource->setPageZoomFactor( LLUI::getScaleFactor().mV[ VX ] );  			if(mClearCache)  			{ @@ -770,7 +770,7 @@ void LLMediaCtrl::draw()  	{  		gGL.pushUIMatrix();  		{ -			mMediaSource->setPageZoomFactor( LLUI::sGLScaleFactor.mV[ VX ] ); +			mMediaSource->setPageZoomFactor( LLUI::getScaleFactor().mV[ VX ] );  			// scale texture to fit the space using texture coords  			gGL.getTexUnit(0)->bind(media_texture); @@ -884,14 +884,14 @@ void LLMediaCtrl::convertInputCoords(S32& x, S32& y)  		coords_opengl = mMediaSource->getMediaPlugin()->getTextureCoordsOpenGL();  	} -	x = llround((F32)x * LLUI::sGLScaleFactor.mV[VX]); +	x = llround((F32)x * LLUI::getScaleFactor().mV[VX]);  	if ( ! coords_opengl )  	{ -		y = llround((F32)(y) * LLUI::sGLScaleFactor.mV[VY]); +		y = llround((F32)(y) * LLUI::getScaleFactor().mV[VY]);  	}  	else  	{ -		y = llround((F32)(getRect().getHeight() - y) * LLUI::sGLScaleFactor.mV[VY]); +		y = llround((F32)(getRect().getHeight() - y) * LLUI::getScaleFactor().mV[VY]);  	};  } diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 31c0e3d01a..9a3ea0774b 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -35,6 +35,7 @@  #include "llviewerinventory.h"  #include "llinventorydefines.h"  #include "llinventoryfunctions.h" +#include "llinventoryicon.h"  #include "llinventorymodel.h"  #include "llfloaterinventory.h"  #include "llagent.h" diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 1ca24f3031..7c3425d71b 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -47,6 +47,7 @@  #include "llfolderview.h"  #include "llinventorybridge.h"  #include "llinventorydefines.h" +#include "llinventoryicon.h"  #include "llinventoryfilter.h"  #include "llinventoryfunctions.h"  #include "llpreviewanim.h" diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp index 75178a6ef8..64be5408be 100644 --- a/indra/newview/lltoastgroupnotifypanel.cpp +++ b/indra/newview/lltoastgroupnotifypanel.cpp @@ -33,6 +33,7 @@  #include "llbutton.h"  #include "lliconctrl.h"  #include "llinventoryfunctions.h" +#include "llinventoryicon.h"  #include "llnotifications.h"  #include "llviewertexteditor.h" diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 3b486efd7e..cc697f8510 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1440,7 +1440,7 @@ void render_ui_2d()  		gGL.pushMatrix();  		S32 half_width = (gViewerWindow->getWorldViewWidthScaled() / 2);  		S32 half_height = (gViewerWindow->getWorldViewHeightScaled() / 2); -		gGL.scalef(LLUI::sGLScaleFactor.mV[0], LLUI::sGLScaleFactor.mV[1], 1.f); +		gGL.scalef(LLUI::getScaleFactor().mV[0], LLUI::getScaleFactor().mV[1], 1.f);  		gGL.translatef((F32)half_width, (F32)half_height, 0.f);  		F32 zoom = gAgentCamera.mHUDCurZoom;  		gGL.scalef(zoom,zoom,1.f); @@ -1478,10 +1478,10 @@ void render_ui_2d()  				LLUI::sDirtyRect = last_rect;  				last_rect = t_rect; -				last_rect.mLeft = LLRect::tCoordType(last_rect.mLeft / LLUI::sGLScaleFactor.mV[0]); -				last_rect.mRight = LLRect::tCoordType(last_rect.mRight / LLUI::sGLScaleFactor.mV[0]); -				last_rect.mTop = LLRect::tCoordType(last_rect.mTop / LLUI::sGLScaleFactor.mV[1]); -				last_rect.mBottom = LLRect::tCoordType(last_rect.mBottom / LLUI::sGLScaleFactor.mV[1]); +				last_rect.mLeft = LLRect::tCoordType(last_rect.mLeft / LLUI::getScaleFactor().mV[0]); +				last_rect.mRight = LLRect::tCoordType(last_rect.mRight / LLUI::getScaleFactor().mV[0]); +				last_rect.mTop = LLRect::tCoordType(last_rect.mTop / LLUI::getScaleFactor().mV[1]); +				last_rect.mBottom = LLRect::tCoordType(last_rect.mBottom / LLUI::getScaleFactor().mV[1]);  				LLRect clip_rect(last_rect); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index d5ca01931f..dd29260f70 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2140,7 +2140,7 @@ void LLViewerWindow::reshape(S32 width, S32 height)  		calcDisplayScale(); -		BOOL display_scale_changed = mDisplayScale != LLUI::sGLScaleFactor; +		BOOL display_scale_changed = mDisplayScale != LLUI::getScaleFactor();  		LLUI::setScaleFactor(mDisplayScale);  		// update our window rectangle @@ -2346,7 +2346,7 @@ void LLViewerWindow::draw()  		// scale view by UI global scale factor and aspect ratio correction factor  		gGL.scaleUI(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f); -		LLVector2 old_scale_factor = LLUI::sGLScaleFactor; +		LLVector2 old_scale_factor = LLUI::getScaleFactor();  		// apply camera zoom transform (for high res screenshots)  		F32 zoom_factor = LLViewerCamera::getInstance()->getZoomFactor();  		S16 sub_region = LLViewerCamera::getInstance()->getZoomSubRegion(); @@ -2360,7 +2360,7 @@ void LLViewerWindow::draw()  						(F32)getWindowHeightScaled() * -(F32)pos_y,   						0.f);  			gGL.scalef(zoom_factor, zoom_factor, 1.f); -			LLUI::sGLScaleFactor *= zoom_factor; +			LLUI::getScaleFactor() *= zoom_factor;  		}  		// Draw tool specific overlay on world @@ -2408,7 +2408,7 @@ void LLViewerWindow::draw()  				LLFontGL::HCENTER, LLFontGL::TOP);  		} -		LLUI::sGLScaleFactor = old_scale_factor; +		LLUI::setScaleFactor(old_scale_factor);  	}  	LLUI::popMatrix();  	gGL.popMatrix(); @@ -3208,8 +3208,8 @@ void LLViewerWindow::updateLayout()  void LLViewerWindow::updateMouseDelta()  { -	S32 dx = lltrunc((F32) (mCurrentMousePoint.mX - mLastMousePoint.mX) * LLUI::sGLScaleFactor.mV[VX]); -	S32 dy = lltrunc((F32) (mCurrentMousePoint.mY - mLastMousePoint.mY) * LLUI::sGLScaleFactor.mV[VY]); +	S32 dx = lltrunc((F32) (mCurrentMousePoint.mX - mLastMousePoint.mX) * LLUI::getScaleFactor().mV[VX]); +	S32 dy = lltrunc((F32) (mCurrentMousePoint.mY - mLastMousePoint.mY) * LLUI::getScaleFactor().mV[VY]);  	//RN: fix for asynchronous notification of mouse leaving window not working  	LLCoordWindow mouse_pos; diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index c7e9215643..c196d70617 100755 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -34,6 +34,7 @@  #include "llagentwearables.h"  #include "llappearancemgr.h"  #include "llinventoryfunctions.h" +#include "llinventoryicon.h"  #include "lltransutil.h"  #include "llviewerattachmenu.h"  #include "llvoavatarself.h" diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index a3ccf87cfc..428be8efb9 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -421,7 +421,7 @@ void LLWorldMapView::draw()  			{  				// Inform the fetch mechanism of the size we need  				S32 draw_size = llround(sMapScale); -				overlayimage->setKnownDrawSize(llround(draw_size * LLUI::sGLScaleFactor.mV[VX]), llround(draw_size * LLUI::sGLScaleFactor.mV[VY])); +				overlayimage->setKnownDrawSize(llround(draw_size * LLUI::getScaleFactor().mV[VX]), llround(draw_size * LLUI::getScaleFactor().mV[VY]));  				// Draw something whenever we have enough info  				if (overlayimage->hasGLTexture())  				{ | 
