diff options
| -rw-r--r-- | indra/llui/llfloaterreg.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/lljoystickbutton.cpp | 29 | ||||
| -rw-r--r-- | indra/newview/lljoystickbutton.h | 2 | ||||
| -rw-r--r-- | indra/newview/llnearbychat.cpp | 10 | 
4 files changed, 27 insertions, 16 deletions
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index f8e07913fb..03925f922c 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -367,7 +367,7 @@ std::string LLFloaterReg::declareVisibilityControl(const std::string& name)  std::string LLFloaterReg::declareDockStateControl(const std::string& name)  {  	std::string controlname = getDockStateControlName(name); -	LLUI::sSettingGroups["floater"]->declareBOOL(controlname, FALSE, +	LLUI::sSettingGroups["floater"]->declareBOOL(controlname, TRUE,  												 llformat("Window Docking state for %s", name.c_str()),  												 TRUE);  	return controlname; diff --git a/indra/newview/lljoystickbutton.cpp b/indra/newview/lljoystickbutton.cpp index 4fd3b7bddc..bd6702a0b2 100644 --- a/indra/newview/lljoystickbutton.cpp +++ b/indra/newview/lljoystickbutton.cpp @@ -517,43 +517,52 @@ void LLJoystickCameraRotate::draw()  	LLGLSUIDefault gls_ui;  	getImageUnselected()->draw( 0, 0 ); +	LLPointer<LLUIImage> image = getImageSelected();  	if( mInTop )  	{ -		drawRotatedImage( getImageSelected()->getImage(), 0 ); +		drawRotatedImage( getImageSelected(), 0 );  	}  	if( mInRight )  	{ -		drawRotatedImage( getImageSelected()->getImage(), 1 ); +		drawRotatedImage( getImageSelected(), 1 );  	}  	if( mInBottom )  	{ -		drawRotatedImage( getImageSelected()->getImage(), 2 ); +		drawRotatedImage( getImageSelected(), 2 );  	}  	if( mInLeft )  	{ -		drawRotatedImage( getImageSelected()->getImage(), 3 ); +		drawRotatedImage( getImageSelected(), 3 );  	}  }  // Draws image rotated by multiples of 90 degrees -void LLJoystickCameraRotate::drawRotatedImage( LLTexture* image, S32 rotations ) +void LLJoystickCameraRotate::drawRotatedImage( LLPointer<LLUIImage> image, S32 rotations )  {  	S32 width = image->getWidth();  	S32 height = image->getHeight(); - +	LLTexture* texture = image->getImage(); + +	/* +	 * Scale  texture coordinate system  +	 * to handle the different between image size and size of texture. +	 * If we will use default matrix,  +	 * it may break texture mapping after rotation. +	 * see EXT-2023 Camera floater: arrows became shifted when pressed. +	 */   	F32 uv[][2] =   	{ -		{ 1.f, 1.f }, -		{ 0.f, 1.f }, +		{ (F32)width/texture->getWidth(), (F32)height/texture->getHeight() }, +		{ 0.f, (F32)height/texture->getHeight() },  		{ 0.f, 0.f }, -		{ 1.f, 0.f } +		{ (F32)width/texture->getWidth(), 0.f }  	}; -	gGL.getTexUnit(0)->bind(image); +	gGL.getTexUnit(0)->bind(texture);  	gGL.color4fv(UI_VERTEX_COLOR.mV); diff --git a/indra/newview/lljoystickbutton.h b/indra/newview/lljoystickbutton.h index 8caef30fa4..4c657913b8 100644 --- a/indra/newview/lljoystickbutton.h +++ b/indra/newview/lljoystickbutton.h @@ -150,7 +150,7 @@ public:  protected:  	F32				getOrbitRate();  	virtual void	updateSlop(); -	void			drawRotatedImage( LLTexture* image, S32 rotations ); +	void			drawRotatedImage( LLPointer<LLUIImage> image, S32 rotations );  protected:  	BOOL			mInLeft; diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 81d033d7f9..974291a54e 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -61,7 +61,7 @@  static const S32 RESIZE_BAR_THICKNESS = 3;  LLNearbyChat::LLNearbyChat(const LLSD& key)  -	: LLDockableFloater(NULL, key) +	: LLDockableFloater(NULL, false, key)  	,mChatHistory(NULL)  { @@ -107,12 +107,14 @@ BOOL LLNearbyChat::postBuild()  void    LLNearbyChat::applySavedVariables()  { -  	if (mRectControl.size() > 1)  	{  		const LLRect& rect = LLUI::sSettingGroups["floater"]->getRect(mRectControl); -		reshape(rect.getWidth(), rect.getHeight()); -		setRect(rect); +		if(!rect.isEmpty() && rect.isValid()) +		{ +			reshape(rect.getWidth(), rect.getHeight()); +			setRect(rect); +		}  	}  | 
