Merge branch 'project/Flat_UI' of https://github.com/secondlife/viewer

# Conflicts:
#	indra/llrender/llfontfreetype.cpp
#	indra/llui/lldraghandle.cpp
#	indra/llui/lldraghandle.h
#	indra/llui/llfloater.cpp
#	indra/llui/llfloater.h
#	indra/llui/llfolderviewitem.cpp
#	indra/newview/llcolorswatch.cpp
#	indra/newview/llfloaterimcontainer.cpp
#	indra/newview/llvoicewebrtc.cpp
#	indra/newview/skins/default/colors.xml
#	indra/newview/skins/default/textures/bottomtray/Cam_Rotate_Center.png
#	indra/newview/skins/default/textures/bottomtray/Cam_Rotate_In.png
#	indra/newview/skins/default/textures/bottomtray/Cam_Tracking_Center.png
#	indra/newview/skins/default/textures/bottomtray/Cam_Tracking_In.png
#	indra/newview/skins/default/textures/bottomtray/Movement_Backward_On.png
#	indra/newview/skins/default/textures/bottomtray/Movement_Down_On.png
#	indra/newview/skins/default/textures/bottomtray/Movement_Forward_On.png
#	indra/newview/skins/default/textures/bottomtray/Movement_Left_On.png
#	indra/newview/skins/default/textures/bottomtray/Movement_Right_On.png
#	indra/newview/skins/default/textures/bottomtray/Movement_TurnLeft_On.png
#	indra/newview/skins/default/textures/bottomtray/Movement_TurnRight_On.png
#	indra/newview/skins/default/textures/bottomtray/Movement_Up_On.png
#	indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1.png
#	indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2.png
#	indra/newview/skins/default/textures/bottomtray/VoicePTT_On.png
#	indra/newview/skins/default/textures/build/Object_Cone_Selected.png
#	indra/newview/skins/default/textures/build/Object_Cube_Selected.png
#	indra/newview/skins/default/textures/build/Object_Cylinder_Selected.png
#	indra/newview/skins/default/textures/build/Object_Grass_Selected.png
#	indra/newview/skins/default/textures/build/Object_Hemi_Cone_Selected.png
#	indra/newview/skins/default/textures/build/Object_Hemi_Cylinder_Selected.png
#	indra/newview/skins/default/textures/build/Object_Hemi_Sphere_Selected.png
#	indra/newview/skins/default/textures/build/Object_Prism_Selected.png
#	indra/newview/skins/default/textures/build/Object_Pyramid_Selected.png
#	indra/newview/skins/default/textures/build/Object_Ring_Selected.png
#	indra/newview/skins/default/textures/build/Object_Sphere_Selected.png
#	indra/newview/skins/default/textures/build/Object_Tetrahedron_Selected.png
#	indra/newview/skins/default/textures/build/Object_Torus_Selected.png
#	indra/newview/skins/default/textures/build/Object_Tree_Selected.png
#	indra/newview/skins/default/textures/build/Object_Tube_Selected.png
#	indra/newview/skins/default/textures/containers/Accordion_Selected.png
#	indra/newview/skins/default/textures/containers/Toolbar_Middle_Selected.png
#	indra/newview/skins/default/textures/icons/Info_Over.png
#	indra/newview/skins/default/textures/icons/Inv_SysClosed.png
#	indra/newview/skins/default/textures/icons/Inv_SysOpen.png
#	indra/newview/skins/default/textures/icons/SL_Logo.png
#	indra/newview/skins/default/textures/icons/back_arrow_off.png
#	indra/newview/skins/default/textures/icons/back_arrow_over.png
#	indra/newview/skins/default/textures/icons/back_arrow_press.png
#	indra/newview/skins/default/textures/icons/see_me_online.png
#	indra/newview/skins/default/textures/navbar/Favorite_Star_Active.png
#	indra/newview/skins/default/textures/navbar/Favorite_Star_Over.png
#	indra/newview/skins/default/textures/navbar/Row_Selection.png
#	indra/newview/skins/default/textures/widgets/DropDown_On.png
#	indra/newview/skins/default/textures/widgets/ListItem_Over.png
#	indra/newview/skins/default/textures/widgets/ListItem_Select.png
#	indra/newview/skins/default/textures/widgets/PushButton_On.png
#	indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.png
#	indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz.png
#	indra/newview/skins/default/textures/widgets/ScrollThumb_Vert.png
#	indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png
#	indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.png
#	indra/newview/skins/default/textures/widgets/SliderThumb_Off.png
#	indra/newview/skins/default/textures/widgets/SliderThumb_Press.png
#	indra/newview/skins/default/textures/widgets/SliderTrack_Horiz.png
#	indra/newview/skins/default/textures/windows/Inspector_I.png
#	indra/newview/skins/default/xui/en/floater_avatar_picker.xml
#	indra/newview/skins/default/xui/en/floater_bulk_perms.xml
#	indra/newview/skins/default/xui/en/floater_edit_hover_height.xml
#	indra/newview/skins/default/xui/en/floater_god_tools.xml
#	indra/newview/skins/default/xui/en/floater_model_preview.xml
#	indra/newview/skins/default/xui/en/floater_preferences.xml
#	indra/newview/skins/default/xui/en/floater_tools.xml
#	indra/newview/skins/default/xui/en/floater_world_map.xml
#	indra/newview/skins/default/xui/en/fonts.xml
#	indra/newview/skins/default/xui/en/panel_avatar_list_item.xml
#	indra/newview/skins/default/xui/en/panel_chat_header.xml
#	indra/newview/skins/default/xui/en/panel_group_notices.xml
#	indra/newview/skins/default/xui/en/panel_navigation_bar.xml
#	indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
#	indra/newview/skins/default/xui/en/panel_preferences_general.xml
#	indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
#	indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
#	indra/newview/skins/default/xui/en/panel_preferences_setup.xml
#	indra/newview/skins/default/xui/en/panel_preferences_sound.xml
#	indra/newview/skins/default/xui/en/panel_region_general.xml
#	indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml
#	indra/newview/skins/default/xui/en/panel_status_bar.xml
#	indra/newview/skins/default/xui/en/panel_tools_texture.xml
#	indra/newview/skins/default/xui/en/widgets/inventory_list_item.xml
#	indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml
#	indra/newview/skins/default/xui/en/widgets/wearable_outfit_list_item.xml
This commit is contained in:
Ansariel
2026-03-04 14:36:51 +01:00
105 changed files with 2221 additions and 639 deletions
+32
View File
@@ -2747,6 +2747,38 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>description</key>
<string>Viewer fonts</string>
</map>
<key>google-fonts</key>
<map>
<key>copyright</key>
<string>Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter)</string>
<key>description</key>
<string>Google fonts</string>
<key>license</key>
<string>SIL Open Font License, Version 1.1</string>
<key>license_file</key>
<string>LICENSES/google_inter.txt</string>
<key>name</key>
<string>google-fonts</string>
<key>platforms</key>
<map>
<key>common</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>9bd007dd70635d85d716ca00484cefa700cdb6f0</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
<string>https://github.com/secondlife/3p-google-fonts/releases/download/v1.0.0-r2/google_fonts-1.0.0.22606339007-common-22606339007.tar.zst</string>
</map>
<key>name</key>
<string>common</string>
</map>
</map>
<key>version</key>
<string>1.0.0.11083103671</string>
</map>
<key>viewer-manager</key>
<map>
<key>platforms</key>
+1
View File
@@ -20,4 +20,5 @@ endif()
use_prebuilt_binary(slvoice)
use_prebuilt_binary(nanosvg)
use_prebuilt_binary(viewer-fonts)
use_prebuilt_binary(google-fonts)
use_prebuilt_binary(emoji_shortcodes)
+53 -27
View File
@@ -143,16 +143,17 @@ LLFontFreetype::LLFontFreetype()
mDescender(0.f),
mLineHeight(0.f),
mIsFallback(false),
mHinting(EFontHinting::FORCE_AUTOHINT),
mFTFace(nullptr),
mRenderGlyphCount(0),
mStyle(0),
mPointSize(0)
{
// <FS:ND> Set up kerning cache, size is 256x256, the initial cache lines are all null
mKerningCache = new F32*[ 256 ];
mKerningCache = new F32*[512];
for( int i = 0; i < 256; ++i )
mKerningCache[i] = NULL;
for (int i = 0; i < 512; ++i)
mKerningCache[i] = nullptr;
// </FS:ND>
}
@@ -172,14 +173,14 @@ LLFontFreetype::~LLFontFreetype()
// mFallbackFonts cleaned up by LLPointer destructor
// <FS:ND> Delete the kerning cache
for( int i = 0; i < 256; ++i )
for (S32 i = 0; i < 512; ++i)
delete[] mKerningCache[i];
delete[] mKerningCache;
// </FS:ND>
}
bool LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, bool is_fallback, S32 face_n)
bool LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, bool is_fallback, S32 face_n, EFontHinting hinting, S32 flags)
{
// Don't leak face objects. This is also needed to deal with
// changed font file names.
@@ -203,6 +204,8 @@ bool LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v
return false;
mIsFallback = is_fallback;
mHinting = hinting;
mFontFlags = flags;
F32 pixels_per_em = (point_size / 72.f)*vert_dpi; // Size in inches * dpi
error = FT_Set_Char_Size(mFTFace, /* handle to face object */
@@ -258,6 +261,12 @@ bool LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v
{
mStyle |= LLFontGL::BOLD;
}
else if (flags & LLFontGL::BOLD)
{
// FontGL applies programmatic bolding to fonts that are a part of 'bold' descriptor but don't have the bold style set.
// Ex: Inter SemiBold doesn't have FT_STYLE_FLAG_BOLD and without this style it would be bolded programmatically.
mStyle |= LLFontGL::BOLD;
}
if(mFTFace->style_flags & FT_STYLE_FLAG_ITALIC)
{
@@ -362,10 +371,11 @@ F32 LLFontFreetype::getXKerning(llwchar char_left, llwchar char_right) const
U32 right_glyph = right_glyph_info ? right_glyph_info->mGlyphIndex : 0;
// <FS:ND> Use cached kerning if possible, only do so for glyphs < 256 for now
if( right_glyph < 256 && left_glyph < 256 )
if (right_glyph < 256 && left_glyph < 256)
{
if( mKerningCache[ left_glyph ] && mKerningCache[ left_glyph ][ right_glyph ] < FLT_MAX )
return mKerningCache[ left_glyph ][ right_glyph ];
const U32 right_glyph_pos = right_glyph * 2 + ((mFTFace->face_flags & FT_FACE_FLAG_SCALABLE) ? 1 : 0);
if (mKerningCache[left_glyph] && mKerningCache[left_glyph][right_glyph_pos] < FLT_MAX)
return mKerningCache[left_glyph][right_glyph_pos];
}
// </FS:ND>
@@ -374,20 +384,27 @@ F32 LLFontFreetype::getXKerning(llwchar char_left, llwchar char_right) const
llverify(!FT_Get_Kerning(mFTFace, left_glyph, right_glyph, ft_kerning_unfitted, &delta));
// <FS:ND> Cache kerning if possible, only do so for glyphs < 256 for now
if( right_glyph < 256 && left_glyph < 256 )
if (right_glyph < 256 && left_glyph < 256)
{
if( !mKerningCache[ left_glyph ] )
if (!mKerningCache[left_glyph])
{
mKerningCache[ left_glyph ] = new F32[ 256 ];
for( int i = 0; i < 256; ++i )
mKerningCache[ left_glyph ][ i ] = FLT_MAX;
mKerningCache[left_glyph] = new F32[512];
for (S32 i = 0; i < 512; ++i)
mKerningCache[left_glyph][i] = FLT_MAX;
}
mKerningCache[ left_glyph ][ right_glyph ] = delta.x*(1.f / 64.f);
// Strided array for right glyph: non-scalable first, scalable version second
mKerningCache[left_glyph][right_glyph * 2] = (F32)delta.x ;
mKerningCache[left_glyph][right_glyph * 2 + 1] = delta.x * (1.f / 64.f);
}
// </FS:ND>
return delta.x*(1.f/64.f);
if (mFTFace->face_flags & FT_FACE_FLAG_SCALABLE)
{
// Return the X advance
return (F32)(delta.x * (1.0 / 64.0));
}
return (F32)delta.x;
}
F32 LLFontFreetype::getXKerning(const LLFontGlyphInfo* left_glyph_info, const LLFontGlyphInfo* right_glyph_info) const
@@ -399,10 +416,11 @@ F32 LLFontFreetype::getXKerning(const LLFontGlyphInfo* left_glyph_info, const LL
U32 right_glyph = right_glyph_info ? right_glyph_info->mGlyphIndex : 0;
// <FS:ND> Use cached kerning if possible, only do so for glyphs < 256 for now
if( right_glyph < 256 && left_glyph < 256 )
if (right_glyph < 256 && left_glyph < 256)
{
if( mKerningCache[ left_glyph ] && mKerningCache[ left_glyph ][ right_glyph ] < FLT_MAX )
return mKerningCache[ left_glyph ][ right_glyph ];
const U32 right_glyph_pos = right_glyph * 2 + ((mFTFace->face_flags & FT_FACE_FLAG_SCALABLE) ? 1 : 0);
if (mKerningCache[left_glyph] && mKerningCache[left_glyph][right_glyph_pos] < FLT_MAX)
return mKerningCache[left_glyph][right_glyph_pos];
}
// </FS:ND>
@@ -411,19 +429,27 @@ F32 LLFontFreetype::getXKerning(const LLFontGlyphInfo* left_glyph_info, const LL
llverify(!FT_Get_Kerning(mFTFace, left_glyph, right_glyph, ft_kerning_unfitted, &delta));
// <FS:ND> Cache kerning if possible, only do so for glyphs < 256 for now
if( right_glyph < 256 && left_glyph < 256 )
if (right_glyph < 256 && left_glyph < 256)
{
if( !mKerningCache[ left_glyph ] )
if (!mKerningCache[left_glyph])
{
mKerningCache[ left_glyph ] = new F32[ 256 ];
for( int i = 0; i < 256; ++i )
mKerningCache[ left_glyph ][ i ] = FLT_MAX;
mKerningCache[left_glyph] = new F32[512];
for (S32 i = 0; i < 512; ++i)
mKerningCache[left_glyph][i] = FLT_MAX;
}
mKerningCache[ left_glyph ][ right_glyph ] = delta.x*(1.f / 64.f);
// Strided array for right glyph: non-scalable first, scalable version second
mKerningCache[left_glyph][right_glyph * 2] = (F32)delta.x;
mKerningCache[left_glyph][right_glyph * 2 + 1] = delta.x * (1.f / 64.f);
}
// </FS:ND>
return delta.x*(1.f/64.f);
if (mFTFace->face_flags & FT_FACE_FLAG_SCALABLE)
{
// Return the X advance
return (F32)(delta.x * (1.0 / 64.0));
}
return (F32)delta.x;
}
bool LLFontFreetype::hasGlyph(llwchar wch) const
@@ -693,7 +719,7 @@ void LLFontFreetype::renderGlyph(EFontGlyphType bitmap_type, U32 glyph_index, ll
if (mFTFace == nullptr)
return;
FT_Int32 load_flags = FT_LOAD_FORCE_AUTOHINT;
FT_Int32 load_flags = (FT_Int32)mHinting;
if (EFontGlyphType::Color == bitmap_type)
{
// We may not actually get a color render so our caller should always examine mFTFace->glyph->bitmap.pixel_mode
@@ -745,7 +771,7 @@ void LLFontFreetype::renderGlyph(EFontGlyphType bitmap_type, U32 glyph_index, ll
void LLFontFreetype::reset(F32 vert_dpi, F32 horz_dpi)
{
resetBitmapCache();
loadFace(mName, mPointSize, vert_dpi ,horz_dpi, mIsFallback, 0);
loadFace(mName, mPointSize, vert_dpi ,horz_dpi, mIsFallback, 0, mHinting, mFontFlags);
if (!mIsFallback)
{
// This is the head of the list - need to rebuild ourself and all fallbacks.
+9 -2
View File
@@ -43,6 +43,7 @@ struct FT_FaceRec_;
typedef struct FT_FaceRec_* LLFT_Face;
struct FT_StreamRec_;
typedef struct FT_StreamRec_ LLFT_Stream;
enum class EFontHinting : S32;
namespace ll
{
@@ -100,7 +101,7 @@ public:
// is_fallback should be true for fallback fonts that aren't used
// to render directly (Unicode backup, primarily)
bool loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, bool is_fallback, S32 face_n);
bool loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, bool is_fallback, S32 face_n, EFontHinting hinting, S32 flags);
S32 getNumFaces(const std::string& filename);
@@ -164,7 +165,11 @@ private:
bool setSubImageBGRA(U32 x, U32 y, U32 bitmap_num, U16 width, U16 height, const U8* data, U32 stride) const;
bool hasGlyph(llwchar wch) const; // Has a glyph for this character
LLFontGlyphInfo* addGlyph(llwchar wch, EFontGlyphType glyph_type) const; // Add a new character to the font if necessary
LLFontGlyphInfo* addGlyphFromFont(const LLFontFreetype *fontp, llwchar wch, U32 glyph_index, EFontGlyphType bitmap_type) const; // Add a glyph from this font to the other (returns the glyph_index, 0 if not found)
LLFontGlyphInfo* addGlyphFromFont(
const LLFontFreetype *fontp,
llwchar wch,
U32 glyph_index,
EFontGlyphType bitmap_type) const; // Add a glyph from this font to the other (returns the glyph_index, 0 if not found)
void renderGlyph(EFontGlyphType bitmap_type, U32 glyph_index, llwchar wch) const;
void insertGlyphInfo(llwchar wch, LLFontGlyphInfo* gi) const;
@@ -180,6 +185,8 @@ private:
LLFT_Face mFTFace;
bool mIsFallback;
EFontHinting mHinting;
S32 mFontFlags;
typedef std::pair<LLPointer<LLFontFreetype>, char_functor_t> fallback_font_t;
typedef std::vector<fallback_font_t> fallback_font_vector_t;
fallback_font_vector_t mFallbackFonts; // A list of fallback fonts to look for glyphs in (for Unicode chars)
+2 -2
View File
@@ -90,14 +90,14 @@ void LLFontGL::destroyGL()
mFontFreetype->destroyGL();
}
bool LLFontGL::loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, bool is_fallback, S32 face_n)
bool LLFontGL::loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, bool is_fallback, S32 face_n, EFontHinting hinting, S32 flags)
{
if(mFontFreetype == reinterpret_cast<LLFontFreetype*>(NULL))
{
mFontFreetype = new LLFontFreetype;
}
return mFontFreetype->loadFace(filename, point_size, vert_dpi, horz_dpi, is_fallback, face_n);
return mFontFreetype->loadFace(filename, point_size, vert_dpi, horz_dpi, is_fallback, face_n, hinting, flags);
}
S32 LLFontGL::getNumFaces(const std::string& filename)
+1 -1
View File
@@ -87,7 +87,7 @@ public:
void destroyGL();
bool loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, bool is_fallback, S32 face_n);
bool loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, bool is_fallback, S32 face_n, EFontHinting hinting, S32 flags);
S32 getNumFaces(const std::string& filename);
S32 getCacheGeneration() const;
+49 -9
View File
@@ -214,16 +214,16 @@ LLFontDescriptor LLFontDescriptor::normalize() const
return LLFontDescriptor(new_name,new_size,new_style, getFontFiles(), getFontCollectionFiles());
}
void LLFontDescriptor::addFontFile(const std::string& file_name, const std::string& char_functor)
void LLFontDescriptor::addFontFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, const std::string& char_functor)
{
char_functor_map_t::const_iterator it = mCharFunctors.find(char_functor);
mFontFiles.push_back(LLFontFileInfo(file_name, (mCharFunctors.end() != it) ? it->second : nullptr));
mFontFiles.push_back(LLFontFileInfo(file_name, hinting, flags, size_delta, (mCharFunctors.end() != it) ? it->second : nullptr));
}
void LLFontDescriptor::addFontCollectionFile(const std::string& file_name, const std::string& char_functor)
void LLFontDescriptor::addFontCollectionFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, const std::string& char_functor)
{
char_functor_map_t::const_iterator it = mCharFunctors.find(char_functor);
mFontCollectionFiles.push_back(LLFontFileInfo(file_name, (mCharFunctors.end() != it) ? it->second : nullptr));
mFontCollectionFiles.push_back(LLFontFileInfo(file_name, hinting, flags, size_delta, (mCharFunctors.end() != it) ? it->second : nullptr));
}
LLFontRegistry::LLFontRegistry(bool create_gl_textures, F32 size_mod)
@@ -351,23 +351,63 @@ bool font_desc_init_from_xml(LLXMLNodePtr node, LLFontDescriptor& desc)
{
std::string font_file_name = child->getTextContents();
std::string char_functor;
EFontHinting hinting = EFontHinting::FORCE_AUTOHINT;
S32 flags = 0;
if (child->hasAttribute("functor"))
{
child->getAttributeString("functor", char_functor);
}
if (child->hasAttribute("font_hinting"))
{
std::string attr_hinting;
child->getAttributeString("font_hinting", attr_hinting);
LLStringUtil::toLower(attr_hinting);
if (attr_hinting == "default")
{
hinting = EFontHinting::DEFAULT;
}
else if (attr_hinting == "force_auto")
{
hinting = EFontHinting::FORCE_AUTOHINT;
}
else if (attr_hinting == "no_hinting")
{
hinting = EFontHinting::NO_HINTING;
}
}
if (child->hasAttribute("flags"))
{
std::string attr_flags;
child->getAttributeString("flags", attr_flags);
LLStringUtil::toLower(attr_flags);
if (attr_flags == "bold")
{
flags |= LLFontGL::BOLD;
}
}
F32 size_delta = 0.f;
if (child->hasAttribute("size_delta"))
{
child->getAttributeF32("size_delta", size_delta);
}
if (child->hasAttribute("load_collection"))
{
bool col = false;
child->getAttributeBOOL("load_collection", col);
if (col)
{
desc.addFontCollectionFile(font_file_name, char_functor);
desc.addFontCollectionFile(font_file_name, hinting, flags, size_delta, char_functor);
}
}
desc.addFontFile(font_file_name, char_functor);
desc.addFontFile(font_file_name, hinting, flags, size_delta, char_functor);
}
else if (child->hasName("os"))
{
@@ -526,7 +566,7 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc)
// Add ultimate fallback list - generated dynamically on linux,
// null elsewhere.
std::transform(getUltimateFallbackList().begin(), getUltimateFallbackList().end(), std::back_inserter(font_files),
[](const std::string& file_name) { return LLFontFileInfo(file_name); });
[](const std::string& file_name) { return LLFontFileInfo(file_name, EFontHinting::FORCE_AUTOHINT, 0, 0.f); });
// Load fonts based on names.
if (font_files.empty())
@@ -585,8 +625,8 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc)
{
fontp = new LLFontGL;
}
if (fontp->loadFace(font_path, point_size_scale,
LLFontGL::sVertDPI, LLFontGL::sHorizDPI, is_fallback, i))
if (fontp->loadFace(font_path, point_size_scale + font_file_it->mSizeDelta,
LLFontGL::sVertDPI, LLFontGL::sHorizDPI, is_fallback, i, font_file_it->mHinting, font_file_it->mFlags))
{
is_font_loaded = true;
if (is_first_found)
+24 -4
View File
@@ -34,22 +34,42 @@ class LLFontGL;
typedef std::vector<std::string> string_vec_t;
enum class EFontHinting : S32
{
DEFAULT = 0,
NO_HINTING = 0x8000U,
FORCE_AUTOHINT = 0x20,
};
struct LLFontFileInfo
{
LLFontFileInfo(const std::string& file_name, const std::function<bool(llwchar)>& char_functor = nullptr)
LLFontFileInfo(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, const std::function<bool(llwchar)>& char_functor = nullptr)
: FileName(file_name)
, CharFunctor(char_functor)
, mHinting(hinting)
, mFlags(flags)
, mSizeDelta(size_delta)
{
}
LLFontFileInfo(const LLFontFileInfo& ffi)
LLFontFileInfo(const LLFontFileInfo& ffi, EFontHinting hinting, S32 flags, F32 size_delta)
: FileName(ffi.FileName)
, CharFunctor(ffi.CharFunctor)
, mHinting(hinting)
, mFlags(flags)
, mSizeDelta(size_delta)
{
}
std::string FileName;
std::function<bool(llwchar)> CharFunctor;
EFontHinting mHinting;
S32 mFlags;
// Not all fonts are the same size, Ex: dejavu is bigger than inter,
// so in some cases we want to adjust relative sizes to make characters
// from different files match.
F32 mSizeDelta;
};
typedef std::vector<LLFontFileInfo> font_file_info_vec_t;
@@ -71,10 +91,10 @@ public:
const std::string& getSize() const { return mSize; }
void setSize(const std::string& size) { mSize = size; }
void addFontFile(const std::string& file_name, const std::string& char_functor = LLStringUtil::null);
void addFontFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, const std::string& char_functor = LLStringUtil::null);
const font_file_info_vec_t & getFontFiles() const { return mFontFiles; }
void setFontFiles(const font_file_info_vec_t& font_files) { mFontFiles = font_files; }
void addFontCollectionFile(const std::string& file_name, const std::string& char_functor = LLStringUtil::null);
void addFontCollectionFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, const std::string& char_functor = LLStringUtil::null);
const font_file_info_vec_t& getFontCollectionFiles() const { return mFontCollectionFiles; }
void setFontCollectionFiles(const font_file_info_vec_t& font_collection_files) { mFontCollectionFiles = font_collection_files; }
+1 -1
View File
@@ -39,7 +39,7 @@ static const std::string DD_BUTTON_NAME = "dd_button";
static const std::string DD_TEXTBOX_NAME = "dd_textbox";
static const std::string DD_HEADER_NAME = "dd_header";
static const S32 HEADER_HEIGHT = 23;
static const S32 HEADER_HEIGHT = 25;
static const S32 HEADER_IMAGE_LEFT_OFFSET = 5;
static const S32 HEADER_TEXT_LEFT_OFFSET = 30;
static const F32 AUTO_OPEN_TIME = 1.f;
+1 -2
View File
@@ -912,8 +912,7 @@ void LLButton::draw()
// overlay with keyboard focus border
if (hasFocus())
{
F32 lerp_amt = gFocusMgr.getFocusFlashAmt();
drawBorder(imagep, gFocusMgr.getFocusColor() % alpha, ll_round(lerp(1.f, 3.f, lerp_amt)));
drawBorder(imagep, gFocusMgr.getFocusColor() % alpha, gFocusMgr.getFocusFlashWidth());
}
if (use_glow_effect)
+6 -15
View File
@@ -51,7 +51,6 @@ S32 LLDragHandle::sSnapMargin = 5;
LLDragHandle::LLDragHandle(const LLDragHandle::Params& p)
: LLView(p),
mLabelVPadding(p.label_v_padding), // <FS:Zi> Make vertical label padding a per-skin option
mDragLastScreenX( 0 ),
mDragLastScreenY( 0 ),
mLastMouseScreenX( 0 ),
@@ -60,7 +59,9 @@ LLDragHandle::LLDragHandle(const LLDragHandle::Params& p)
mMaxTitleWidth( 0 ),
mForeground( true ),
mDragHighlightColor(p.drag_highlight_color()),
mDragShadowColor(p.drag_shadow_color())
mDragShadowColor(p.drag_shadow_color()),
mFont(p.font),
mLabelVPad(p.label_vpad())
{
static LLUICachedControl<S32> snap_margin ("SnapMargin", 0);
@@ -99,14 +100,13 @@ void LLDragHandleTop::setTitle(const std::string& title)
}
else
{
const LLFontGL* font = LLFontGL::getFontSansSerif();
LLTextBox::Params params;
params.name("Drag Handle Title");
params.rect(getRect());
params.initial_value(trimmed_title);
params.font(font);
params.font(mFont);
params.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT | FOLLOWS_RIGHT);
params.font_shadow(LLFontGL::DROP_SHADOW_SOFT);
params.font_shadow(LLFontGL::NO_SHADOW);
params.use_ellipses = true;
params.parse_urls = false; //cancel URL replacement in floater title
mTitleBox = LLUICtrlFactory::create<LLTextBox> (params);
@@ -237,15 +237,6 @@ void LLDragHandleLeft::draw()
void LLDragHandleTop::reshapeTitleBox()
{
// <FS:Zi> Make vertical label padding a per-skin option
// static LLUICachedControl<S32> title_vpad("UIFloaterTitleVPad", 0);
static LLUICachedControl<S32> default_title_vpad("UIFloaterTitleVPad", 0);
S32 title_vpad=mLabelVPadding;
if(title_vpad==-1)
{
title_vpad=default_title_vpad;
}
// </FS:Zi>
if( ! mTitleBox)
{
return;
@@ -257,7 +248,7 @@ void LLDragHandleTop::reshapeTitleBox()
LLRect title_rect;
title_rect.setLeftTopAndSize(
LEFT_PAD,
getRect().getHeight() - title_vpad,
getRect().getHeight() - mLabelVPad,
title_width,
title_height);
+7 -6
View File
@@ -43,15 +43,17 @@ public:
: public LLInitParam::Block<Params, LLView::Params>
{
Optional<std::string> label;
Optional<S32> label_vpad;
Optional<LLUIColor> drag_highlight_color;
Optional<LLUIColor> drag_shadow_color;
Optional<S32> label_v_padding; // <FS:Zi> Make vertical label padding a per-skin option
Optional<const LLFontGL*> font;
Params()
: label("label"),
label_v_padding("label_v_padding", -1), // <FS:Zi> Make vertical label padding a per-skin option
label_vpad("label_vpad", 7),
drag_highlight_color("drag_highlight_color", LLUIColorTable::instance().getColor("DefaultHighlightLight")),
drag_shadow_color("drag_shadow_color", LLUIColorTable::instance().getColor("DefaultShadowDark"))
drag_shadow_color("drag_shadow_color", LLUIColorTable::instance().getColor("DefaultShadowDark")),
font("font", LLFontGL::getFontSansSerif())
{
changeDefault(mouse_opaque, true);
changeDefault(follows.flags, FOLLOWS_ALL);
@@ -84,6 +86,8 @@ protected:
protected:
LLTextBox* mTitleBox;
const LLFontGL* mFont;
S32 mLabelVPad;
private:
LLRect mButtonsRect;
@@ -99,9 +103,6 @@ private:
// Pixels near the edge to snap floaters.
static S32 sSnapMargin;
protected:
S32 mLabelVPadding; // <FS:Zi> Make vertical label padding a per-skin option
};
+8 -13
View File
@@ -186,7 +186,6 @@ LLFloater::Params::Params()
can_snooze("can_snooze", false), // <FS:Ansariel> FIRE-11724: Snooze group chat
can_drag_on_left("can_drag_on_left", false),
drop_shadow("drop_shadow",true), // <FS:Zi> Optional Drop Shadows
label_v_padding("label_v_padding", -1), // <FS:Zi> Make vertical label padding a per-skin option
can_tear_off("can_tear_off", true),
save_dock_state("save_dock_state", false),
save_rect("save_rect", false),
@@ -195,8 +194,10 @@ LLFloater::Params::Params()
show_title("show_title", true),
auto_close("auto_close", false),
positioning("positioning", LLFloaterEnums::POSITIONING_RELATIVE),
header_font("header_font", LLFontGL::getFontSansSerif()),
header_height("header_height", 0),
legacy_header_height("legacy_header_height", 0),
header_vpad("header_vpad", 7),
close_image("close_image"),
snooze_image("snooze_image"), // <FS:Ansariel> FIRE-11724: Snooze group chat
restore_image("restore_image"),
@@ -259,7 +260,6 @@ static LLWidgetNameRegistry::StaticRegistrar sRegisterFloaterParams(typeid(LLFlo
LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
: LLPanel(), // intentionally do not pass params here, see initFromParams
mDragHandle(NULL),
mLabelVPadding(p.label_v_padding), // <FS:Zi> Make vertical label padding a per-skin optional
mTitle(p.title),
mShortTitle(p.short_title),
mSingleInstance(p.single_instance),
@@ -311,15 +311,7 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
memset(mButtonsEnabled, 0, BUTTON_COUNT * sizeof(bool));
memset(mButtons, 0, BUTTON_COUNT * sizeof(LLButton*));
// <FS:Zi> Make vertical label padding a per-skin option
// if no padding is set, use default from settings.xml
if (mLabelVPadding == -1)
{
mLabelVPadding = LLUI::getInstance()->mSettingGroups["config"]->getS32("UIFloaterTitleVPad");
}
// </FS:Zi>
addDragHandle();
addDragHandle(p);
addResizeCtrls();
initFromParams(p);
@@ -372,7 +364,7 @@ void LLFloater::initFloater(const Params& p)
}
}
void LLFloater::addDragHandle()
void LLFloater::addDragHandle(const LLFloater::Params& floater_params)
{
if (!mDragHandle)
{
@@ -382,6 +374,8 @@ void LLFloater::addDragHandle()
p.name("drag");
p.follows.flags(FOLLOWS_ALL);
p.label(mTitle);
p.font(floater_params.header_font);
p.label_vpad(floater_params.header_vpad);
mDragHandle = LLUICtrlFactory::create<LLDragHandleLeft>(p);
}
else // drag on top
@@ -390,7 +384,8 @@ void LLFloater::addDragHandle()
p.name("Drag Handle");
p.follows.flags(FOLLOWS_ALL);
p.label(mTitle);
p.label_v_padding = mLabelVPadding; // <FS:Zi> Make vertical label padding a per-skin option
p.font(floater_params.header_font);
p.label_vpad(floater_params.header_vpad);
mDragHandle = LLUICtrlFactory::create<LLDragHandleTop>(p);
}
addChild(mDragHandle);
+4 -4
View File
@@ -177,9 +177,10 @@ public:
Optional<LLFloaterEnums::EOpenPositioning> positioning;
Optional<const LLFontGL*> header_font;
Optional<S32> header_height,
label_v_padding, // <FS:Zi> Make vertical label padding a per-skin option
legacy_header_height; // HACK see initFromXML()
legacy_header_height, // HACK see initFromXML()
header_vpad;
Optional<F32> rel_x,
rel_y;
@@ -462,7 +463,7 @@ private:
bool offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButton index);
void addResizeCtrls();
void layoutResizeCtrls();
void addDragHandle();
void addDragHandle(const LLFloater::Params& p);
void layoutDragHandle(); // repair layout
static void updateActiveFloaterTransparency();
@@ -515,7 +516,6 @@ private:
//std::string mInstanceName; // Store the instance name so we can remove ourselves from the list
bool mDropShadow; // ## Zi: Optional Drop Shadows
S32 mLabelVPadding; // <FS:Zi> Make vertical label padding a per-skin option
bool mCanTearOff;
bool mCanMinimize;
bool mCanClose;
+5
View File
@@ -464,6 +464,11 @@ F32 LLFocusMgr::getFocusFlashAmt() const
return clamp_rescale(mFocusFlashTimer.getElapsedTimeF32(), 0.f, FOCUS_FADE_TIME, 1.f, 0.f);
}
S32 LLFocusMgr::getFocusFlashWidth() const
{
return ll_round(lerp(1.f, 2.f, getFocusFlashAmt()));
}
LLColor4 LLFocusMgr::getFocusColor() const
{
static LLUIColor focus_color_cached = LLUIColorTable::instance().getColor("FocusColor");
+1 -1
View File
@@ -101,7 +101,7 @@ public:
void setKeystrokesOnly(bool keystrokes_only) { mKeystrokesOnly = keystrokes_only; }
F32 getFocusFlashAmt() const;
S32 getFocusFlashWidth() const { return ll_round(lerp(1.f, 3.f, getFocusFlashAmt())); }
S32 getFocusFlashWidth() const;
LLColor4 getFocusColor() const;
void triggerFocusFlash();
bool getAppHasFocus() const { return mAppHasFocus; }
+9 -5
View File
@@ -170,9 +170,11 @@ LLFolderViewItem::Params::Params()
icon_width("icon_width", 0),
text_pad("text_pad", 0),
text_pad_right("text_pad_right", 0),
text_pad_top("text_pad_top", 1),
single_folder_mode("single_folder_mode", false),
double_click_override("double_click_override", false),
arrow_size("arrow_size", 0),
arrow_pad_top("arrow_pad_top", 1),
max_folder_item_overlap("max_folder_item_overlap", 0),
// <FS:Ansariel> Inventory specials
for_inventory("for_inventory", false)
@@ -215,7 +217,9 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p)
mIconWidth(p.icon_width),
mTextPad(p.text_pad),
mTextPadRight(p.text_pad_right),
mTextPadTop(p.text_pad_top),
mArrowSize(p.arrow_size),
mArrowPadTop(p.arrow_pad_top),
mSingleFolderMode(p.single_folder_mode),
mMaxFolderItemOverlap(p.max_folder_item_overlap),
mDoubleClickOverride(p.double_click_override),
@@ -877,7 +881,7 @@ void LLFolderViewItem::drawOpenFolderArrow()
{
gl_draw_scaled_rotated_image(
// <FS:Ansariel> Inventory specials
mIndentation, getRect().getHeight() - mArrowSize - mTextPad - mItemTopPad,
mIndentation, getRect().getHeight() - mArrowSize - mArrowPadTop - mItemTopPad,
mArrowSize, mArrowSize, mControlLabelRotation, sFolderArrowImg->getImage(), sFgColor);
}
}
@@ -1111,7 +1115,7 @@ void LLFolderViewItem::draw()
S32 filter_string_length = mViewModelItem->hasFilterStringMatch() ? (S32)mViewModelItem->getFilterStringSize() : 0;
F32 right_x = 0;
F32 y = (F32)rect_height - line_height - (F32)mTextPad - (F32)mItemTopPad;
F32 y = (F32)rect_height - line_height - (F32)mTextPadTop - (F32)mItemTopPad;
F32 text_left = (F32)getLabelXPos();
LLWString combined_string = mLabel + mLabelSuffix;
@@ -1210,7 +1214,7 @@ void LLFolderViewItem::draw()
if(mLabelSuffix.empty() || (font == sSuffixFont))
{
F32 match_string_left = text_left + font->getWidthF32(combined_string.c_str(), 0, filter_offset + filter_string_length) - font->getWidthF32(combined_string.c_str(), filter_offset, filter_string_length);
F32 yy = (F32)rect_height - line_height - (F32)mTextPad - (F32)mItemTopPad;
F32 yy = (F32)rect_height - line_height - (F32)mTextPadTop - (F32)mItemTopPad;
font->render(combined_string, filter_offset, match_string_left, yy,
sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
filter_string_length, S32_MAX, &right_x);
@@ -1221,7 +1225,7 @@ void LLFolderViewItem::draw()
if(label_filter_length > 0)
{
F32 match_string_left = text_left + font->getWidthF32(mLabel.c_str(), 0, filter_offset + label_filter_length) - font->getWidthF32(mLabel.c_str(), filter_offset, label_filter_length);
F32 yy = (F32)rect_height - line_height - (F32)mTextPad - (F32)mItemTopPad;
F32 yy = (F32)rect_height - line_height - (F32)mTextPadTop - (F32)mItemTopPad;
font->render(mLabel, filter_offset, match_string_left, yy,
sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
label_filter_length, S32_MAX, &right_x);
@@ -1232,7 +1236,7 @@ void LLFolderViewItem::draw()
{
S32 suffix_offset = llmax(0, filter_offset - (S32)mLabel.size());
F32 match_string_left = text_left + font->getWidthF32(mLabel.c_str(), 0, static_cast<S32>(mLabel.size())) + sSuffixFont->getWidthF32(mLabelSuffix.c_str(), 0, suffix_offset + suffix_filter_length) - sSuffixFont->getWidthF32(mLabelSuffix.c_str(), suffix_offset, suffix_filter_length);
F32 yy = (F32)rect_height - sSuffixFont->getLineHeight() - (F32)mTextPad - (F32)mItemTopPad;
F32 yy = (F32)rect_height - sSuffixFont->getLineHeight() - (F32)mTextPadTop - (F32)mItemTopPad;
sSuffixFont->render(mLabelSuffix, suffix_offset, match_string_left, yy, sFilterTextColor,
LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
suffix_filter_length, S32_MAX, &right_x);
+4
View File
@@ -73,7 +73,9 @@ public:
icon_width,
text_pad,
text_pad_right,
text_pad_top,
arrow_size,
arrow_pad_top,
max_folder_item_overlap;
Optional<bool> single_folder_mode,
double_click_override;
@@ -121,7 +123,9 @@ protected:
mIconWidth,
mTextPad,
mTextPadRight,
mTextPadTop,
mArrowSize,
mArrowPadTop,
mMaxFolderItemOverlap;
F32 mControlLabelRotation;
+1 -2
View File
@@ -2037,12 +2037,11 @@ void LLLineEditor::draw()
width = llmin(width, mTextRightEdge - ll_round(rendered_pixels_right));
gl_rect_2d(ll_round(rendered_pixels_right), cursor_top, ll_round(rendered_pixels_right)+width, cursor_bottom, color);
LLColor4 tmp_color( 1.f - text_color.mV[0], 1.f - text_color.mV[1], 1.f - text_color.mV[2], alpha );
rendered_text += mFontBufferSelection.render(
mGLFont,
mText, mScrollHPos + rendered_text,
rendered_pixels_right, text_bottom,
tmp_color,
LLColor4::black,
LLFontGL::LEFT, LLFontGL::BOTTOM,
0,
LLFontGL::NO_SHADOW,
+12 -5
View File
@@ -74,7 +74,7 @@ S32 MENU_BAR_WIDTH = 410;
/// Local function declarations, constants, enums, and typedefs
///============================================================================
const S32 LABEL_BOTTOM_PAD_PIXELS = 2;
const S32 LABEL_BOTTOM_PAD_PIXELS = 1;
const U32 LEFT_PAD_PIXELS = 3;
const U32 LEFT_WIDTH_PIXELS = 15;
@@ -540,21 +540,25 @@ void LLMenuItemGL::draw( void )
}
else
{
// Munus are all of the same size, so fixed offset works here,
// but it won't work if somebody decides to use different font
// todo: adjust logic to work of rect and font height
F32 y = (F32)MENU_ITEM_PADDING / 2.f;
if( !mDrawBoolLabel.empty() )
{
mFont->render( mDrawBoolLabel.getWString(), 0, (F32)LEFT_PAD_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f), color,
mFont->render( mDrawBoolLabel.getWString(), 0, (F32)LEFT_PAD_PIXELS, y, color,
LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false );
}
mFont->render( mLabel.getWString(), 0, (F32)LEFT_PLAIN_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f), color,
mFont->render( mLabel.getWString(), 0, (F32)LEFT_PLAIN_PIXELS, y, color,
LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false );
if( !mDrawAccelLabel.empty() )
{
mFont->render( mDrawAccelLabel.getWString(), 0, (F32)getRect().mRight - (F32)RIGHT_PLAIN_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f), color,
mFont->render( mDrawAccelLabel.getWString(), 0, (F32)getRect().mRight - (F32)RIGHT_PLAIN_PIXELS, y, color,
LLFontGL::RIGHT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false );
}
if( !mDrawBranchLabel.empty() )
{
mFont->render( mDrawBranchLabel.getWString(), 0, (F32)getRect().mRight - (F32)RIGHT_PAD_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f), color,
mFont->render( mDrawBranchLabel.getWString(), 0, (F32)getRect().mRight - (F32)RIGHT_PAD_PIXELS, y, color,
LLFontGL::RIGHT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false );
}
}
@@ -1661,6 +1665,9 @@ void LLMenuItemBranchDownGL::draw( void )
{
color = mDisabledColor.get();
}
// Munus are all of the same size, so fixed offset works here,
// but it won't work if somebody decides to use different font
// todo: adjust logic to work of rect and font height
getFont()->render( mLabel.getWString(), 0, (F32)getRect().getWidth() / 2.f, (F32)LABEL_BOTTOM_PAD_PIXELS, color,
LLFontGL::HCENTER, LLFontGL::BOTTOM, LLFontGL::NORMAL);
+4 -1
View File
@@ -56,6 +56,9 @@ const F32 CURSOR_FLASH_DELAY = 1.0f; // in seconds
const S32 CURSOR_THICKNESS = 2;
const F32 TRIPLE_CLICK_INTERVAL = 0.3f; // delay between double and triple click.
constexpr F32 FOCUSED_SELECTION_BG_ALPHA = 1;
constexpr F32 UNFOCUSED_SELECTION_BG_ALPHA = 0.7f;
LLTextBase::line_info::line_info(S32 index_start, S32 index_end, LLRect rect, S32 line_num)
: mDocIndexStart(index_start),
mDocIndexEnd(index_end),
@@ -668,7 +671,7 @@ void LLTextBase::drawSelectionBackground()
// Draw the selection box (we're using a box instead of reversing the colors on the selected text).
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
const LLColor4& color = mSelectedBGColor;
F32 alpha = hasFocus() ? 0.7f : 0.3f;
F32 alpha = hasFocus() ? FOCUSED_SELECTION_BG_ALPHA : UNFOCUSED_SELECTION_BG_ALPHA;
alpha *= getDrawContext().mAlpha;
LLColor4 selection_color(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE], alpha);
+1
View File
@@ -434,6 +434,7 @@ public:
/*virtual*/ void setColor(const LLUIColor& c) override;
virtual void setReadOnlyColor(const LLUIColor& c);
/*virtual*/ void onVisibilityChange(bool new_visibility) override;
void setBgReadOnlyColor(const LLUIColor& c) { mReadOnlyBgColor = c; }
/*virtual*/ void setValue(const LLSD& value) override;
/*virtual*/ LLTextViewModel* getViewModel() const override;
+1 -1
View File
@@ -149,7 +149,7 @@ void LLViewBorder::drawOnePixelLines()
top_color = gFocusMgr.getFocusColor();
bottom_color = top_color;
LLUI::setLineWidth(lerp(1.f, 3.f, gFocusMgr.getFocusFlashAmt()));
LLUI::setLineWidth(lerp(1.f, 2.f, gFocusMgr.getFocusFlashAmt()));
}
S32 left = 0;
+51
View File
@@ -1764,6 +1764,57 @@ void LLWebRTCPeerConnectionImpl::unsetDataObserver(LLWebRTCDataObserver* observe
}
}
class LLStatsCollectorCallback : public webrtc::RTCStatsCollectorCallback
{
public:
typedef std::function<void(const LLWebRTCStatsMap&)> StatsCallback;
LLStatsCollectorCallback(StatsCallback callback) : callback_(callback) {}
void OnStatsDelivered(const webrtc::scoped_refptr<const webrtc::RTCStatsReport>& report) override
{
if (callback_)
{
// Transform RTCStatsReport stats to simple map
LLWebRTCStatsMap stats_map;
for (const auto& stats : *report)
{
std::map<std::string, std::string> stat_attributes;
// Convert each attribute to string format
for (const auto& attribute : stats.Attributes())
{
stat_attributes[attribute.name()] = attribute.ToString();
}
stats_map[stats.id()] = stat_attributes;
}
callback_(stats_map);
}
}
private:
StatsCallback callback_;
};
void LLWebRTCPeerConnectionImpl::gatherConnectionStats()
{
if (!mPeerConnection)
{
return;
}
auto stats_callback = webrtc::make_ref_counted<LLStatsCollectorCallback>(
[this](const LLWebRTCStatsMap& generic_stats)
{
for (auto& observer : mSignalingObserverList)
{
observer->OnStatsDelivered(generic_stats);
}
});
mPeerConnection->GetStats(stats_callback.get());
}
LLWebRTCImpl * gWebRTCImpl = nullptr;
LLWebRTCDeviceInterface * getDeviceInterface()
{
+6
View File
@@ -38,6 +38,7 @@
#ifndef LLWEBRTC_H
#define LLWEBRTC_H
#include <map>
#include <string>
#include <vector>
// <FS:minerjr> [FIRE-36022] - Removing my USB headset crashes entire viewer
@@ -65,6 +66,7 @@ inline std::atomic<bool> gWebRTCUpdateDevices = false;
// </FS:minerjr> [FIRE-36022]
namespace llwebrtc
{
typedef std::map<std::string, std::map<std::string, std::string>> LLWebRTCStatsMap;
class LLWebRTCLogCallback
{
@@ -250,6 +252,8 @@ class LLWebRTCSignalingObserver
// Called when the data channel has been established and data
// transfer can begin.
virtual void OnDataChannelReady(LLWebRTCDataInterface *data_interface) = 0;
virtual void OnStatsDelivered(const LLWebRTCStatsMap& stats_data) {}
};
// LLWebRTCPeerConnectionInterface representsd a connection to a peer,
@@ -283,6 +287,8 @@ class LLWebRTCPeerConnectionInterface
virtual void unsetSignalingObserver(LLWebRTCSignalingObserver* observer) = 0;
virtual void AnswerAvailable(const std::string &sdp) = 0;
virtual void gatherConnectionStats() = 0;
};
// The following define the dynamic linked library
+2
View File
@@ -648,6 +648,8 @@ class LLWebRTCPeerConnectionImpl : public LLWebRTCPeerConnectionInterface,
void enableSenderTracks(bool enable);
void enableReceiverTracks(bool enable);
void gatherConnectionStats() override;
protected:
LLWebRTCImpl * mWebRTCImpl;
+2
View File
@@ -543,6 +543,7 @@ set(viewer_SOURCE_FILES
llfloaterimnearbychat.cpp
llfloaterimnearbychathandler.cpp
llfloaterimnearbychatlistener.cpp
llnearbyvoicemoderation.cpp
llnetmap.cpp
llnotificationalerthandler.cpp
llnotificationgrouphandler.cpp
@@ -1396,6 +1397,7 @@ set(viewer_HEADER_FILES
llnameeditor.h
llnamelistctrl.h
llnavigationbar.h
llnearbyvoicemoderation.h
llnetmap.h
llnotificationhandler.h
llnotificationlistitem.h
+1 -1
View File
@@ -1 +1 @@
26.1.0
26.2.0
+33 -11
View File
@@ -9465,6 +9465,39 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Value</key>
<integer>1</integer>
</map>
<key>OpenDebugStatVoice</key>
<map>
<key>Comment</key>
<string>Expand Voice (WebRTC) stats display</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>OpenDebugStatVoiceOutgoing</key>
<map>
<key>Comment</key>
<string>Expand Outgoing audio (Voice) stats display</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>OpenDebugStatVoiceIncoming</key>
<map>
<key>Comment</key>
<string>Expand Incoming audio (Voice) stats display</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>OutBandwidth</key>
<map>
<key>Comment</key>
@@ -16040,17 +16073,6 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Backup</key>
<integer>0</integer>
</map>
<key>UIFloaterTitleVPad</key>
<map>
<key>Comment</key>
<string>Distance from top of floater to top of title string, pixels</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<real>7</real>
</map>
<key>UIImgDefaultEyesUUID</key>
<map>
<key>Comment</key>
+110 -75
View File
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<fonts>
<font name="default" comment="default font files (global fallbacks)">
<file>DejaVuSans.ttf</file>
<font
name="default"
comment="default font files (global fallbacks)">
<file load_collection="true" font_hinting="default">Inter_18pt-Regular.ttf</file>
<file size_delta="-0.5">DejaVuSans.ttf</file>
<file functor="is_emoji_use_color">TwemojiSVG.ttf</file>
<file functor="is_emoji_use_bw">NotoEmoji-Regular.ttf</file>
<os name="Windows">
@@ -35,9 +38,11 @@
</os>
</font>
<font name="SansSerifBold"
comment="Name of bold sans-serif font">
<file>DejaVuSans-Bold.ttf</file>
<font
name="SansSerifBold"
comment="Name of bold sans-serif font">
<file load_collection="true" font_hinting="default" flags="bold">Inter_18pt-ExtraBold.ttf</file>
<file size_delta="-0.5">DejaVuSans-Bold.ttf</file>
<os name="Windows">
<file>arialbd.ttf</file>
</os>
@@ -46,8 +51,11 @@
</os>
</font>
<font name="SansSerif" comment="Name of san-serif font (Truetype file name)">
<file>DejaVuSans.ttf</file>
<font
name="SansSerif"
comment="Name of san-serif font (Truetype file name)">
<file load_collection="true" font_hinting="default">Inter_18pt-Regular.ttf</file>
<file size_delta="-0.5">DejaVuSans.ttf</file>
<os name="Windows">
<file>arial.ttf</file>
</os>
@@ -56,51 +64,63 @@
</os>
</font>
<font name="SansSerif"
comment="Name of bold sans-serif font"
font_style="BOLD">
<file>DejaVuSans-Bold.ttf</file>
<font
name="SansSerif"
comment="Name of bold sans-serif font"
font_style="BOLD">
<file load_collection="true" font_hinting="default" flags="bold">Inter_18pt-Bold.ttf</file>
<file size_delta="-0.5">DejaVuSans-Bold.ttf</file>
</font>
<font name="SansSerif"
comment="Name of italic sans-serif font"
font_style="ITALIC">
<file>DejaVuSans-Oblique.ttf</file>
<font
name="SansSerif"
comment="Name of italic sans-serif font"
font_style="ITALIC">
<file load_collection="true">Inter_18pt-Italic.ttf</file>
<file size_delta="-0.5">DejaVuSans-Oblique.ttf</file>
</font>
<font name="SansSerif"
comment="Name of bold italic sans-serif font"
font_style="BOLD|ITALIC">
<file>DejaVuSans-BoldOblique.ttf</file>
<font
name="SansSerif"
comment="Name of bold italic sans-serif font"
font_style="BOLD|ITALIC">
<file load_collection="true">Inter_18pt-BoldItalic.ttf</file>
<file size_delta="-0.5">DejaVuSans-BoldOblique.ttf</file>
</font>
<font name="Emoji"
comment="Name of emoji font">
<font
name="Emoji"
comment="Name of emoji font">
<file>TwemojiSVG.ttf</file>
</font>
<font name="EmojiBW"
comment="Name of emoji font">
<font
name="EmojiBW"
comment="Name of emoji font">
<file>NotoEmoji-Regular.ttf</file>
</font>
<font name="Monospace"
comment="Name of monospace font">
<font
name="Monospace"
comment="Name of monospace font">
<file>DejaVuSansMono.ttf</file>
</font>
<font name="Scripting"
comment="Name of an optional font used for the script editor">
<font
name="Scripting"
comment="Name of an optional font used for the script editor">
<file>SourceCodePro-Regular.ttf</file>
</font>
<font name="OCRA"
comment="OCRA machine character recognition used in script editor compile errors">
<font
name="OCRA"
comment="OCRA machine character recognition used in script editor compile errors">
<file>ocra.ttf</file>
</font>
<font name="Cascadia"
comment="Name of an optional Cascadia Code font used for the script editor">
<font
name="Cascadia"
comment="Name of an optional Cascadia Code font used for the script editor">
<file>CascadiaCode-Light.ttf</file>
</font>
@@ -127,9 +147,11 @@
<file>DejaVuSans-BoldOblique.ttf</file>
</font>
<font name="Helvetica"
comment="Name of Helvetica font">
<file>DejaVuSans.ttf</file>
<font
name="Helvetica"
comment="Name of Helvetica font">
<file font_hinting="default">Inter_18pt-Regular.ttf</file>
<file size_delta="-0.5">DejaVuSans.ttf</file>
<os name="Windows">
<file>arial.ttf</file>
</os>
@@ -138,10 +160,12 @@
</os>
</font>
<font name="Helvetica"
comment="Name of Helvetica font (bold)"
font_style="BOLD">
<file>DejaVuSans-Bold.ttf</file>
<font
name="Helvetica"
comment="Name of Helvetica font (bold)"
font_style="BOLD">
<file font_hinting="default" flags="bold">Inter_18pt-ExtraBold.ttf</file>
<file size_delta="-0.5">DejaVuSans-Bold.ttf</file>
<os name="Windows">
<file>arialbd.ttf</file>
</os>
@@ -150,10 +174,12 @@
</os>
</font>
<font name="Helvetica"
comment="Name of Helvetica font (italic)"
font_style="ITALIC">
<file>DejaVuSans-Oblique.ttf</file>
<font
name="Helvetica"
comment="Name of Helvetica font (italic)"
font_style="ITALIC">
<file>Inter_18pt-Italic.ttf</file>
<file size_delta="-0.5">DejaVuSans-Oblique.ttf</file>
<os name="Windows">
<file>ariali.ttf</file>
</os>
@@ -162,10 +188,12 @@
</os>
</font>
<font name="Helvetica"
comment="Name of Helvetica font (bold italic)"
font_style="BOLD|ITALIC">
<file>DejaVuSans-BoldOblique.ttf</file>
<font
name="Helvetica"
comment="Name of Helvetica font (bold italic)"
font_style="BOLD|ITALIC">
<file>Inter_18pt-BoldItalic.ttf</file>
<file size_delta="-0.5">DejaVuSans-BoldOblique.ttf</file>
<os name="Windows">
<file>arialbi.ttf</file>
</os>
@@ -174,42 +202,49 @@
</os>
</font>
<font name="OverrideTest"
comment="Name of font to test overriding">
<font
name="OverrideTest"
comment="Name of font to test overriding">
<file>times.ttf</file>
<file>DejaVuSans.ttf</file>
<file font_hinting="default">Inter_18pt-Regular.ttf</file>
</font>
<font_size name="Scripting"
comment="Size of script editor font (points, or 1/72 of an inch)"
size="8.6"
/>
<font_size
name="Scripting"
comment="Size of script editor font (points, or 1/72 of an inch)"
size="8.6"
/>
<font_size name="Monospace"
comment="Size for monospaced font (points, or 1/72 of an inch)"
size="8.0"
/>
<font_size name="Cascadia"
comment="Size for monospaced font (points, or 1/72 of an inch)"
size="8.6"
/>
comment="Size for monospaced font (points, or 1/72 of an inch)"
size="8.0"
/>
<font_size
name="Cascadia"
comment="Size for monospaced font (points, or 1/72 of an inch)"
size="8.6"
/>
<font_size name="Huge"
comment="Size of huge font (points, or 1/72 of an inch)"
size="16.0"
/>
comment="Size of huge font (points, or 1/72 of an inch)"
size="16.0"
/>
<font_size name="Large"
comment="Size of large font (points, or 1/72 of an inch)"
size="10.6"
/>
comment="Size of large font (points, or 1/72 of an inch)"
size="11.0"
/>
<font_size name="Medium"
comment="Size of medium font (points, or 1/72 of an inch)"
size="8.6"
/>
comment="Size of medium font (points, or 1/72 of an inch)"
size="10"
/>
<font_size name="Small"
comment="Size of small font (points, or 1/72 of an inch)"
size="7.6"
/>
comment="Size of small font (points, or 1/72 of an inch)"
size="9"
/>
<font_size name="LSmall"
comment="Legacy size of small font (points, or 1/72 of an inch)"
size="7.6"
/>
<font_size name="Pie"
comment="Size of pie menu font (points, or 1/72 of an inch)"
size="7.3"
/>
comment="Size of pie menu font (points, or 1/72 of an inch)"
size="8.7"
/>
</fonts>
@@ -208,6 +208,10 @@
comment="Size of small font (points, or 1/72 of an inch)"
size="7.6"
/>
<font_size name="LSmall"
comment="Legacy size of small font (points, or 1/72 of an inch)"
size="7.6"
/>
<font_size name="Pie"
comment="Size of pie menu font (points, or 1/72 of an inch)"
size="7.3"
@@ -208,6 +208,10 @@
comment="Size of small font (points, or 1/72 of an inch)"
size="9.4"
/>
<font_size name="LSmall"
comment="Legacy size of small font (points, or 1/72 of an inch)"
size="7.6"
/>
<font_size name="Pie"
comment="Size of pie menu font (points, or 1/72 of an inch)"
size="8.1"
@@ -207,6 +207,10 @@
comment="Size of small font (points, or 1/72 of an inch)"
size="7.6"
/>
<font_size name="LSmall"
comment="Legacy size of small font (points, or 1/72 of an inch)"
size="7.6"
/>
<font_size name="Pie"
comment="Size of pie menu font (points, or 1/72 of an inch)"
size="7.3"
+4
View File
@@ -208,6 +208,10 @@
comment="Size of small font (points, or 1/72 of an inch)"
size="9.0"
/>
<font_size name="LSmall"
comment="Legacy size of small font (points, or 1/72 of an inch)"
size="7.6"
/>
<font_size name="Pie"
comment="Size of pie menu font (points, or 1/72 of an inch)"
size="7.5"
+4
View File
@@ -208,6 +208,10 @@
comment="Size of small font (points, or 1/72 of an inch)"
size="8.0"
/>
<font_size name="LSmall"
comment="Legacy size of small font (points, or 1/72 of an inch)"
size="7.6"
/>
<font_size name="Pie"
comment="Size of pie menu font (points, or 1/72 of an inch)"
size="7.5"
+4
View File
@@ -208,6 +208,10 @@
comment="Size of small font (points, or 1/72 of an inch)"
size="9.0"
/>
<font_size name="LSmall"
comment="Legacy size of small font (points, or 1/72 of an inch)"
size="7.6"
/>
<font_size name="Pie"
comment="Size of pie menu font (points, or 1/72 of an inch)"
size="9.0"
+4
View File
@@ -208,6 +208,10 @@
comment="Size of small font (points, or 1/72 of an inch)"
size="9.0"
/>
<font_size name="LSmall"
comment="Legacy size of small font (points, or 1/72 of an inch)"
size="7.6"
/>
<font_size name="Pie"
comment="Size of pie menu font (points, or 1/72 of an inch)"
size="7.5"
+4
View File
@@ -208,6 +208,10 @@
comment="Size of small font (points, or 1/72 of an inch)"
size="9.0"
/>
<font_size name="LSmall"
comment="Legacy size of small font (points, or 1/72 of an inch)"
size="7.6"
/>
<font_size name="Pie"
comment="Size of pie menu font (points, or 1/72 of an inch)"
size="7.5"
+4
View File
@@ -208,6 +208,10 @@
comment="Size of small font (points, or 1/72 of an inch)"
size="9.0"
/>
<font_size name="LSmall"
comment="Legacy size of small font (points, or 1/72 of an inch)"
size="7.6"
/>
<font_size name="Pie"
comment="Size of pie menu font (points, or 1/72 of an inch)"
size="7.5"
+4
View File
@@ -212,6 +212,10 @@
comment="Size of small font (points, or 1/72 of an inch)"
size="8.6"
/>
<font_size name="LSmall"
comment="Legacy size of small font (points, or 1/72 of an inch)"
size="7.6"
/>
<font_size name="Pie"
comment="Size of pie menu font (points, or 1/72 of an inch)"
size="8.0"
+13 -5
View File
@@ -206,13 +206,14 @@ void LLColorSwatchCtrl::draw()
F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency();
mBorder->setKeyboardFocusHighlight(hasFocus());
// Draw border
LLRect border( 0, getRect().getHeight(), getRect().getWidth(), mLabelHeight );
gl_rect_2d( border, mBorderColor.get(), false );
LLRect interior = border;
LLRect gl_border(0, getRect().getHeight(), getRect().getWidth(), mLabelHeight);
LLColor4 gl_border_color = mBorderColor.get();
LLRect interior = gl_border;
interior.stretch( -1 );
bool show_border_ctrl = true;
// Check state
if ( mValid )
{
@@ -245,7 +246,9 @@ void LLColorSwatchCtrl::draw()
{
if (mFallbackImage.notNull())
{
mFallbackImage->draw(interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), LLColor4::white % alpha);
mFallbackImage->draw(interior.mLeft - 1, interior.mBottom - 1, mFallbackImage->getWidth(), mFallbackImage->getHeight(), LLColor4::white % alpha);
gl_border_color = LLUIColorTable::instance().getColor("ColorSwatchBorderColorGray").get();
show_border_ctrl = false;
}
else
{
@@ -256,8 +259,13 @@ void LLColorSwatchCtrl::draw()
}
}
mBorder->setVisible(show_border_ctrl);
mCaption->setEnabled(getEnabled() && isInEnabledChain()); // <FS:Zi> Add label/caption colors
// Draw border
gl_rect_2d(gl_border, gl_border_color, false);
LLUICtrl::draw();
}
+108 -3
View File
@@ -58,6 +58,8 @@
#include "llsdserialize.h"
#include "llviewermenu.h" // is_agent_mappable
#include "llviewerobjectlist.h"
#include "llvoavatar.h"
#include "llnearbyvoicemoderation.h"
// [RLVa:KB] - @pay
#include "rlvactions.h"
// [/RLVa:KB]
@@ -94,6 +96,7 @@ LLFloaterIMContainer::LLFloaterIMContainer(const LLSD& seed, const Params& param
mAutoResize = false;
LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::IM, this);
LLNearbyVoiceModeration::getInstance();
}
LLFloaterIMContainer::~LLFloaterIMContainer()
@@ -534,6 +537,33 @@ void LLFloaterIMContainer::idleUpdate()
mGeneralTitleInUse = !needs_override;
setTitle(needs_override ? conversation_floaterp->getTitle() : mGeneralTitle);
}
const LLConversationItem* nearby_session = getSessionModel(LLUUID());
if (nearby_session)
{
LLSpeakerMgr* speaker_mgr = (LLSpeakerMgr*)(LLLocalSpeakerMgr::getInstance());
LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = nearby_session->getChildrenBegin();
LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = nearby_session->getChildrenEnd();
while (current_participant_model != end_participant_model)
{
LLConversationItemParticipant* participant_model =
dynamic_cast<LLConversationItemParticipant*>((*current_participant_model).get());
if (participant_model)
{
bool show_moderator_options = LLNearbyVoiceModeration::getInstance()->isNearbyChatModerator();
LLUUID participant_id = participant_model->getUUID();
if (participant_id != gAgentID)
{
// Don't show moderator options if participant is not connected to the same spatial channel
LLSpeaker* speakerp = speaker_mgr->findSpeaker(participant_id).get();
show_moderator_options &= speakerp && speakerp->isInVoiceChannel();
}
participant_model->setModeratorOptionsVisible(show_moderator_options);
}
current_participant_model++;
}
}
}
mParticipantRefreshTimer.setTimerExpirySec(1.0f);
@@ -1697,6 +1727,10 @@ bool LLFloaterIMContainer::visibleContextMenuItem(const LLSD& userdata)
{
return isMuted(conversation_item->getUUID());
}
else if ("can_allow_text_chat" == item)
{
return !isNearbyChatSpeakerSelected();
}
return true;
}
@@ -2026,9 +2060,27 @@ LLConversationViewParticipant* LLFloaterIMContainer::createConversationViewParti
bool LLFloaterIMContainer::enableModerateContextMenuItem(const std::string& userdata, bool is_self)
{
// only group moderators can perform actions related to this "enable callback"
if (!isGroupModerator())
if (LLNearbyVoiceModeration::getInstance()->isNearbyChatModerator() && isNearbyChatSpeakerSelected())
{
// Determine here which actions are allowed
if ("can_moderate_voice" == userdata)
{
return true;
}
else if (("can_mute" == userdata))
{
return !is_self;
}
else if ("can_unmute" == userdata)
{
return true;
}
return false;
}
else if (!isGroupModerator())
{
// only group moderators can perform actions related to this "enable callback"
return false;
}
@@ -2161,7 +2213,35 @@ void LLFloaterIMContainer::banSelectedMember(const LLUUID& participant_uuid)
void LLFloaterIMContainer::moderateVoice(const std::string& command, const LLUUID& userID)
{
if (!gAgent.getRegion()) return;
if (!gAgent.getRegion())
{
return;
}
if (isNearbyChatSpeakerSelected())
{
if ("selected" == command)
{
// Request a mute/unmute using a capability request via the simulator
LLNearbyVoiceModeration::getInstance()->requestMuteIndividual(userID, !isMuted(userID));
}
else
if ("mute_all" == command)
{
// Send the mute_all request to the server
const bool mute_state = true;
LLNearbyVoiceModeration::getInstance()->requestMuteAll(mute_state);
}
else
if ("unmute_all" == command)
{
// Send the unmute_all request to the server
const bool mute_state = false;
LLNearbyVoiceModeration::getInstance()->requestMuteAll(mute_state);
}
return;
}
if (command.compare("selected"))
{
@@ -2279,6 +2359,31 @@ LLSpeaker * LLFloaterIMContainer::getSpeakerOfSelectedParticipant(LLSpeakerMgr *
return speaker_managerp->findSpeaker(participant_itemp->getUUID());
}
bool LLFloaterIMContainer::isNearbyChatSpeakerSelected()
{
LLFolderViewItem *selectedItem = mConversationsRoot->getCurSelectedItem();
if (!selectedItem)
{
LL_WARNS() << "Current selected item is null" << LL_ENDL;
return NULL;
}
conversations_widgets_map::const_iterator iter = mConversationsWidgets.begin();
conversations_widgets_map::const_iterator end = mConversationsWidgets.end();
const LLUUID * conversation_uuidp = NULL;
while(iter != end)
{
if (iter->second == selectedItem || iter->second == selectedItem->getParentFolder())
{
conversation_uuidp = &iter->first;
break;
}
++iter;
}
// Nearby chat ID is LLUUID::null
return conversation_uuidp->isNull();
}
void LLFloaterIMContainer::toggleAllowTextChat(const LLUUID& participant_uuid)
{
LLIMSpeakerMgr * speaker_managerp = dynamic_cast<LLIMSpeakerMgr*>(getSpeakerMgrForSelectedParticipant());
+1
View File
@@ -180,6 +180,7 @@ private:
void banSelectedMember(const LLUUID& participant_uuid);
void openNearbyChat();
bool isParticipantListExpanded();
bool isNearbyChatSpeakerSelected();
void idleUpdate(); // for convenience (self) from static idle
void idleProcessEvents();
+220
View File
@@ -0,0 +1,220 @@
/**
* @file llnearbyvoicemoderation.cpp
*
* $LicenseInfo:firstyear=2008&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 "llviewerprecompiledheaders.h"
#include "llagent.h"
#include "llnotificationsutil.h"
#include "llviewerregion.h"
#include "llvoavatar.h"
#include "llvoicechannel.h"
#include "llvoiceclient.h"
#include "llviewerobjectlist.h"
#include "llviewerparcelmgr.h"
#include "roles_constants.h"
#include "llnearbyvoicemoderation.h"
LLNearbyVoiceModeration::LLNearbyVoiceModeration()
{
}
LLNearbyVoiceModeration::~LLNearbyVoiceModeration()
{
}
LLVOAvatar* LLNearbyVoiceModeration::getVOAvatarFromId(const LLUUID& agent_id)
{
LLViewerObject *obj = gObjectList.findObject(agent_id);
while (obj && obj->isAttachment())
{
obj = (LLViewerObject*)obj->getParent();
}
if (obj && obj->isAvatar())
{
return (LLVOAvatar*)obj;
}
else
{
return NULL;
}
}
const std::string LLNearbyVoiceModeration::getCapUrlFromRegion(LLViewerRegion* region)
{
if (! region || ! region->capabilitiesReceived())
{
return std::string();
}
std::string url = region->getCapability("SpatialVoiceModerationRequest");
if (url.empty())
{
LL_INFOS() << "Capability URL for region " << region->getName() << " is empty" << LL_ENDL;
return std::string();
}
LL_INFOS() << "Capability URL for region " << region->getName() << " is " << url << LL_ENDL;
return url;
}
void LLNearbyVoiceModeration::requestMuteIndividual(const LLUUID& agent_id, bool mute)
{
LLVOAvatar* avatar = getVOAvatarFromId(agent_id);
if (avatar)
{
const std::string cap_url = getCapUrlFromRegion(avatar->getRegion());
if (cap_url.length())
{
const std::string operand = mute ? "mute" : "unmute";
LLSD body;
body["operand"] = operand;
body["agent_id"] = agent_id;
const std::string agent_name = avatar->getFullname();
LL_INFOS() << "Resident " << agent_name
<< " (" << agent_id << ")" << " applying " << operand << LL_ENDL;
std::string success_msg =
STRINGIZE("Resident " << agent_name
<< " (" << agent_id << ")" << " nearby voice was set to " << operand);
std::string failure_msg =
STRINGIZE("Unable to change voice muting for resident "
<< agent_name << " (" << agent_id << ")");
LLCoreHttpUtil::HttpCoroutineAdapter::messageHttpPost(
cap_url,
body,
success_msg,
failure_msg);
}
}
}
void LLNearbyVoiceModeration::requestMuteAll(bool mute)
{
// Use our own avatar to get the region name
LLViewerRegion* region = gAgent.getRegion();
const std::string cap_url = getCapUrlFromRegion(region);
if (cap_url.length())
{
const std::string operand = mute ? "mute_all" : "unmute_all";
LLSD body;
body["operand"] = operand;
LL_INFOS() << "For all residents in this region, applying: " << operand << LL_ENDL;
std::string success_msg =
STRINGIZE("Nearby voice for all residents was set to: " << operand);
std::string failure_msg =
STRINGIZE("Unable to set nearby voice for all residents to: " << operand);
LLCoreHttpUtil::HttpCoroutineAdapter::messageHttpPost(
cap_url,
body,
success_msg,
failure_msg);
}
}
void LLNearbyVoiceModeration::setMutedInfo(const std::string& channelID, bool mute)
{
auto it = mChannelMuteMap.find(channelID);
if (it == mChannelMuteMap.end())
{
if (mute)
{
// Channel is new and being muted
showMutedNotification(true);
}
mChannelMuteMap[channelID] = mute;
}
else
{
if (it->second != mute)
{
// Flag changed
showMutedNotification(mute);
it->second = mute;
}
}
if (mute && LLVoiceClient::getInstance()->getUserPTTState())
{
LLVoiceClient::getInstance()->setUserPTTState(false);
}
}
bool LLNearbyVoiceModeration::showNotificationIfNeeded()
{
if (LLVoiceClient::getInstance()->inProximalChannel() &&
LLVoiceClient::getInstance()->getIsModeratorMuted(gAgentID))
{
return showMutedNotification(true);
}
return false;
}
bool LLNearbyVoiceModeration::showMutedNotification(bool is_muted)
{
// Check if the current voice channel is nearby chat
if (LLVoiceClient::getInstance()->inProximalChannel())
{
LLNotificationsUtil::add(is_muted ? "NearbyVoiceMutedByModerator" : "NearbyVoiceUnmutedByModerator");
return true;
}
return false;
}
bool LLNearbyVoiceModeration::isNearbyChatModerator()
{
// Region doesn't support WebRTC voice
if (!gAgent.getRegion() || !gAgent.getRegion()->isRegionWebRTCEnabled())
{
return false;
}
// Only show moderator options when connected to spatial voice chat
LLVoiceChannel* channel = LLVoiceChannel::getCurrentVoiceChannel();
if (!channel || channel->getSessionID().notNull() || !LLAgent::isActionAllowed("speak"))
{
return false;
}
if (LLViewerParcelMgr::getInstance()->isVoiceRestricted())
{
// Only the parcel owner should have access to moderate parcel voice space
return LLViewerParcelMgr::getInstance()->allowVoiceModeration();
}
else
{
return gAgent.canManageEstate();
}
}
+50
View File
@@ -0,0 +1,50 @@
/**
* @file llnearbyvoicemoderation.h
*
* $LicenseInfo:firstyear=2008&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$
*/
#pragma once
class LLVOAvatar;
class LLNearbyVoiceModeration : public LLSingleton <LLNearbyVoiceModeration> {
LLSINGLETON(LLNearbyVoiceModeration);
~LLNearbyVoiceModeration();
public:
void requestMuteIndividual(const LLUUID& userID, bool mute);
void requestMuteAll(bool mute);
void setMutedInfo(const std::string& channelID, bool mute);
bool showMutedNotification(bool is_muted);
bool showNotificationIfNeeded();
bool isNearbyChatModerator();
private:
LLVOAvatar* getVOAvatarFromId(const LLUUID& id);
const std::string getCapUrlFromRegion(LLViewerRegion* region);
boost::signals2::connection mParcelCallbackConnection;
std::map<std::string, bool> mChannelMuteMap;
};
+3 -1
View File
@@ -193,13 +193,15 @@ void LLNotificationListItem::onMouseEnter(S32 x, S32 y, MASK mask)
{
mCondensedViewPanel->setTransparentColor(LLUIColorTable::instance().getColor( "ScrollHoveredColor" ));
mExpandedViewPanel->setTransparentColor(LLUIColorTable::instance().getColor( "ScrollHoveredColor" ));
mNoticeTextExp->setBgReadOnlyColor(LLUIColorTable::instance().getColor("SelectedBgReadOnlyColor"));
}
void LLNotificationListItem::onMouseLeave(S32 x, S32 y, MASK mask)
{
mCondensedViewPanel->setTransparentColor(LLUIColorTable::instance().getColor( "SysWellItemUnselected" ));
mExpandedViewPanel->setTransparentColor(LLUIColorTable::instance().getColor( "SysWellItemUnselected" ));
}
mNoticeTextExp->setBgReadOnlyColor(LLUIColorTable::instance().getColor("TextBgReadOnlyColor"));
}
//static
LLNotificationListItem* LLNotificationListItem::create(const Params& p)
+1 -1
View File
@@ -2009,7 +2009,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
if (mColorSwatch)
{
mColorSwatch->setEnabled( false );
mColorSwatch->setFallbackImage(LLUI::getUIImage("locked_image.j2c") );
mColorSwatch->setFallbackImage(LLUI::getUIImage("locked_image") );
mColorSwatch->setValid(false);
}
+10
View File
@@ -750,6 +750,16 @@ bool LLViewerParcelMgr::allowAgentVoice() const
return allowAgentVoice(gAgent.getRegion(), mAgentParcel);
}
bool LLViewerParcelMgr::isVoiceRestricted() const
{
return mAgentParcel && !mAgentParcel->getParcelFlagUseEstateVoiceChannel();
}
bool LLViewerParcelMgr::allowVoiceModeration() const
{
return isVoiceRestricted() && isParcelOwnedByAgent(mAgentParcel, GP_SESSION_MODERATOR);
}
bool LLViewerParcelMgr::allowAgentVoice(const LLViewerRegion* region, const LLParcel* parcel) const
{
return region && region->isVoiceEnabled()
+6
View File
@@ -185,6 +185,12 @@ public:
bool allowAgentVoice() const;
bool allowAgentVoice(const LLViewerRegion* region, const LLParcel* parcel) const;
// Returns true if this parcel is using private voice channel
bool isVoiceRestricted() const;
// Can this agent moderate Nearby voice chat on this parcel?
bool allowVoiceModeration() const;
// Can this agent start flying on this parcel?
// Used for parcel property icons in nav bar.
bool allowAgentFly(const LLViewerRegion* region, const LLParcel* parcel) const;
+11
View File
@@ -3552,6 +3552,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("SetDisplayName");
capabilityNames.append("SimConsoleAsync");
capabilityNames.append("SimulatorFeatures");
capabilityNames.append("SpatialVoiceModerationRequest");
capabilityNames.append("StartGroupProposal");
capabilityNames.append("TerrainNavMeshProperties");
capabilityNames.append("TextureStats");
@@ -4079,6 +4080,16 @@ std::string LLViewerRegion::getSimHostName()
return std::string("...");
}
bool LLViewerRegion::isRegionWebRTCEnabled()
{
if (mSimulatorFeaturesReceived && mSimulatorFeatures.has("VoiceServerType"))
{
return mSimulatorFeatures["VoiceServerType"].asString() == "webrtc";
}
return false;
}
void LLViewerRegion::applyCacheMiscExtras(LLViewerObject* obj)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
+2
View File
@@ -457,6 +457,8 @@ public:
std::string getSimHostName();
bool isRegionWebRTCEnabled();
static bool isNewObjectCreationThrottleDisabled() {return sNewObjectCreationThrottle < 0;}
// rebuild reflection probe list
+14
View File
@@ -269,6 +269,20 @@ LLTrace::SampleStatHandle<LLUnit<F32, LLUnits::Percent> > HUDS_FRAME_PCT("huds_
LLTrace::SampleStatHandle<LLUnit<F32, LLUnits::Percent> > UI_FRAME_PCT("ui_frame_pct");
LLTrace::SampleStatHandle<LLUnit<F32, LLUnits::Percent> > SWAP_FRAME_PCT("swap_frame_pct");
LLTrace::SampleStatHandle<LLUnit<F32, LLUnits::Percent> > IDLE_FRAME_PCT("idle_frame_pct");
LLTrace::SampleStatHandle<U32> WEBRTC_PACKETS_IN_LOST("webrtc_packets_in_lost", "Lost incoming packets"),
WEBRTC_PACKETS_IN_RECEIVED("webrtc_packets_in_recv", "Incoming packets received"),
WEBRTC_PACKETS_OUT_SENT("webrtc_packets_out_sent", "Outgoing packets sent"),
WEBRTC_PACKETS_OUT_LOST("webrtc_packets_out_lost", "Lost outgoing packets");
LLTrace::SampleStatHandle<F32> WEBRTC_JITTER_OUT("webrtc_jitter_out", "Timing variation of outgoing audio"),
WEBRTC_JITTER_IN("webrtc_jitter_in", "Timing variation of incoming audio"),
WEBRTC_LATENCY("webrtc_latency", "Round-trip audio delay"),
WEBRTC_UPLOAD_BANDWIDTH("webrtc_upload_bandwidth", "Estimated upload bandwidth"),
WEBRTC_JITTER_BUFFER("webrtc_jitter_buffer", "Average delay added to smooth incoming audio");
}
LLViewerStats::LLViewerStats()
+3
View File
@@ -237,6 +237,9 @@ extern LLTrace::EventStatHandle<LLUnit<F32, LLUnits::Percent> > OBJECT_CACHE_HIT
extern LLTrace::SampleStatHandle<F64> NOTRMALIZED_FRAMETIME_JITTER_SESSION;
extern LLTrace::SampleStatHandle<F64> NORMALIZED_FRAMTIME_JITTER_PERIOD;
extern LLTrace::SampleStatHandle<U32> WEBRTC_PACKETS_IN_LOST, WEBRTC_PACKETS_IN_RECEIVED, WEBRTC_PACKETS_OUT_SENT, WEBRTC_PACKETS_OUT_LOST;
extern LLTrace::SampleStatHandle<F32> WEBRTC_JITTER_OUT, WEBRTC_JITTER_IN, WEBRTC_LATENCY, WEBRTC_UPLOAD_BANDWIDTH, WEBRTC_JITTER_BUFFER;
}
class LLViewerStats : public LLSingleton<LLViewerStats>
+8
View File
@@ -39,6 +39,7 @@
#include "llagent.h"
#include "lltrans.h"
#include "lluiusage.h"
#include "llnearbyvoicemoderation.h"
const F32 LLVoiceClient::OVERDRIVEN_POWER_LEVEL = 0.7f;
@@ -733,6 +734,13 @@ bool LLVoiceClient::getPTTIsToggle()
void LLVoiceClient::inputUserControlState(bool down)
{
if (down && !getUserPTTState())
{
// Nearby chat is muted by moderator, don't toggle PTT
if (LLNearbyVoiceModeration::getInstance()->showNotificationIfNeeded())
return;
}
if(mPTTIsToggle)
{
if(down) // toggle open-mic state on 'down'
+162 -2
View File
@@ -61,10 +61,12 @@
#include "llrand.h"
#include "llviewerwindow.h"
#include "llviewercamera.h"
#include "llviewerstats.h"
#include "llversioninfo.h"
#include "llviewernetwork.h"
#include "llnotificationsutil.h"
#include "llnearbyvoicemoderation.h"
#include "llcorehttputil.h"
#include "lleventfilter.h"
@@ -80,6 +82,8 @@
const std::string WEBRTC_VOICE_SERVER_TYPE = "webrtc";
const F32 STATS_TIMER_DELAY = 2.0;
// <FS:minerjr> [FIRE-36022] - Removing my USB headset crashes entire viewer
using namespace std::chrono_literals; // Needed for shared timed mutex to use time
// </FS:minerjr> [FIRE-36022]
@@ -2985,6 +2989,7 @@ bool LLVoiceWebRTCConnection::connectionStateMachine()
}
mWebRTCAudioInterface->setReceiveVolume(mSpeakerVolume);
LLWebRTCVoiceClient::getInstance()->OnConnectionEstablished(mChannelID, mRegionID);
resetConnectionStats();
setVoiceConnectionState(VOICE_STATE_WAIT_FOR_DATA_CHANNEL);
break;
}
@@ -3038,6 +3043,13 @@ bool LLVoiceWebRTCConnection::connectionStateMachine()
sendJoin();
}
}
static LLTimer stats_timer;
if (stats_timer.getElapsedTimeF32() > STATS_TIMER_DELAY)
{
mWebRTCPeerConnectionInterface->gatherConnectionStats();
stats_timer.reset();
}
}
break;
}
@@ -3254,12 +3266,54 @@ void LLVoiceWebRTCConnection::OnDataReceivedImpl(const std::string &data, bool b
if (participant_obj.contains("m") && participant_obj["m"].is_bool())
{
participant->mIsModeratorMuted = participant_obj["m"].as_bool();
bool is_moderator_muted = participant_obj["m"].as_bool();
if (isSpatial())
{
// ignore muted flags from non-primary server
if (mPrimary || primary)
{
participant->mIsModeratorMuted = is_moderator_muted;
if (gAgentID == agent_id)
{
LLNearbyVoiceModeration::getInstance()->setMutedInfo(mChannelID, is_moderator_muted);
}
}
}
else
{
participant->mIsModeratorMuted = is_moderator_muted;
}
}
}
}
else
{
if (isSpatial() && (mPrimary || primary))
{
// mute info message can be received before join message, so try to mute again later
if (participant_obj.contains("m") && participant_obj["m"].is_bool())
{
bool is_moderator_muted = participant_obj["m"].as_bool();
std::string channel_id = mChannelID;
F32 delay { 1.5f };
doAfterInterval(
[channel_id, agent_id, is_moderator_muted]()
{
LLWebRTCVoiceClient::participantStatePtr_t participant =
LLWebRTCVoiceClient::getInstance()->findParticipantByID(channel_id, agent_id);
if (participant)
{
participant->mIsModeratorMuted = is_moderator_muted;
if (gAgentID == agent_id)
{
LLNearbyVoiceModeration::getInstance()->setMutedInfo(channel_id, is_moderator_muted);
}
}
}, delay);
}
}
}
}
// tell the simulator to set the mute and volume data for this
// participant, if there are any updates.
boost::json::object root;
@@ -3331,6 +3385,112 @@ void LLVoiceWebRTCConnection::sendJoin()
mWebRTCDataInterface->sendData(json_data, false);
}
void LLVoiceWebRTCConnection::OnStatsDelivered(const llwebrtc::LLWebRTCStatsMap& stats_data)
{
LL::WorkQueue::postMaybe(mMainQueue, [=, this]
{
if (mShutDown)
{
return;
}
for (const auto& [stats_id, attributes] : stats_data)
{
if (attributes.contains("currentRoundTripTime"))
{
F32 rtt_seconds = 0.0f;
LLStringUtil::convertToF32(attributes.at("currentRoundTripTime"), rtt_seconds);
sample(LLStatViewer::WEBRTC_LATENCY, rtt_seconds * 1000.0f);
}
if (attributes.contains("availableOutgoingBitrate"))
{
F32 bitrate_bps = 0.0f;
LLStringUtil::convertToF32(attributes.at("availableOutgoingBitrate"), bitrate_bps);
sample(LLStatViewer::WEBRTC_UPLOAD_BANDWIDTH, bitrate_bps / 1000.0f);
}
// Stat type detection below is heuristic-based.
// It's relied on specific fields to distinguish outbound-rtp, remote-inbound-rtp, and inbound-rtp.
// This approach works with current WebRTC stats but may need updating later.
// Outbound RTP
if (attributes.contains("mediaSourceId"))
{
U32 out_packets_sent = 0;
LLStringUtil::convertToU32(attributes.at("packetsSent"), out_packets_sent);
sample(LLStatViewer::WEBRTC_PACKETS_OUT_SENT, out_packets_sent);
}
// Remote-Inbound RTP
else if (attributes.contains("localId"))
{
if (attributes.contains("packetsLost"))
{
U32 out_packets_lost = 0;
LLStringUtil::convertToU32(attributes.at("packetsLost"), out_packets_lost);
sample(LLStatViewer::WEBRTC_PACKETS_OUT_LOST, out_packets_lost);
}
if (attributes.contains("jitter"))
{
F32 jitter_seconds = 0.0f;
LLStringUtil::convertToF32(attributes.at("jitter"), jitter_seconds);
sample(LLStatViewer::WEBRTC_JITTER_OUT, jitter_seconds * 1000.0f);
}
}
// Inbound RTP
else if (attributes.contains("jitterBufferDelay"))
{
if (attributes.contains("packetsLost"))
{
U32 in_packets_lost = 0;
LLStringUtil::convertToU32(attributes.at("packetsLost"), in_packets_lost);
sample(LLStatViewer::WEBRTC_PACKETS_IN_LOST, in_packets_lost);
}
if (attributes.contains("packetsReceived"))
{
U32 in_packets_recv = 0;
LLStringUtil::convertToU32(attributes.at("packetsReceived"), in_packets_recv);
sample(LLStatViewer::WEBRTC_PACKETS_IN_RECEIVED, in_packets_recv);
}
if (attributes.contains("jitter"))
{
F32 jitter_seconds = 0.0f;
LLStringUtil::convertToF32(attributes.at("jitter"), jitter_seconds);
sample(LLStatViewer::WEBRTC_JITTER_IN, jitter_seconds * 1000.0f);
}
if (attributes.contains("jitterBufferDelay") && attributes.contains("jitterBufferEmittedCount"))
{
F32 total_delay_seconds = 0.0f;
F32 emitted_count_f = 0.0f;
// total delay in seconds
LLStringUtil::convertToF32(attributes.at("jitterBufferDelay"), total_delay_seconds);
// number of packets played out
LLStringUtil::convertToF32(attributes.at("jitterBufferEmittedCount"), emitted_count_f);
if (emitted_count_f > 0.0f)
{
F32 avg_delay_seconds = total_delay_seconds / emitted_count_f;
F32 avg_delay_ms = avg_delay_seconds * 1000.0f;
sample(LLStatViewer::WEBRTC_JITTER_BUFFER, avg_delay_seconds * 1000.0f);
}
}
}
}
});
}
void LLVoiceWebRTCConnection::resetConnectionStats()
{
sample(LLStatViewer::WEBRTC_JITTER_BUFFER, 0);
sample(LLStatViewer::WEBRTC_JITTER_IN, 0);
sample(LLStatViewer::WEBRTC_JITTER_OUT, 0);
sample(LLStatViewer::WEBRTC_LATENCY, 0);
sample(LLStatViewer::WEBRTC_PACKETS_IN_LOST, 0);
sample(LLStatViewer::WEBRTC_PACKETS_IN_RECEIVED, 0);
sample(LLStatViewer::WEBRTC_PACKETS_OUT_SENT, 0);
sample(LLStatViewer::WEBRTC_PACKETS_OUT_LOST, 0);
sample(LLStatViewer::WEBRTC_UPLOAD_BANDWIDTH, 0);
}
/////////////////////////////
// WebRTC Spatial Connection
+6
View File
@@ -540,6 +540,8 @@ private:
static bool sShuttingDown;
LLEventMailDrop mWebRTCPump;
LLSD mLastWebRTCStats;
};
@@ -603,6 +605,8 @@ class LLVoiceWebRTCConnection :
//@{
void OnDataReceived(const std::string &data, bool binary) override;
void OnDataChannelReady(llwebrtc::LLWebRTCDataInterface *data_interface) override;
void OnStatsDelivered(const llwebrtc::LLWebRTCStatsMap& stats_data) override;
//@}
void OnDataReceivedImpl(const std::string &data, bool binary);
@@ -638,6 +642,8 @@ class LLVoiceWebRTCConnection :
void OnVoiceConnectionRequestSuccess(const LLSD &body);
void resetConnectionStats();
protected:
typedef enum e_voice_connection_state
{
+19 -1
View File
@@ -40,6 +40,12 @@
<color
name="EmphasisColor_35"
value="0.950 0.412 0.173 0.35" />
<color
name="SelectionColor"
value="0.706 0.851 1 1" />
<color
name="ScrollHoveredColor"
value="0.18 0.26 0.33 1" />
<color
name="BeaconColor"
value="0.749 0.298 0 1" />
@@ -341,9 +347,12 @@
<color
name="PropertyColorSelf"
value="0 1 0 0.4" />
<color
<color
name="ColorSwatchBorderColor"
value="0.45098 0.517647 0.607843 1"/>
<color
name="ColorSwatchBorderColorGray"
value="0.329 0.329 0.329 1"/>
<color
name="TextEmbeddedItemColor"
value="1.00 0.549 0.267 1" />
@@ -1031,6 +1040,9 @@
<color
name="SelectedOutfitTextColor"
reference="EmphasisColor" />
<color
name="WornOutfitTextColor"
value="0.54 0.73 0.87 1" />
<color
name="SearchableControlHighlightFontColor"
reference="Red" />
@@ -1062,6 +1074,9 @@
<color
name="SystemChatColor"
reference="LtGray" />
<color
name="SelectedBgReadOnlyColor"
value="0.15 0.21 0.27 1" />
<color
name="TextBgFocusColor"
reference="White" />
@@ -1139,6 +1154,9 @@
<color
name="ChatTimestampColor"
reference="White" />
<color
name="MenuBarStreamingBgColor"
reference="DkGray" />
<color
name="MenuBarBetaBgColor"
reference="DkBlue" />
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

@@ -763,6 +763,8 @@ with the same filename but different name
<texture name="OBJECT_Icon" file_name="icons/object_icon.png" preload="true" />
<texture name="Unknown_Icon" file_name="icons/unknown_icon.png" preload="true" />
<texture name="Square_Selection" file_name="square_selection.png" preload="true" scale.left="16" scale.top="16" scale.right="112" scale.bottom="16" />
<texture name="Snapshot_Off" file_name="bottomtray/Snapshot_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
<texture name="Snapshot_Download" file_name="snapshot_download.png" preload="false" />
<texture name="Snapshot_Email" file_name="snapshot_email.png" preload="false" />
@@ -802,6 +804,15 @@ with the same filename but different name
<texture name="TabIcon_Places_Off" file_name="taskpanel/TabIcon_Places_Off.png" preload="false" />
<texture name="TabIcon_Things_Off" file_name="taskpanel/TabIcon_Things_Off.png" preload="false" />
<texture name="TabLeft_Flat_Off" file_name="containers/TabLeft_Flat_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
<texture name="TabLeft_Flat_Selected" file_name="containers/TabLeft_Flat_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
<texture name="TabTop_First_Flat_Off" file_name="containers/TabTop_First_Flat_Off.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" />
<texture name="TabTop_Last_Flat_Off" file_name="containers/TabTop_Last_Flat_Off.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" />
<texture name="TabTop_Middle_Flat_Off" file_name="containers/TabTop_Middle_Flat_Off.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" />
<texture name="TabTop_First_Flat_Selected" file_name="containers/TabTop_First_Flat_Selected.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" />
<texture name="TabTop_Last_Flat_Selected" file_name="containers/TabTop_Last_Flat_Selected.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" />
<texture name="TabTop_Middle_Flat_Selected" file_name="containers/TabTop_Middle_Flat_Selected.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" />
<texture name="TabTop_Right_Off" file_name="containers/TabTop_Right_Off.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" />
<texture name="TabTop_Right_Selected" file_name="containers/TabTop_Right_Selected.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" />
<texture name="TabTop_Right_Flashing" file_name="containers/TabTop_Right_Flashing.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" />
@@ -819,6 +830,7 @@ with the same filename but different name
<texture name="TextField_Search_Off" file_name="widgets/TextField_Search_Off.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
<texture name="TextField_Disabled" file_name="widgets/TextField_Disabled.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
<texture name="TextField_Active" file_name="widgets/TextField_Active.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
<texture name="TextField_Highlight" file_name="widgets/TextField_Highlight.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
<texture name="TextField_Search_Highlight" file_name="widgets/TextField_Search_Highlight.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
<texture name="Thumbnail_Fallback" file_name="icons/thumbnail_fallback_icon.png" preload="true" />
@@ -1059,6 +1071,7 @@ with the same filename but different name
<texture name="badge_warn.j2c" />
<texture name="badge_ok.j2c" />
<texture name="materials_ui_x_24.png" />
<texture name="locked_image" file_name="locked_image_dark.png" preload="true"/>
<texture name="Progress_1" file_name="icons/Progress_1.png" preload="true" />
<texture name="Progress_2" file_name="icons/Progress_2.png" preload="true" />
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

@@ -992,7 +992,7 @@ Loading...
layout="topleft"
left="28"
name="Set to group:"
top_pad="5"
top_pad="9"
width="176">
Set to group:
</text>
@@ -1040,7 +1040,7 @@ Loading...
layout="topleft"
left="28"
name="Owned by others:"
top_pad="5"
top_pad="9"
width="176">
Owned by others:
</text>
@@ -5,7 +5,7 @@
height="800"
layout="topleft"
min_height="175"
min_width="154"
min_width="390"
name="contents"
help_topic="contents"
title="Font Fest"
@@ -145,7 +145,7 @@
font="SansSerifMedium"
text_color="White"
top_delta="1"
width="300">
width="310">
Clicking on "Show in inventory" or "Find original"
</text>
<radio_group
@@ -4,9 +4,9 @@
can_resize="true"
default_tab_group="1"
height="790"
width="256"
width="267"
min_height="500"
min_width="256"
min_width="267"
layout="topleft"
name="material editor"
help_topic="material_editor"
@@ -17,7 +17,7 @@
top="18"
left="4"
height="768"
width="250"
width="261"
follows="all"
layout="topleft"
color="DkGray2"
@@ -4,9 +4,9 @@
can_resize="true"
default_tab_group="1"
height="891"
width="256"
width="267"
min_height="500"
min_width="256"
min_width="267"
layout="topleft"
name="material editor"
help_topic="material_editor"
@@ -20,7 +20,7 @@
top="18"
left="4"
height="768"
width="250"
width="261"
follows="all"
layout="topleft"
color="DkGray2"
@@ -40,6 +40,7 @@
mouse_opaque="true"
name="icon_settingsdays"
left="4"
top="9"
width="16" />
<check_box
height="16"
@@ -47,7 +48,7 @@
layout="topleft"
left_pad="2"
name="chk_days"
top_delta="0"
top_delta="2"
width="60" />
<icon
height="16"
@@ -56,6 +57,7 @@
mouse_opaque="true"
name="icon_settingsskies"
left_pad="10"
top="9"
width="16" />
<check_box
height="16"
@@ -63,7 +65,7 @@
layout="topleft"
left_pad="2"
name="chk_skies"
top_delta="0"
top_delta="2"
width="60" />
<icon
height="16"
@@ -72,6 +74,7 @@
mouse_opaque="true"
name="icon_settingswater"
left_pad="10"
top="9"
width="16" />
<check_box
height="16"
@@ -79,7 +82,7 @@
layout="topleft"
left_pad="2"
name="chk_water"
top_delta="0"
top_delta="2"
width="60" />
<filter_editor
follows="left|top|right"
@@ -88,7 +91,7 @@
layout="topleft"
left="4"
name="flt_search"
top_pad="6"
top_pad="4"
right="-4" />
</layout_panel>
<layout_panel
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater
height="130"
height="140"
width="300"
layout="topleft"
name="floater_new_feature_notification"
@@ -40,7 +40,7 @@ New feature
text_color="White"
layout="topleft"
left="10"
height="40"
height="50"
top_pad="14"
right="-10"
word_wrap="true"
@@ -440,6 +440,64 @@
</stat_view>
</stat_view>
</stat_view>
<stat_view name="voice"
label="Voice"
setting="OpenDebugStatVoice">
<stat_bar
name="webrtc_latency"
label="Latency"
stat="webrtc_latency"
unit_label="ms"
decimal_digits="1"/>
<stat_bar
name="webrtc_upload_bandwidth"
label="Upload bandwidth"
stat="webrtc_upload_bandwidth"
unit_label="kbps"
decimal_digits="0"/>
<stat_view name="incoming_audio"
label="Incoming audio"
setting="OpenDebugStatVoiceIncoming">
<stat_bar
name="incoming_packet_recv"
label="Packets received"
stat="webrtc_packets_in_recv"/>
<stat_bar
name="packets_in_lost"
label="Packets lost"
stat="webrtc_packets_in_lost"/>
<stat_bar
name="jitter_in"
label="Jitter"
stat="webrtc_jitter_in"
unit_label="ms"
decimal_digits="1"/>
<stat_bar
name="jitter_buffer"
label="Jitter buffer"
stat="webrtc_jitter_buffer"
unit_label="ms"
decimal_digits="1"/>
</stat_view>
<stat_view name="outgoing_audio"
label="Outgoing audio"
setting="OpenDebugStatVoiceOutgoing">
<stat_bar
name="packets_out_sent"
label="Packets sent"
stat="webrtc_packets_out_sent"/>
<stat_bar
name="packets_out_lost"
label="Packets lost"
stat="webrtc_packets_out_lost"/>
<stat_bar
name="jitter_out"
label="Jitter"
stat="webrtc_jitter_out"
unit_label="ms"
decimal_digits="1"/>
</stat_view>
</stat_view>
</container_view>
</scroll_container>
</floater>
@@ -2,7 +2,7 @@
<!-- Explicit left edge to avoid overlapping build tools -->
<floater
legacy_header_height="18"
height="250"
height="260"
layout="topleft"
name="telehub"
help_topic="telehub"
File diff suppressed because it is too large Load Diff
@@ -22,7 +22,7 @@
increment="0.025"
initial_value="0.5"
label="Voice Chat"
label_width="60"
label_width="62"
layout="topleft"
left="15"
top="50"
@@ -9,7 +9,7 @@
bg_opaque_image="Inspector_Background"
can_close="false"
can_minimize="false"
height="158"
height="188"
layout="topleft"
name="inspect_group"
single_instance="true"
@@ -47,7 +47,7 @@
</text>
<text
follows="all"
height="45"
height="65"
left="8"
name="group_details"
use_ellipses="true"
@@ -79,7 +79,7 @@ L$123 to join
height="23"
label="Join"
left="8"
top="125"
top="156"
name="join_btn"
width="103"
commit_callback.function="InspectGroup.Join"/>
@@ -88,7 +88,7 @@ L$123 to join
height="23"
label="Leave"
left="8"
top="125"
top="156"
name="leave_btn"
width="103"
commit_callback.function="InspectGroup.Leave"/>
@@ -97,7 +97,7 @@ L$123 to join
height="23"
label="View Profile"
name="view_profile_btn"
top="125"
top="156"
left="117"
width="103"
commit_callback.function="InspectGroup.ViewProfile" />
@@ -176,57 +176,60 @@
<on_click function="Group.DoToSelected" parameter="leave_group"/>
<on_enable function="Avatar.EnableItem" parameter="can_leave_group" />
</menu_item_call>
<menu_item_separator layout="topleft" name="Moderator Options Separator"/>
<context_menu
label="Moderator Options"
layout="topleft"
name="Moderator Options">
<menu_item_check
label="Allow text chat"
layout="topleft"
name="AllowTextChat">
<on_check function="Avatar.CheckItem" parameter="is_allowed_text_chat" />
<on_click function="Avatar.DoToSelected" parameter="toggle_allow_text_chat" />
<on_enable function="Avatar.EnableItem" parameter="can_allow_text_chat" />
</menu_item_check>
<menu_item_separator layout="topleft" name="moderate_voice_separator" />
<menu_item_call
label="Mute this participant"
layout="topleft"
name="ModerateVoiceMuteSelected">
<on_click function="Avatar.DoToSelected" parameter="selected" />
<on_enable function="Avatar.EnableItem" parameter="can_mute" />
<on_visible function="Avatar.VisibleItem" parameter="show_mute" />
</menu_item_call>
<menu_item_separator layout="topleft" name="Moderator Options Separator"/>
<context_menu
label="Moderator Options"
layout="topleft"
name="Moderator Options">
<menu_item_check
label="Allow text chat"
layout="topleft"
name="AllowTextChat">
<on_check function="Avatar.CheckItem" parameter="is_allowed_text_chat" />
<on_click function="Avatar.DoToSelected" parameter="toggle_allow_text_chat" />
<on_enable function="Avatar.EnableItem" parameter="can_allow_text_chat" />
<on_visible function="Avatar.VisibleItem" parameter="can_allow_text_chat" />
</menu_item_check>
<menu_item_separator layout="topleft" name="moderate_voice_separator">
<on_visible function="Avatar.VisibleItem" parameter="can_allow_text_chat" />
</menu_item_separator>
<menu_item_call
label="Mute this participant"
layout="topleft"
name="ModerateVoiceMuteSelected">
<on_click function="Avatar.DoToSelected" parameter="selected" />
<on_enable function="Avatar.EnableItem" parameter="can_mute" />
<on_visible function="Avatar.VisibleItem" parameter="show_mute" />
</menu_item_call>
<menu_item_call
label="Unmute this participant"
layout="topleft"
name="ModerateVoiceUnMuteSelected">
<on_click function="Avatar.DoToSelected" parameter="selected" />
<on_enable function="Avatar.EnableItem" parameter="can_unmute" />
<on_visible function="Avatar.VisibleItem" parameter="show_unmute" />
</menu_item_call>
<menu_item_call
label="Mute everyone"
layout="topleft"
name="ModerateVoiceMute">
<on_click function="Avatar.DoToSelected" parameter="mute_all" />
<on_enable function="Avatar.EnableItem" parameter="can_moderate_voice" />
</menu_item_call>
<menu_item_call
label="Unmute everyone"
layout="topleft"
name="ModerateVoiceUnmute">
<on_click function="Avatar.DoToSelected" parameter="unmute_all" />
<on_enable function="Avatar.EnableItem" parameter="can_moderate_voice" />
</menu_item_call>
</context_menu>
<menu_item_separator layout="topleft" name="Group Ban Separator"/>
<menu_item_call
label="Unmute this participant"
layout="topleft"
name="ModerateVoiceUnMuteSelected">
<on_click function="Avatar.DoToSelected" parameter="selected" />
<on_enable function="Avatar.EnableItem" parameter="can_unmute" />
<on_visible function="Avatar.VisibleItem" parameter="show_unmute" />
</menu_item_call>
<menu_item_call
label="Mute everyone"
layout="topleft"
name="ModerateVoiceMute">
<on_click function="Avatar.DoToSelected" parameter="mute_all" />
<on_enable function="Avatar.EnableItem" parameter="can_moderate_voice" />
</menu_item_call>
<menu_item_call
label="Unmute everyone"
layout="topleft"
name="ModerateVoiceUnmute">
<on_click function="Avatar.DoToSelected" parameter="unmute_all" />
<on_enable function="Avatar.EnableItem" parameter="can_moderate_voice" />
</menu_item_call>
</context_menu>
<menu_item_separator layout="topleft" name="Group Ban Separator"/>
<menu_item_call
label="Ban member"
layout="topleft"
name="BanMember">
<on_click function="Avatar.DoToSelected" parameter="ban_member" />
<on_enable function="Avatar.EnableItem" parameter="can_ban_member" />
</menu_item_call>
label="Ban member"
layout="topleft"
name="BanMember">
<on_click function="Avatar.DoToSelected" parameter="ban_member" />
<on_enable function="Avatar.EnableItem" parameter="can_ban_member" />
</menu_item_call>
</toggleable_menu>
@@ -9884,6 +9884,23 @@ Your voice has been muted by a moderator.
yestext="OK"/>
</notification>
<notification
icon="notifytip.tga"
name="NearbyVoiceMutedByModerator"
type="notifytip">
The moderator has muted your voice chat.
People in this location will not hear you if you speak.
<tag>voice</tag>
</notification>
<notification
icon="notifytip.tga"
name="NearbyVoiceUnmutedByModerator"
type="notifytip">
Your voice chat can now be heard by people in this location.
<tag>voice</tag>
</notification>
<notification
icon="alertmodal.tga"
name="FailedToGetBenefits"
@@ -65,7 +65,7 @@
left_pad="5"
name="item_name"
parse_urls="false"
top="6"
top="4"
use_ellipses="true"
width="345" />
</panel>
@@ -78,7 +78,7 @@
left="5"
name="conversation_title"
parse_urls="false"
top="6"
top="4"
use_ellipses="true"
value="(loading)"
width="35" />
@@ -86,6 +86,7 @@
auto_update="true"
follows="top|right"
draw_border="false"
top="6"
height="16"
layout="topleft"
left_pad="5"
@@ -15,7 +15,7 @@
<string name="height_value_label_color" translate="false">White</string>
<text
follows="top|left|right"
font="SansSerifSmallBold"
font="SansSerifSmall"
halign="right"
height="12"
layout="topleft"
@@ -36,7 +36,7 @@
layout="topleft"
left="10"
name="accordion_panel"
top_pad="0"
top_pad="5"
width="313">
<accordion
layout="topleft"
@@ -47,12 +47,14 @@
<text
name="lbl name part"
left="0"
top_pad="1"
follows="top|left|right"
right="-1">
Enter part of the name:
</text>
<line_editor
left="0"
top_pad="9"
follows="left|top|right"
name="edit"
height="18"
@@ -121,7 +123,7 @@
draw_heading="true"
left="0"
right="-1"
height="239"
height="236"
top_pad="4"
follows="all"
column_padding="5"
@@ -7,7 +7,7 @@
top="0"
left="0"
height="768"
width="247">
width="257">
<check_box
follows="left|top"
layout="topleft"
@@ -20,7 +20,7 @@
<panel
border="true"
follows="left|top"
width="246"
width="256"
height="196"
layout="topleft"
left="1"
@@ -175,7 +175,7 @@
<panel
border="true"
follows="left|top"
width="246"
width="256"
height="175"
layout="topleft"
left="1"
@@ -252,7 +252,7 @@
layout="topleft"
left_delta="0"
top_pad="5"
width="96"
width="102"
name="roughness_factor_lbl">
Roughness Factor
</text>
@@ -273,7 +273,7 @@
<panel
border="true"
follows="left|top"
width="246"
width="256"
height="175"
layout="topleft"
left="1"
@@ -342,7 +342,7 @@
<panel
border="true"
follows="left|top"
width="246"
width="256"
height="175"
layout="topleft"
left="1"
@@ -44,7 +44,7 @@
layout="topleft"
left_pad="5"
name="group_name"
top="6"
top="4"
use_ellipses="true"
value="Unknown"
width="242" />
@@ -108,15 +108,17 @@
image_unselected="PushButton_Login"
image_pressed="PushButton_Login_Pressed"
image_hover_unselected="PushButton_Login_Over"
label="Log In"
label="Log in"
label_color="White"
font="SansSerifMedium"
font.style="BOLD"
name="connect_btn"
enabled="true"
width="120"
height="32"
left_pad="15"
bottom_delta="0" />
bottom_delta="0"
pad_bottom="1" />
<text
follows="left|top"
font="SansSerifLarge"
@@ -164,7 +166,9 @@
label="Select grid"
layout="topleft"
name="server_combo"
width="149" />
width="149" >
<combo_box.drop_down_button pad_right="21" />
</combo_box>
<text
follows="left|top"
font="SansSerifMedium"
@@ -149,7 +149,8 @@
left_pad="15"
width="120"
height="32"
top="0" />
top="0"
pad_bottom="1" />
<text
follows="left|top"
font="SansSerifLarge"
@@ -63,7 +63,8 @@
use_ellipses="true" word_wrap="false" mouse_opaque="false" name="sender_or_fee_box" visible="false">
Sender: "Resident R e s i d e n t R e s i d e n t"
</text>
<text allow_scroll="false" font="SansSerifSmall" top="0" right="-5" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5"
<!-- Old DejaVu font is used to avoid overlapping with sender name -->
<text allow_scroll="false" font="DejaVu" font.size="LSmall" top="0" right="-5" width="100" height="13" follows="right" halign="right" layout="topleft" left_pad="5"
name="notification_time" value="2014/12/24 23:30" />
</panel>
</panel>
@@ -105,7 +106,8 @@
use_ellipses="true" word_wrap="false" mouse_opaque="false" name="sender_or_fee_box_exp" visible="false">
Sender: "Resident R e s i d e n t R e s i d e n t"
</text>
<text allow_scroll="false" font="SansSerifSmall" top="0" right="-1" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5"
<!-- Old DejaVu font is used to avoid overlapping with sender name -->
<text allow_scroll="false" font="DejaVu" font.size="LSmall" top="0" right="-1" width="100" height="13" follows="right" halign="right" layout="topleft" left_pad="5"
name="notification_time_exp" value="2014/12/24 23:30" />
</panel>
<panel border="false" left="0" height="115" width="230" bevel_style="none" follows="all" layout="topleft" name="notification_text_panel_exp" visible="true">
@@ -205,6 +205,7 @@ Learn about [https://community.secondlife.com/knowledgebase/joining-and-particip
increment="1"
follows="left|top"
left="5"
top_pad="5"
min_val="0"
max_val="4096"
label="Range:"
@@ -221,13 +222,13 @@ Learn about [https://community.secondlife.com/knowledgebase/joining-and-particip
<layout_stack
clip="false"
follows="all"
height="410"
height="406"
layout="topleft"
left="0"
mouse_opaque="false"
orientation="vertical"
right="-1"
top_pad="0">
top_pad="3">
<layout_panel
height="142"
layout="topleft"
@@ -91,7 +91,7 @@
layout="topleft"
left_pad="40"
name="fastest_lbl"
width="40">
width="42">
Fastest
</text>
<radio_group
@@ -240,7 +240,7 @@
left_pad="10"
top_delta="1"
name="farther_lbl"
width="40">
width="45">
Farther
</text>
<text
@@ -284,7 +284,7 @@
top_delta="0"
left="160"
name="enhancements_desc"
width="350">
width="375">
Shadows significantly improve visual quality but can reduce speed.
</text>
<text
@@ -307,7 +307,8 @@
left_delta="150"
top_delta="0"
name="ShadowDetail"
width="150">
width="153">
<combo_box.drop_down_button pad_right="20" />
<combo_box.item
label="None"
name="0"
@@ -417,7 +418,7 @@
top_delta="3"
left_pad="10"
name="photo_dist_det_desc"
width="180">
width="192">
(Enter value between 0.0 and 4.0)
</text>
<text
@@ -426,7 +427,7 @@
height="18"
layout="topleft"
top="80"
left="213"
left="215"
name="0_lbl"
width="7">
0
@@ -446,7 +447,7 @@
font="SansSerifSmall"
height="18"
layout="topleft"
left_pad="30"
left_pad="29"
name="2_lbl"
width="7">
2
@@ -468,7 +469,7 @@
layout="topleft"
left_pad="30"
name="4_lbl"
width="7">
width="8">
4
</text>
<text
@@ -476,7 +477,7 @@
font="SansSerifSmall"
height="18"
layout="topleft"
left_pad="30"
left_pad="29"
name="5_lbl"
width="7">
5
@@ -13,7 +13,6 @@
<panel.string
name="trusted_estate_text">
Any Experience may be Key.
Key Experiences have permission to run on this estate.
Additionally, if the estate does not allow public access, Residents participating in any Key Experience may enter the estate and can remain as long as they are in a Key Experience.
@@ -42,7 +42,7 @@
max_val="100"
name="water_height_spin"
top="40"
width="180" />
width="190" />
<spinner
follows="left|top"
height="20"
@@ -54,7 +54,7 @@
max_val="100"
name="terrain_raise_spin"
top="40"
width="180" />
width="190" />
<spinner
follows="left|top"
height="20"
@@ -67,7 +67,7 @@
min_val="-100"
name="terrain_lower_spin"
top="60"
width="180" />
width="190" />
<view_border
bevel_style="none"
follows="top|left"
@@ -330,7 +330,7 @@
follows="left|top"
height="20"
layout="topleft"
left_pad="10"
left_pad="15"
name="height_text_lbl7"
top_delta="0"
width="100">
@@ -349,7 +349,7 @@
min_val="-500"
name="height_start_spin_1"
top_delta="15"
width="100" />
width="105" />
<!-- northeast low-->
<spinner
follows="left|top"
@@ -363,7 +363,7 @@
min_val="-500"
name="height_start_spin_3"
top_delta="0"
width="100" />
width="105" />
<!-- northwest high-->
<spinner
follows="left|top"
@@ -377,7 +377,7 @@
min_val="-500"
name="height_range_spin_1"
top_delta="20"
width="100" />
width="105" />
<!-- northeast high-->
<spinner
follows="left|top"
@@ -391,7 +391,7 @@
min_val="-500"
name="height_range_spin_3"
top_delta="0"
width="100" />
width="105" />
<text
follows="left|top"
height="20"
@@ -406,7 +406,7 @@
follows="left|top"
height="20"
layout="topleft"
left_pad="10"
left_pad="15"
name="height_text_lbl9"
top_delta="0"
width="100">
@@ -425,7 +425,7 @@
min_val="-500"
name="height_start_spin_0"
top_delta="15"
width="100" />
width="105" />
<!-- southeast low-->
<spinner
follows="left|top"
@@ -439,7 +439,7 @@
min_val="-500"
name="height_start_spin_2"
top_delta="0"
width="100" />
width="105" />
<!--southwest high-->
<spinner
follows="left|top"
@@ -453,7 +453,7 @@
min_val="-500"
name="height_range_spin_0"
top_delta="20"
width="100" />
width="105" />
<!-- southeast high-->
<spinner
follows="left|top"
@@ -467,7 +467,7 @@
min_val="-500"
name="height_range_spin_2"
top_delta="0"
width="100" />
width="105" />
<!-- Terrain Download/Upload/Bake buttons -->
<button
follows="left|top"
@@ -37,7 +37,9 @@
name="color label"
text_readonly_color="LabelDisabledColor"
top="6"
width="64">
width="64"
font="DejaVu"
font.size="LSmall" >
Color
</text>
<!-- label is blank because control places it below the box -->
@@ -63,7 +65,9 @@
name="color trans"
text_readonly_color="LabelDisabledColor"
top="6"
width="110">
width="110"
font="DejaVu"
font.size="LSmall" >
Transparency %
</text>
<spinner
@@ -77,7 +81,9 @@
max_val="100"
name="ColorTrans"
top_pad="4"
width="80" />
width="80"
font="DejaVu"
font.size="LSmall" />
<text
type="string"
length="1"
@@ -88,7 +94,9 @@
name="glow label"
text_readonly_color="LabelDisabledColor"
top="6"
width="80">
width="80"
font="DejaVu"
font.size="LSmall" >
Glow
</text>
<spinner
@@ -100,7 +108,9 @@
left_delta="0"
name="glow"
top_pad="4"
width="70" />
width="70"
font="DejaVu"
font.size="LSmall" />
<check_box
height="19"
label="Full bright"
@@ -108,7 +118,9 @@
left="7"
name="checkbox fullbright"
top_pad="4"
width="81" />
width="81"
font="DejaVu"
font.size="LSmall" />
<check_box
height="17"
label="Hide water"
@@ -116,7 +128,9 @@
left="7"
name="checkbox_hide_water"
top_pad="0"
width="81" />
width="81"
font="DejaVu"
font.size="LSmall" />
<button
follows="top|right"
height="23"
@@ -154,7 +168,9 @@
left="12"
top_pad="8"
name="label_matmedia"
width="90">
width="90"
font="DejaVu"
font.size="LSmall" >
Material
</text>
-->
@@ -164,7 +180,9 @@
left="10"
name="combobox matmedia"
top="80"
width="100">
width="100"
drop_down_button.font="DejaVu"
drop_down_button.font.size="LSmall" >
<combo_box.item
label="Textures"
name="Materials"
@@ -185,7 +203,9 @@
top_delta="-30"
width="150"
visible = "false"
name="radio_material_type">
name="radio_material_type"
font="DejaVu"
font.size="LSmall" >
<radio_item
label="Texture (diffuse)"
name="Texture (diffuse)"
@@ -215,7 +235,9 @@
top_delta="0"
width="150"
visible = "false"
name="radio_pbr_type">
name="radio_pbr_type"
font="DejaVu"
font.size="LSmall" >
<radio_item
label="Complete material"
name="Complete material"
@@ -264,7 +286,9 @@
name="checkbox_sync_settings"
tool_tip="Adjust all maps repeats simultaneously"
top_pad="-16"
width="160" />
width="160"
font="DejaVu"
font.size="LSmall" />
-->
<texture_picker
can_apply_immediately="true"
@@ -277,7 +301,9 @@
name="pbr_control"
tool_tip="Click to choose a pbr material"
top_pad="-29"
width="64" />
width="64"
caption_text.font="DejaVu"
caption_text.font.size="LSmall" />
<!-- <FS:Zi> We don't need this button, clicking the texture picker does the same thing
<button
@@ -288,7 +314,9 @@
top_delta="0"
name="pbr_from_inventory"
label="Choose from inventory"
width="140"/>
width="140"
font="DejaVu"
font.size="LSmall" />
-->
<text
visible="false"
@@ -301,7 +329,9 @@
left_pad="10"
name="material_permissions_loading_label"
text_readonly_color="LabelDisabledColor"
width="160">
width="160"
font="DejaVu"
font.size="LSmall" >
Loading contents...
</text>
<button
@@ -312,7 +342,9 @@
top_delta="0"
name="edit_selected_pbr"
label="Edit"
width="100"/>
width="100"
font="DejaVu"
font.size="LSmall" />
<button
follows="left|top"
height="23"
@@ -321,7 +353,9 @@
left_pad="4"
name="save_selected_pbr"
label="Save"
width="100"/>
width="100"
font="DejaVu"
font.size="LSmall" />
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
@@ -334,7 +368,9 @@
name="texture control"
tool_tip="Click to choose a picture"
top_delta="-40"
width="64" />
width="64"
caption_text.font="DejaVu"
caption_text.font.size="LSmall" />
<text
type="string"
length="1"
@@ -345,7 +381,9 @@
name="label alphamode"
text_readonly_color="LabelDisabledColor"
top_delta="0"
width="90">
width="90"
font="DejaVu"
font.size="LSmall" >
Alpha mode
</text>
<combo_box
@@ -354,7 +392,9 @@
left_delta="0"
name="combobox alphamode"
top_pad="4"
width="120">
width="120"
drop_down_button.font="DejaVu"
drop_down_button.font.size="LSmall">
<combo_box.item
label="None"
name="None"
@@ -382,7 +422,9 @@
name="label maskcutoff"
text_readonly_color="LabelDisabledColor"
top_pad="4"
width="150">
width="150"
font="DejaVu"
font.size="LSmall" >
Mask cutoff
</text>
<spinner
@@ -397,7 +439,9 @@
left_delta="0"
increment="1"
name="maskcutoff"
width="80" />
width="80"
font="DejaVu"
font.size="LSmall" />
<texture_picker
allow_no_texture="true"
can_apply_immediately="true"
@@ -411,7 +455,9 @@
name="bumpytexture control"
tool_tip="Click to choose a picture"
top_delta="-55"
width="64" />
width="64"
caption_text.font="DejaVu"
caption_text.font.size="LSmall" />
<text
type="string"
length="1"
@@ -422,7 +468,9 @@
name="label bumpiness"
text_readonly_color="LabelDisabledColor"
top_delta="0"
width="90">
width="90"
font="DejaVu"
font.size="LSmall" >
Bumpiness
</text>
<combo_box
@@ -431,7 +479,9 @@
left_delta="0"
name="combobox bumpiness"
top_pad="4"
width="150">
width="150"
drop_down_button.font="DejaVu"
drop_down_button.font.size="LSmall" >
<combo_box.item
label="None"
name="None"
@@ -525,7 +575,9 @@
name="shinytexture control"
tool_tip="Click to choose a picture"
top_delta="-14"
width="64" />
width="64"
caption_text.font="DejaVu"
caption_text.font.size="LSmall" />
<text
type="string"
length="1"
@@ -536,7 +588,9 @@
left_pad="30"
text_readonly_color="LabelDisabledColor"
top_delta="6"
width="70">
width="70"
font="DejaVu"
font.size="LSmall" >
Shininess
</text>
<combo_box
@@ -545,7 +599,9 @@
left_pad="10"
name="combobox shininess"
top_delta="-6"
width="90">
width="90"
drop_down_button.font="DejaVu"
drop_down_button.font.size="LSmall" >
<combo_box.item
label="None"
name="None"
@@ -580,7 +636,9 @@
name="label glossiness"
text_readonly_color="LabelDisabledColor"
top_pad="8"
width="76">
width="76"
font="DejaVu"
font.size="LSmall" >
Glossiness
</text>
<spinner
@@ -595,7 +653,9 @@
top_delta="-4"
left_pad="30"
name="glossiness"
width="64" />
width="64"
font="DejaVu"
font.size="LSmall" />
<text
type="string"
length="1"
@@ -606,7 +666,9 @@
name="label environment"
text_readonly_color="LabelDisabledColor"
top_pad="8"
width="96">
width="96"
font="DejaVu"
font.size="LSmall" >
Environment
</text>
<spinner
@@ -621,7 +683,9 @@
top_delta="-4"
left_pad="10"
name="environment"
width="64" />
width="64"
font="DejaVu"
font.size="LSmall" />
<text
type="string"
length="1"
@@ -632,7 +696,9 @@
name="label shinycolor"
text_readonly_color="LabelDisabledColor"
top_pad="8"
width="96">
width="96"
font="DejaVu"
font.size="LSmall" >
Color
</text>
<!-- label is blank because control places it below the box -->
@@ -656,7 +722,9 @@
use_ellipses="true"
read_only="true"
name="media_info"
width="280">
width="280"
font="DejaVu"
font.size="LSmall" >
URL of chosen media, if any, goes here
</text>
<button
@@ -668,7 +736,9 @@
top_pad="4"
tool_tip="Add Media"
label="Choose..."
width="85"/>
width="85"
font="DejaVu"
font.size="LSmall" />
<button
follows="top|left"
height="18"
@@ -678,7 +748,9 @@
tool_tip="Delete this media texture"
top_delta="0"
label="Remove"
width="85"/>
width="85"
font="DejaVu"
font.size="LSmall" />
<button
follows="left|top"
height="18"
@@ -689,7 +761,9 @@
name="button align"
top_delta="0"
tool_tip="Align media texture (must load first)"
width="85" />
width="85"
font="DejaVu"
font.size="LSmall" />
<text
type="string"
length="1"
@@ -700,7 +774,9 @@
name="tex gen"
text_readonly_color="LabelDisabledColor"
top_pad="49"
width="140">
width="140"
font="DejaVu"
font.size="LSmall" >
Mapping
</text>
<combo_box
@@ -709,7 +785,9 @@
left_pad="0"
name="combobox texgen"
top_pad="-13"
width="125">
width="125"
drop_down_button.font="DejaVu"
drop_down_button.font.size="LSmall" >
<combo_box.item
label="Default"
name="Default"
@@ -732,7 +810,9 @@
decimal_digits="5"
name="TexScaleU"
top_pad="5"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<button
follows="top|left"
height="18"
@@ -762,7 +842,9 @@
max_val="10000"
decimal_digits="5"
name="TexScaleV"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<button
follows="top|left"
height="18"
@@ -792,7 +874,9 @@
max_val="100"
min_val="-100"
name="rptctrl"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<spinner
decimal_digits="2"
follows="left|top"
@@ -806,7 +890,9 @@
max_val="360"
min_val="-360"
name="TexRot"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<spinner
follows="left|top"
height="19"
@@ -819,7 +905,9 @@
max_val="1"
decimal_digits="5"
name="TexOffsetU"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<spinner
follows="left|top"
height="19"
@@ -832,7 +920,9 @@
max_val="1"
decimal_digits="5"
name="TexOffsetV"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<spinner
follows="left|top"
height="19"
@@ -846,7 +936,9 @@
decimal_digits="5"
name="bumpyScaleU"
top_delta="-115"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<spinner
follows="left|top"
height="19"
@@ -859,7 +951,9 @@
max_val="10000"
decimal_digits="5"
name="bumpyScaleV"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<spinner
decimal_digits="2"
follows="left|top"
@@ -874,7 +968,9 @@
max_val="360"
min_val="-360"
name="bumpyRot"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<spinner
follows="left|top"
height="19"
@@ -887,7 +983,9 @@
max_val="1"
decimal_digits="5"
name="bumpyOffsetU"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<spinner
follows="left|top"
height="19"
@@ -900,7 +998,9 @@
max_val="1"
decimal_digits="5"
name="bumpyOffsetV"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<spinner
follows="left|top"
height="19"
@@ -914,7 +1014,9 @@
decimal_digits="5"
name="shinyScaleU"
top_delta="-115"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<spinner
follows="left|top"
height="19"
@@ -927,7 +1029,9 @@
max_val="10000"
decimal_digits="5"
name="shinyScaleV"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<spinner
decimal_digits="2"
follows="left|top"
@@ -942,7 +1046,9 @@
max_val="360"
min_val="-360"
name="shinyRot"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<spinner
follows="left|top"
height="19"
@@ -955,7 +1061,9 @@
max_val="1"
decimal_digits="5"
name="shinyOffsetU"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<spinner
follows="left|top"
height="19"
@@ -968,7 +1076,9 @@
max_val="1"
decimal_digits="5"
name="shinyOffsetV"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<!-- BEGIN PBR Material texture transform parameters -->
<spinner
follows="left|top"
@@ -982,7 +1092,9 @@
max_val="10000"
name="gltfTextureScaleU"
top_delta="-115"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<spinner
follows="left|top"
height="19"
@@ -994,7 +1106,9 @@
min_val="-10000"
max_val="10000"
name="gltfTextureScaleV"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<spinner
decimal_digits="1"
follows="left|top"
@@ -1007,7 +1121,9 @@
max_val="100"
min_val="-100"
name="gltfRptctrl"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<spinner
follows="left|top"
height="19"
@@ -1019,7 +1135,9 @@
min_val="-360"
max_val="360"
name="gltfTextureRotation"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<spinner
follows="left|top"
height="19"
@@ -1031,7 +1149,9 @@
min_val="-999"
max_val="999"
name="gltfTextureOffsetU"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<spinner
follows="left|top"
height="19"
@@ -1043,7 +1163,9 @@
min_val="-999"
max_val="999"
name="gltfTextureOffsetV"
width="265" />
width="265"
font="DejaVu"
font.size="LSmall" />
<!-- END PBR Material texture transform parameters -->
<check_box
follows="top|left"
@@ -1055,7 +1177,9 @@
name="checkbox planar align"
tool_tip="Align textures on all selected faces with the last selected face. Requires Planar texture mapping."
top_pad="2"
width="203" />
width="203"
font="DejaVu"
font.size="LSmall" />
<!-- FS:Beq use Linden Lab control_name with FS control definition (also removes the typo in "syncronize" yay )-->
<check_box
control_name="SyncMaterialSettings"
@@ -1067,7 +1191,9 @@
top_pad="0"
name="checkbox_sync_settings"
tool_tip="Synchronize texture map parameters"
width="199" />
width="199"
font="DejaVu"
font.size="LSmall" />
<button
layout="topleft"
follows="right|top"
@@ -1077,7 +1203,9 @@
label="Align"
name="button align textures"
tool_tip="Align current texture layers"
width="84" />
width="84"
font="DejaVu"
font.size="LSmall" />
<web_browser
visible="false"
enabled="false"
@@ -1101,7 +1229,9 @@
label="Find All"
name="btn_select_same_diff"
tool_tip="Select all faces with the same diffuse texture as this one"
width="90">
width="90"
font="DejaVu"
font.size="LSmall" >
<button.commit_callback
function="BuildTool.SelectSameTexture"
parameter="diffuse"/>
@@ -1115,7 +1245,9 @@
label="Find All"
name="btn_select_same_norm"
tool_tip="Select all faces with the same normal map as this one"
width="90">
width="90"
font="DejaVu"
font.size="LSmall" >
<button.commit_callback
function="BuildTool.SelectSameTexture"
parameter="normal"/>
@@ -1129,7 +1261,9 @@
label="Find All"
name="btn_select_same_spec"
tool_tip="Select all faces with the same specular map as this one"
width="90">
width="90"
font="DejaVu"
font.size="LSmall" >
<button.commit_callback
function="BuildTool.SelectSameTexture"
parameter="specular"/>
@@ -22,9 +22,10 @@
font="SansSerifSmall"
hover_glow_amount="0.25"
halign="center"
pad_bottom="1"
pad_bottom="2"
height="23"
scale_image="true"
label_shadow="false"
handle_right_mouse="true"
use_draw_context_alpha="true"
held_down_delay.seconds="0.5"
@@ -9,7 +9,7 @@
left_pad="0"
icon_pad="10"
icon_width="20"
text_pad="7"
text_pad="5"
text_pad_right="4"
arrow_size="12"
max_folder_item_overlap="2"
@@ -9,7 +9,9 @@
bg_alpha_image="Window_Background"
background_visible="true"
background_opaque="false"
header_font="SansSerif"
header_height="25"
header_vpad="5"
close_image="Icon_Close_Foreground"
snooze_image="Icon_Snooze_Foreground"
restore_image="Icon_Restore_Foreground"

Some files were not shown because too many files have changed in this diff Show More