aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llui.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:54 -0500
committerJacek Antonelli2008-08-15 23:44:54 -0500
commitb2afb8800bb033a04bb3ecdf0363068d56648ef1 (patch)
tree3568129b5bbddb47cd39d622b4137a8fbff4abaf /linden/indra/llui/llui.cpp
parentSecond Life viewer sources 1.14.0.1 (diff)
downloadmeta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.zip
meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.gz
meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.bz2
meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.xz
Second Life viewer sources 1.15.0.2
Diffstat (limited to 'linden/indra/llui/llui.cpp')
-rw-r--r--linden/indra/llui/llui.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/linden/indra/llui/llui.cpp b/linden/indra/llui/llui.cpp
index 61dede2..9d689b5 100644
--- a/linden/indra/llui/llui.cpp
+++ b/linden/indra/llui/llui.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2001-2007, Linden Research, Inc. 5 * Copyright (c) 2001-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -74,6 +75,7 @@ LLImageProviderInterface* LLUI::sImageProvider = NULL;
74LLUIAudioCallback LLUI::sAudioCallback = NULL; 75LLUIAudioCallback LLUI::sAudioCallback = NULL;
75LLVector2 LLUI::sGLScaleFactor(1.f, 1.f); 76LLVector2 LLUI::sGLScaleFactor(1.f, 1.f);
76LLWindow* LLUI::sWindow = NULL; 77LLWindow* LLUI::sWindow = NULL;
78LLHtmlHelp* LLUI::sHtmlHelp = NULL;
77BOOL LLUI::sShowXUINames = FALSE; 79BOOL LLUI::sShowXUINames = FALSE;
78// 80//
79// Functions 81// Functions
@@ -406,7 +408,7 @@ void gl_corners_2d(S32 left, S32 top, S32 right, S32 bottom, S32 length, F32 max
406 408
407void gl_draw_image( S32 x, S32 y, LLImageGL* image, const LLColor4& color ) 409void gl_draw_image( S32 x, S32 y, LLImageGL* image, const LLColor4& color )
408{ 410{
409 gl_draw_scaled_rotated_image( x, y, image->getWidth(), image->getHeight(), 0.f, image, color ); 411 gl_draw_scaled_rotated_image( x, y, image->getWidth(0), image->getHeight(0), 0.f, image, color );
410} 412}
411 413
412void gl_draw_scaled_image(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color) 414void gl_draw_scaled_image(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color)
@@ -458,8 +460,8 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border
458 460
459 glColor4fv(color.mV); 461 glColor4fv(color.mV);
460 462
461 F32 border_width_fraction = (F32)border_width / (F32)image->getWidth(); 463 F32 border_width_fraction = (F32)border_width / (F32)image->getWidth(0);
462 F32 border_height_fraction = (F32)border_height / (F32)image->getHeight(); 464 F32 border_height_fraction = (F32)border_height / (F32)image->getHeight(0);
463 465
464 glBegin(GL_QUADS); 466 glBegin(GL_QUADS);
465 { 467 {
@@ -592,7 +594,7 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border
592 594
593void gl_draw_rotated_image(S32 x, S32 y, F32 degrees, LLImageGL* image, const LLColor4& color) 595void gl_draw_rotated_image(S32 x, S32 y, F32 degrees, LLImageGL* image, const LLColor4& color)
594{ 596{
595 gl_draw_scaled_rotated_image( x, y, image->getWidth(), image->getHeight(), degrees, image, color ); 597 gl_draw_scaled_rotated_image( x, y, image->getWidth(0), image->getHeight(0), degrees, image, color );
596} 598}
597 599
598void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degrees, LLImageGL* image, const LLColor4& color) 600void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degrees, LLImageGL* image, const LLColor4& color)
@@ -1742,6 +1744,10 @@ LLString LLUI::locateSkin(const LLString& filename)
1742 if (!gDirUtilp->fileExists(found_file)) 1744 if (!gDirUtilp->fileExists(found_file))
1743 { 1745 {
1744 LLString localization(sConfigGroup->getString("Language")); 1746 LLString localization(sConfigGroup->getString("Language"));
1747 if(localization == "default")
1748 {
1749 localization = sConfigGroup->getString("SystemLanguage");
1750 }
1745 LLString local_skin = "xui" + slash + localization + slash + filename; 1751 LLString local_skin = "xui" + slash + localization + slash + filename;
1746 found_file = gDirUtilp->getExpandedFilename(LL_PATH_SKINS, local_skin); 1752 found_file = gDirUtilp->getExpandedFilename(LL_PATH_SKINS, local_skin);
1747 } 1753 }
@@ -1781,3 +1787,9 @@ LLUUID LLUI::findAssetUUIDByName(const LLString &asset_name)
1781 } 1787 }
1782 return LLUUID( foundValue ); 1788 return LLUUID( foundValue );
1783} 1789}
1790
1791// static
1792void LLUI::setHtmlHelp(LLHtmlHelp* html_help)
1793{
1794 LLUI::sHtmlHelp = html_help;
1795}