diff options
| author | Debi King (Dessie) <dessie@lindenlab.com> | 2011-08-16 13:49:35 -0400 | 
|---|---|---|
| committer | Debi King (Dessie) <dessie@lindenlab.com> | 2011-08-16 13:49:35 -0400 | 
| commit | 8379df21bce877897aec6c56f170b6e2ad11c7be (patch) | |
| tree | 908e3940d8c9624b1b0591567a35b2314ed6277c /indra/llui | |
| parent | 6c61a537918b5cc73336885f8bdd34943fda2482 (diff) | |
| parent | f99cf295e1d7e297996d4ea32a2202273010d8a3 (diff) | |
merged .hgtags
Diffstat (limited to 'indra/llui')
| -rw-r--r-- | indra/llui/lltextbase.cpp | 13 | ||||
| -rw-r--r-- | indra/llui/llui.cpp | 21 | ||||
| -rw-r--r-- | indra/llui/llui.h | 5 | 
3 files changed, 33 insertions, 6 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 349dbc3405..919364be63 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2024,8 +2024,17 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round,  		}  		else if (hit_past_end_of_line && segmentp->getEnd() >= line_iter->mDocIndexEnd)  		{ -			// segment wraps to next line, so just set doc pos to the end of the line -			pos = llclamp(line_iter->mDocIndexEnd - 1, 0, getLength()); +			if (getLineNumFromDocIndex(line_iter->mDocIndexEnd - 1) == line_iter->mLineNum) +			{ +				// if segment wraps to the next line we should step one char back +				// to compensate for the space char between words +				// which is removed due to wrapping +				pos = llclamp(line_iter->mDocIndexEnd - 1, 0, getLength()); +			} +			else +			{ +				pos = llclamp(line_iter->mDocIndexEnd, 0, getLength()); +			}  			break;  		}  		start_x += text_width; diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 8020ca802b..28d7e0a5ba 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -95,7 +95,6 @@ static LLDefaultChildRegistry::Register<LLSearchEditor> register_search_editor("  // register other widgets which otherwise may not be linked in  static LLDefaultChildRegistry::Register<LLLoadingIndicator> register_loading_indicator("loading_indicator"); -  //  // Functions  // @@ -524,8 +523,15 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex  	if (solid_color)  	{ -		gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); -		gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA); +		if (LLGLSLShader::sNoFixedFunction) +		{ +			gSolidColorProgram.bind(); +		} +		else +		{ +			gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); +			gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA); +		}  	}  	gGL.getTexUnit(0)->bind(image); @@ -699,7 +705,14 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex  	if (solid_color)  	{ -		gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); +		if (LLGLSLShader::sNoFixedFunction) +		{ +			gUIProgram.bind(); +		} +		else +		{ +			gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); +		}  	}  } diff --git a/indra/llui/llui.h b/indra/llui/llui.h index c583d58d5a..a04b232a28 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -33,6 +33,7 @@  #include "llrect.h"  #include "llcontrol.h"  #include "llcoord.h" +#include "llglslshader.h"  #include "llinitparam.h"  #include "llregistry.h"  #include "lluicolor.h" @@ -47,6 +48,7 @@  // for initparam specialization  #include "llfontgl.h" +  class LLColor4;   class LLVector3;  class LLVector2; @@ -484,4 +486,7 @@ namespace LLInitParam  	};  } +extern LLGLSLShader gSolidColorProgram; +extern LLGLSLShader gUIProgram; +  #endif  | 
