Merge branch 'develop' of https://github.com/secondlife/viewer
# Conflicts: # autobuild.xml # indra/cmake/Audio.cmake # indra/llui/llconsole.cpp # indra/newview/app_settings/settings.xml # indra/newview/llfloaterimnearbychathandler.cpp # indra/newview/llfloaterscriptedprefs.cpp # indra/newview/llhudnametag.cpp # indra/newview/llhudtext.cpp # indra/newview/llpanelpermissions.cpp # indra/newview/llscripteditor.cpp # indra/newview/lltexturefetch.cpp # indra/newview/lltextureview.cpp # indra/newview/llviewerchat.cpp # indra/newview/llviewerchat.h # indra/newview/llviewermenu.cpp # indra/newview/llviewerobjectlist.cpp # indra/newview/llviewerparceloverlay.cpp # indra/newview/llviewerparceloverlay.h # indra/newview/llviewerwindow.cpp # indra/newview/llvoavatar.cpp # indra/newview/llvosurfacepatch.cppmaster
commit
80f9aaa46e
|
|
@ -2232,11 +2232,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>ad0dd0f608b868cc44c225ee48e114239fca2807</string>
|
||||
<string>1e694e5562b8d844bc44d5f7ae4dce243ee70d23</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>sha1</string>
|
||||
<key>url</key>
|
||||
<string>https://github.com/secondlife/3p-ogg_vorbis/releases/download/v1.3.3-1.3.6.e4101b6/ogg_vorbis-1.3.3-1.3.6.e4101b6-darwin64-e4101b6.tar.zst</string>
|
||||
<string>https://github.com/secondlife/3p-ogg_vorbis/releases/download/v1.3.5-1.3.7/ogg_vorbis-1.3.5-1.3.7.10218872737-darwin64-10218872737.tar.zst</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin64</string>
|
||||
|
|
@ -2246,11 +2246,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>90052be851c4fcecc35d8424b4f31352de14ab2f</string>
|
||||
<string>ce0c6adb6d684eb2f4b2ad8838c67186c59e151a</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>sha1</string>
|
||||
<key>url</key>
|
||||
<string>https://github.com/secondlife/3p-ogg_vorbis/releases/download/v1.3.3-1.3.6-881f65e/ogg_vorbis-1.3.3-1.3.6.881f65e-linux64-881f65e.tar.zst</string>
|
||||
<string>https://github.com/secondlife/3p-ogg_vorbis/releases/download/v1.3.5-1.3.7/ogg_vorbis-1.3.5-1.3.7.10218872737-linux64-10218872737.tar.zst</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>linux64</string>
|
||||
|
|
@ -2260,11 +2260,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>2e73a0a5659c9a09eba2f94619aa5c23c7cc3937</string>
|
||||
<string>9434b592c5d748c5deb64ad548fd1484638e3172</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>sha1</string>
|
||||
<key>url</key>
|
||||
<string>https://github.com/secondlife/3p-ogg_vorbis/releases/download/v1.3.3-1.3.6.e4101b6/ogg_vorbis-1.3.3-1.3.6.e4101b6-windows64-e4101b6.tar.zst</string>
|
||||
<string>https://github.com/secondlife/3p-ogg_vorbis/releases/download/v1.3.5-1.3.7/ogg_vorbis-1.3.5-1.3.7.10218872737-windows64-10218872737.tar.zst</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows64</string>
|
||||
|
|
@ -2277,7 +2277,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>copyright</key>
|
||||
<string>Copyright (c) 2002, Xiph.org Foundation</string>
|
||||
<key>version</key>
|
||||
<string>1.3.3-1.3.6.e4101b6</string>
|
||||
<string>1.3.5-1.3.7.10218872737</string>
|
||||
<key>name</key>
|
||||
<string>ogg_vorbis</string>
|
||||
<key>description</key>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
# -*- cmake -*-
|
||||
include(Linking)
|
||||
include(Prebuilt)
|
||||
|
||||
include_guard()
|
||||
|
|
@ -9,9 +10,23 @@ use_prebuilt_binary(ogg_vorbis)
|
|||
target_include_directories( ll::vorbis SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include )
|
||||
|
||||
if (WINDOWS)
|
||||
target_link_libraries(ll::vorbis INTERFACE ogg_static vorbis_static vorbisenc_static vorbisfile_static )
|
||||
target_link_libraries(ll::vorbis INTERFACE
|
||||
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libogg.lib
|
||||
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libogg.lib
|
||||
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisenc.lib
|
||||
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libvorbisenc.lib
|
||||
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisfile.lib
|
||||
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libvorbisfile.lib
|
||||
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbis.lib
|
||||
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libvorbis.lib
|
||||
)
|
||||
else (WINDOWS)
|
||||
# <FS:Zi> These must be in this order, or it won't link: vorbisenc vorbisfile vorbis ogg
|
||||
target_link_libraries(ll::vorbis INTERFACE vorbisenc vorbisfile vorbis ogg)
|
||||
target_link_libraries(ll::vorbis INTERFACE
|
||||
# <FS:Zi> These must be in this order, or it won't link: vorbisenc vorbisfile vorbis ogg
|
||||
${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisenc.a
|
||||
${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisfile.a
|
||||
${ARCH_PREBUILT_DIRS_RELEASE}/libvorbis.a
|
||||
${ARCH_PREBUILT_DIRS_RELEASE}/libogg.a
|
||||
)
|
||||
endif (WINDOWS)
|
||||
|
||||
|
|
|
|||
|
|
@ -1202,12 +1202,12 @@ void LLButton::setImageSelected(LLPointer<LLUIImage> image)
|
|||
mImageSelected = image;
|
||||
}
|
||||
|
||||
void LLButton::setImageColor(const LLColor4& c)
|
||||
void LLButton::setImageColor(const LLUIColor& c)
|
||||
{
|
||||
mImageColor = c;
|
||||
}
|
||||
|
||||
void LLButton::setColor(const LLColor4& color)
|
||||
void LLButton::setColor(const LLUIColor& color)
|
||||
{
|
||||
setImageColor(color);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,8 +176,8 @@ public:
|
|||
|
||||
virtual void onCommit();
|
||||
|
||||
void setUnselectedLabelColor( const LLColor4& c ) { mUnselectedLabelColor = c; }
|
||||
void setSelectedLabelColor( const LLColor4& c ) { mSelectedLabelColor = c; }
|
||||
void setUnselectedLabelColor( const LLUIColor& c ) { mUnselectedLabelColor = c; }
|
||||
void setSelectedLabelColor( const LLUIColor& c ) { mSelectedLabelColor = c; }
|
||||
void setUseEllipses( bool use_ellipses ) { mUseEllipses = use_ellipses; }
|
||||
void setUseFontColor( bool use_font_color) { mUseFontColor = use_font_color; }
|
||||
|
||||
|
|
@ -232,14 +232,14 @@ public:
|
|||
const std::string getLabelSelected() const { return wstring_to_utf8str(mSelectedLabel); }
|
||||
|
||||
void setImageColor(const std::string& color_control);
|
||||
void setImageColor(const LLColor4& c);
|
||||
/*virtual*/ void setColor(const LLColor4& c);
|
||||
void setImageColor(const LLUIColor& c);
|
||||
/*virtual*/ void setColor(const LLUIColor& c);
|
||||
|
||||
void setImages(const std::string &image_name, const std::string &selected_name);
|
||||
|
||||
void setDisabledImageColor(const LLColor4& c) { mDisabledImageColor = c; }
|
||||
void setDisabledImageColor(const LLUIColor& c) { mDisabledImageColor = c; }
|
||||
|
||||
void setDisabledSelectedLabelColor( const LLColor4& c ) { mDisabledSelectedLabelColor = c; }
|
||||
void setDisabledSelectedLabelColor( const LLUIColor& c ) { mDisabledSelectedLabelColor = c; }
|
||||
|
||||
void setImageOverlay(const std::string& image_name, LLFontGL::HAlign alignment = LLFontGL::HCENTER, const LLColor4& color = LLColor4::white);
|
||||
void setImageOverlay(const LLUUID& image_id, LLFontGL::HAlign alignment = LLFontGL::HCENTER, const LLColor4& color = LLColor4::white);
|
||||
|
|
@ -256,7 +256,7 @@ public:
|
|||
virtual bool setLabelArg( const std::string& key, const LLStringExplicit& text );
|
||||
void setLabelUnselected(const LLStringExplicit& label);
|
||||
void setLabelSelected(const LLStringExplicit& label);
|
||||
void setDisabledLabelColor( const LLColor4& c ) { mDisabledLabelColor = c; }
|
||||
void setDisabledLabelColor( const LLUIColor& c ) { mDisabledLabelColor = c; }
|
||||
|
||||
void setFont(const LLFontGL *font)
|
||||
{ mGLFont = ( font ? font : LLFontGL::getFontSansSerif()); }
|
||||
|
|
|
|||
|
|
@ -182,11 +182,11 @@ void LLCheckBoxCtrl::setEnabled(bool b)
|
|||
|
||||
if (b)
|
||||
{
|
||||
mLabel->setColor( mTextEnabledColor.get() );
|
||||
mLabel->setColor( mTextEnabledColor );
|
||||
}
|
||||
else
|
||||
{
|
||||
mLabel->setColor( mTextDisabledColor.get() );
|
||||
mLabel->setColor( mTextDisabledColor );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -114,8 +114,8 @@ public:
|
|||
|
||||
void setBtnFocus() { mButton->setFocus(true); }
|
||||
|
||||
void setEnabledColor( const LLColor4 &color ) { mTextEnabledColor = color; }
|
||||
void setDisabledColor( const LLColor4 &color ) { mTextDisabledColor = color; }
|
||||
void setEnabledColor( const LLUIColor&color ) { mTextEnabledColor = color; }
|
||||
void setDisabledColor( const LLUIColor&color ) { mTextDisabledColor = color; }
|
||||
|
||||
void setLabel( const LLStringExplicit& label );
|
||||
std::string getLabel() const;
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ void LLConsole::draw()
|
|||
//static LLCachedControl<F32> console_bg_opacity(*LLUI::getInstance()->mSettingGroups["config"], "ConsoleBackgroundOpacity", 0.7f);
|
||||
//F32 console_opacity = llclamp(console_bg_opacity(), 0.f, 1.f);
|
||||
|
||||
//static LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground");
|
||||
//static LLUIColor color = LLUIColorTable::instance().getColor("ConsoleBackground");
|
||||
//color.mV[VALPHA] *= console_opacity;
|
||||
|
||||
//F32 line_height = (F32)mFont->getLineHeight();
|
||||
|
|
|
|||
|
|
@ -853,7 +853,7 @@ void LLFolderViewItem::drawHighlight(const bool showContent, const bool hasKeybo
|
|||
const S32 FOCUS_LEFT = 1;
|
||||
|
||||
// Determine which background color to use for highlighting
|
||||
LLUIColor bgColor = (isFlashing() ? flashColor : selectColor);
|
||||
const LLUIColor& bgColor = (isFlashing() ? flashColor : selectColor);
|
||||
|
||||
//--------------------------------------------------------------------------------//
|
||||
// Draw highlight for selected items
|
||||
|
|
@ -1090,7 +1090,7 @@ void LLFolderViewItem::draw()
|
|||
//
|
||||
if (!mLabelSuffix.empty())
|
||||
{
|
||||
suffix_font->render( mLabelSuffix, 0, right_x, y, isFadeItem() ? color : (LLColor4)sSuffixColor,
|
||||
suffix_font->render( mLabelSuffix, 0, right_x, y, isFadeItem() ? color : sSuffixColor.get(),
|
||||
LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
|
||||
S32_MAX, S32_MAX, &right_x);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public:
|
|||
|
||||
std::string getImageName() const;
|
||||
|
||||
void setColor(const LLColor4& color) { mColor = color; }
|
||||
void setColor(const LLUIColor& color) { mColor = color; }
|
||||
void setImage(LLPointer<LLUIImage> image) { mImagep = image; }
|
||||
const LLPointer<LLUIImage> getImage() { return mImagep; }
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ LLKeywords::~LLKeywords()
|
|||
// Add the token as described
|
||||
void LLKeywords::addToken(LLKeywordToken::ETokenType type,
|
||||
const std::string& key_in,
|
||||
const LLColor4& color,
|
||||
const LLUIColor& color,
|
||||
const std::string& tool_tip_in,
|
||||
const std::string& delimiter_in)
|
||||
{
|
||||
|
|
@ -170,7 +170,7 @@ std::string LLKeywords::getAttribute(std::string_view key)
|
|||
return (it != mAttributes.end()) ? it->second : "";
|
||||
}
|
||||
|
||||
LLColor4 LLKeywords::getColorGroup(std::string_view key_in)
|
||||
LLUIColor LLKeywords::getColorGroup(std::string_view key_in)
|
||||
{
|
||||
std::string color_group = "ScriptText";
|
||||
if (key_in == "functions")
|
||||
|
|
@ -286,10 +286,10 @@ void LLKeywords::processTokens()
|
|||
|
||||
void LLKeywords::processTokensGroup(const LLSD& tokens, std::string_view group)
|
||||
{
|
||||
LLColor4 color;
|
||||
LLColor4 color_group;
|
||||
LLColor4 color_deprecated = getColorGroup("deprecated");
|
||||
LLColor4 color_god_mode = getColorGroup("god-mode");
|
||||
LLUIColor color;
|
||||
LLUIColor color_group;
|
||||
LLUIColor color_deprecated = getColorGroup("deprecated");
|
||||
LLUIColor color_god_mode = getColorGroup("god-mode");
|
||||
|
||||
LLKeywordToken::ETokenType token_type = LLKeywordToken::TT_UNKNOWN;
|
||||
// If a new token type is added here, it must also be added to the 'addToken' method
|
||||
|
|
@ -319,7 +319,7 @@ void LLKeywords::processTokensGroup(const LLSD& tokens, std::string_view group)
|
|||
}
|
||||
|
||||
color_group = getColorGroup(group);
|
||||
LL_DEBUGS("SyntaxLSL") << "Group: '" << group << "', using color: '" << color_group << "'" << LL_ENDL;
|
||||
LL_DEBUGS("SyntaxLSL") << "Group: '" << group << "', using color: '" << color_group.get() << "'" << LL_ENDL;
|
||||
|
||||
if (tokens.isMap())
|
||||
{
|
||||
|
|
@ -401,7 +401,7 @@ void LLKeywords::processTokensGroup(const LLSD& tokens, std::string_view group)
|
|||
}
|
||||
else if (tokens.isArray()) // Currently nothing should need this, but it's here for completeness
|
||||
{
|
||||
LL_INFOS("SyntaxLSL") << "Curious, shouldn't be an array here; adding all using color " << color << LL_ENDL;
|
||||
LL_INFOS("SyntaxLSL") << "Curious, shouldn't be an array here; adding all using color " << color.get() << LL_ENDL;
|
||||
for (S32 count = 0; count < tokens.size(); ++count)
|
||||
{
|
||||
addToken(token_type, tokens[count], color, "");
|
||||
|
|
@ -780,7 +780,7 @@ void LLKeywords::insertSegments(const LLWString& wtext, std::vector<LLTextSegmen
|
|||
insertSegment( seg_list, text_segment, text_len, style, editor);
|
||||
}
|
||||
|
||||
void LLKeywords::insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLColor4 &defaultColor, LLTextEditor& editor )
|
||||
void LLKeywords::insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLUIColor& defaultColor, LLTextEditor& editor )
|
||||
{
|
||||
LLTextSegmentPtr last = seg_list.back();
|
||||
S32 new_seg_end = new_segment->getEnd();
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ public:
|
|||
TT_TYPE // WORD
|
||||
} ETokenType;
|
||||
|
||||
LLKeywordToken( ETokenType type, const LLColor4& color, const LLWString& token, const LLWString& tool_tip, const LLWString& delimiter )
|
||||
LLKeywordToken( ETokenType type, const LLUIColor& color, const LLWString& token, const LLWString& tool_tip, const LLWString& delimiter )
|
||||
:
|
||||
mType( type ),
|
||||
mToken( token ),
|
||||
|
|
@ -91,7 +91,7 @@ public:
|
|||
bool isHead(const llwchar* s) const;
|
||||
bool isTail(const llwchar* s) const;
|
||||
const LLWString& getToken() const { return mToken; }
|
||||
const LLColor4& getColor() const { return mColor; }
|
||||
const LLUIColor& getColor() const { return mColor; }
|
||||
ETokenType getType() const { return mType; }
|
||||
const LLWString& getToolTip() const { return mToolTip; }
|
||||
const LLWString& getDelimiter() const { return mDelimiter; }
|
||||
|
|
@ -103,7 +103,7 @@ public:
|
|||
private:
|
||||
ETokenType mType;
|
||||
LLWString mToken;
|
||||
LLColor4 mColor;
|
||||
LLUIColor mColor;
|
||||
LLWString mToolTip;
|
||||
LLWString mDelimiter;
|
||||
};
|
||||
|
|
@ -115,7 +115,7 @@ public:
|
|||
~LLKeywords();
|
||||
|
||||
void clearLoaded() { mLoaded = false; }
|
||||
LLColor4 getColorGroup(std::string_view key_in);
|
||||
LLUIColor getColorGroup(std::string_view key_in);
|
||||
bool isLoaded() const { return mLoaded; }
|
||||
// <FS:Ansariel> Re-add support for Cinder's legacy file format
|
||||
bool loadFromLegacyFile(const std::string& filename);
|
||||
|
|
@ -130,7 +130,7 @@ public:
|
|||
// Add the token as described
|
||||
void addToken(LLKeywordToken::ETokenType type,
|
||||
const std::string& key,
|
||||
const LLColor4& color,
|
||||
const LLUIColor& color,
|
||||
const std::string& tool_tip = LLStringUtil::null,
|
||||
const std::string& delimiter = LLStringUtil::null);
|
||||
|
||||
|
|
@ -159,7 +159,7 @@ public:
|
|||
bool mOwner;
|
||||
|
||||
|
||||
LLColor4 mColor;
|
||||
LLUIColor mColor;
|
||||
};
|
||||
|
||||
typedef std::map<WStringMapIndex, LLKeywordToken*> word_token_map_t;
|
||||
|
|
@ -167,7 +167,7 @@ public:
|
|||
keyword_iterator_t begin() const { return mWordTokenMap.begin(); }
|
||||
keyword_iterator_t end() const { return mWordTokenMap.end(); }
|
||||
|
||||
typedef std::map<WStringMapIndex, LLColor4> group_color_map_t;
|
||||
typedef std::map<WStringMapIndex, LLUIColor> group_color_map_t;
|
||||
typedef group_color_map_t::const_iterator color_iterator_t;
|
||||
group_color_map_t mColorGroupMap;
|
||||
|
||||
|
|
@ -180,7 +180,7 @@ protected:
|
|||
void insertSegment(std::vector<LLTextSegmentPtr>& seg_list,
|
||||
LLTextSegmentPtr new_segment,
|
||||
S32 text_len,
|
||||
const LLColor4 &defaultColor,
|
||||
const LLUIColor &defaultColor,
|
||||
class LLTextEditor& editor);
|
||||
void insertSegments(const LLWString& wtext,
|
||||
std::vector<LLTextSegmentPtr>& seg_list,
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ public:
|
|||
void setText(const LLStringExplicit &new_text);
|
||||
|
||||
const std::string& getText() const override { return mText.getString(); }
|
||||
LLWString getWText() const { return mText.getWString(); }
|
||||
const LLWString& getWText() const { return mText.getWString(); }
|
||||
LLWString getConvertedText() const; // trimmed text with paragraphs converted to newlines
|
||||
|
||||
S32 getLength() const { return mText.length(); }
|
||||
|
|
@ -233,12 +233,12 @@ public:
|
|||
void setRevertOnEsc( bool b ) { mRevertOnEsc = b; }
|
||||
void setKeystrokeOnEsc(bool b) { mKeystrokeOnEsc = b; }
|
||||
|
||||
void setCursorColor(const LLColor4& c) { mCursorColor = c; }
|
||||
void setCursorColor(const LLUIColor& c) { mCursorColor = c; }
|
||||
const LLColor4& getCursorColor() const { return mCursorColor.get(); }
|
||||
|
||||
void setFgColor( const LLColor4& c ) { mFgColor = c; }
|
||||
void setReadOnlyFgColor( const LLColor4& c ) { mReadOnlyFgColor = c; }
|
||||
void setTentativeFgColor(const LLColor4& c) { mTentativeFgColor = c; }
|
||||
void setFgColor( const LLUIColor& c ) { mFgColor = c; }
|
||||
void setReadOnlyFgColor( const LLUIColor& c ) { mReadOnlyFgColor = c; }
|
||||
void setTentativeFgColor(const LLUIColor& c) { mTentativeFgColor = c; }
|
||||
|
||||
const LLColor4& getFgColor() const { return mFgColor.get(); }
|
||||
const LLColor4& getReadOnlyFgColor() const { return mReadOnlyFgColor.get(); }
|
||||
|
|
|
|||
|
|
@ -440,7 +440,7 @@ void LLMultiSliderCtrl::setEnabled(bool b)
|
|||
|
||||
if( mLabelBox )
|
||||
{
|
||||
mLabelBox->setColor( b ? mTextEnabledColor.get() : mTextDisabledColor.get() );
|
||||
mLabelBox->setColor( b ? mTextEnabledColor : mTextDisabledColor );
|
||||
}
|
||||
|
||||
mMultiSlider->setEnabled( b );
|
||||
|
|
@ -452,7 +452,7 @@ void LLMultiSliderCtrl::setEnabled(bool b)
|
|||
|
||||
if( mTextBox )
|
||||
{
|
||||
mTextBox->setColor( b ? mTextEnabledColor.get() : mTextDisabledColor.get() );
|
||||
mTextBox->setColor( b ? mTextEnabledColor : mTextDisabledColor );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -130,8 +130,8 @@ public:
|
|||
bool canAddSliders() { return mMultiSlider->canAddSliders(); }
|
||||
|
||||
void setLabel(const std::string& label) { if (mLabelBox) mLabelBox->setText(label); }
|
||||
void setLabelColor(const LLColor4& c) { mTextEnabledColor = c; }
|
||||
void setDisabledLabelColor(const LLColor4& c) { mTextDisabledColor = c; }
|
||||
void setLabelColor(const LLUIColor& c) { mTextEnabledColor = c; }
|
||||
void setDisabledLabelColor(const LLUIColor& c) { mTextDisabledColor = c; }
|
||||
|
||||
boost::signals2::connection setSliderMouseDownCallback( const commit_signal_t::slot_type& cb );
|
||||
boost::signals2::connection setSliderMouseUpCallback( const commit_signal_t::slot_type& cb );
|
||||
|
|
|
|||
|
|
@ -490,8 +490,8 @@ void LLPanel::initFromParams(const LLPanel::Params& p)
|
|||
|
||||
setBackgroundVisible(p.background_visible);
|
||||
setBackgroundOpaque(p.background_opaque);
|
||||
setBackgroundColor(p.bg_opaque_color().get());
|
||||
setTransparentColor(p.bg_alpha_color().get());
|
||||
setBackgroundColor(p.bg_opaque_color);
|
||||
setTransparentColor(p.bg_alpha_color);
|
||||
mBgOpaqueImage = p.bg_opaque_image();
|
||||
mBgAlphaImage = p.bg_alpha_image();
|
||||
mBgOpaqueImageOverlay = p.bg_opaque_image_overlay;
|
||||
|
|
@ -693,7 +693,7 @@ void LLPanel::childSetCommitCallback(std::string_view id, boost::function<void (
|
|||
}
|
||||
}
|
||||
|
||||
void LLPanel::childSetColor(std::string_view id, const LLColor4& color)
|
||||
void LLPanel::childSetColor(std::string_view id, const LLUIColor& color)
|
||||
{
|
||||
LLUICtrl* child = findChild<LLUICtrl>(id);
|
||||
if (child)
|
||||
|
|
|
|||
|
|
@ -134,16 +134,16 @@ public:
|
|||
bool hasBorder() const { return mBorder != NULL; }
|
||||
void setBorderVisible( bool b );
|
||||
|
||||
void setBackgroundColor( const LLColor4& color ) { mBgOpaqueColor = color; }
|
||||
void setBackgroundColor( const LLUIColor& color ) { mBgOpaqueColor = color; }
|
||||
const LLColor4& getBackgroundColor() const { return mBgOpaqueColor; }
|
||||
void setTransparentColor(const LLColor4& color) { mBgAlphaColor = color; }
|
||||
void setTransparentColor(const LLUIColor& color) { mBgAlphaColor = color; }
|
||||
const LLColor4& getTransparentColor() const { return mBgAlphaColor; }
|
||||
void setBackgroundImage(LLUIImage* image) { mBgOpaqueImage = image; }
|
||||
void setTransparentImage(LLUIImage* image) { mBgAlphaImage = image; }
|
||||
LLPointer<LLUIImage> getBackgroundImage() const { return mBgOpaqueImage; }
|
||||
LLPointer<LLUIImage> getTransparentImage() const { return mBgAlphaImage; }
|
||||
LLColor4 getBackgroundImageOverlay() { return mBgOpaqueImageOverlay; }
|
||||
LLColor4 getTransparentImageOverlay() { return mBgAlphaImageOverlay; }
|
||||
const LLColor4& getBackgroundImageOverlay() { return mBgOpaqueImageOverlay; }
|
||||
const LLColor4& getTransparentImageOverlay() { return mBgAlphaImageOverlay; }
|
||||
void setBackgroundVisible( bool b ) { mBgVisible = b; }
|
||||
bool isBackgroundVisible() const { return mBgVisible; }
|
||||
void setBackgroundOpaque(bool b) { mBgOpaque = b; }
|
||||
|
|
@ -192,7 +192,7 @@ public:
|
|||
// which takes a generic slot. Or use mCommitCallbackRegistrar.add() with
|
||||
// a named callback and reference it in XML.
|
||||
void childSetCommitCallback(std::string_view id, boost::function<void (LLUICtrl*,void*)> cb, void* data);
|
||||
void childSetColor(std::string_view id, const LLColor4& color);
|
||||
void childSetColor(std::string_view id, const LLUIColor& color);
|
||||
|
||||
LLCtrlSelectionInterface* childGetSelectionInterface(std::string_view id) const;
|
||||
LLCtrlListInterface* childGetListInterface(std::string_view id) const;
|
||||
|
|
|
|||
|
|
@ -465,7 +465,7 @@ LLScrollListCheck::LLScrollListCheck(const LLScrollListCell::Params& p)
|
|||
setWidth(rect.getWidth()); //check_box->getWidth();
|
||||
}
|
||||
|
||||
mCheckBox->setColor(p.color);
|
||||
mCheckBox->setColor(p.color());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ namespace ll
|
|||
virtual ~SearchableControl()
|
||||
{ }
|
||||
|
||||
LLColor4 getHighlightColor( ) const
|
||||
const LLColor4& getHighlightColor( ) const
|
||||
{
|
||||
static LLUIColor highlight_color = LLUIColorTable::instance().getColor("SearchableControlHighlightColor", LLColor4::red);
|
||||
return highlight_color.get();
|
||||
|
|
|
|||
|
|
@ -393,7 +393,7 @@ void LLSliderCtrl::setEnabled(bool b)
|
|||
|
||||
if( mLabelBox )
|
||||
{
|
||||
mLabelBox->setColor( b ? mTextEnabledColor.get() : mTextDisabledColor.get() );
|
||||
mLabelBox->setColor( b ? mTextEnabledColor : mTextDisabledColor );
|
||||
}
|
||||
|
||||
mSlider->setEnabled( b );
|
||||
|
|
@ -405,7 +405,7 @@ void LLSliderCtrl::setEnabled(bool b)
|
|||
|
||||
if( mTextBox )
|
||||
{
|
||||
mTextBox->setColor( b ? mTextEnabledColor.get() : mTextDisabledColor.get() );
|
||||
mTextBox->setColor( b ? mTextEnabledColor : mTextDisabledColor );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -107,8 +107,8 @@ public:
|
|||
F32 getMaxValue() const { return mSlider->getMaxValue(); }
|
||||
|
||||
void setLabel(const LLStringExplicit& label) { if (mLabelBox) mLabelBox->setText(label); }
|
||||
void setLabelColor(const LLColor4& c) { mTextEnabledColor = c; }
|
||||
void setDisabledLabelColor(const LLColor4& c) { mTextDisabledColor = c; }
|
||||
void setLabelColor(const LLUIColor& c) { mTextEnabledColor = c; }
|
||||
void setDisabledLabelColor(const LLUIColor& c) { mTextDisabledColor = c; }
|
||||
|
||||
boost::signals2::connection setSliderMouseDownCallback( const commit_signal_t::slot_type& cb );
|
||||
boost::signals2::connection setSliderMouseUpCallback( const commit_signal_t::slot_type& cb );
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ void LLSpinCtrl::updateLabelColor()
|
|||
{
|
||||
if( mLabelBox )
|
||||
{
|
||||
mLabelBox->setColor( getEnabled() ? mTextEnabledColor.get() : mTextDisabledColor.get() );
|
||||
mLabelBox->setColor( getEnabled() ? mTextEnabledColor : mTextDisabledColor );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ public:
|
|||
virtual void setPrecision(S32 precision);
|
||||
|
||||
void setLabel(const LLStringExplicit& label);
|
||||
void setLabelColor(const LLColor4& c) { mTextEnabledColor = c; updateLabelColor(); }
|
||||
void setDisabledLabelColor(const LLColor4& c) { mTextDisabledColor = c; updateLabelColor();}
|
||||
void setLabelColor(const LLUIColor& c) { mTextEnabledColor = c; updateLabelColor(); }
|
||||
void setDisabledLabelColor(const LLUIColor& c) { mTextDisabledColor = c; updateLabelColor();}
|
||||
void setAllowEdit(bool allow_edit);
|
||||
// <FS:Ansariel> Allow setting an argument on the label
|
||||
virtual bool setLabelArg(const std::string& key, const LLStringExplicit& text);
|
||||
|
|
|
|||
|
|
@ -114,8 +114,8 @@ void LLStatGraph::draw()
|
|||
it--;
|
||||
}
|
||||
|
||||
static LLColor4 default_color = LLUIColorTable::instance().getColor( "MenuDefaultBgColor" );
|
||||
gGL.color4fv(default_color.mV);
|
||||
static LLUIColor default_color = LLUIColorTable::instance().getColor( "MenuDefaultBgColor" );
|
||||
gGL.color4fv(default_color.get().mV);
|
||||
gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, true);
|
||||
|
||||
gGL.color4fv(LLColor4::black.mV);
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ LLStyle::Params::Params()
|
|||
color("color", LLColor4::black),
|
||||
readonly_color("readonly_color", LLColor4::black),
|
||||
selected_color("selected_color", LLColor4::black),
|
||||
alpha("alpha", 1.f),
|
||||
font("font", LLFontGL::getFontMonospace()),
|
||||
image("image"),
|
||||
link_href("href"),
|
||||
|
|
@ -58,7 +59,8 @@ LLStyle::LLStyle(const LLStyle::Params& p)
|
|||
mLink(p.link_href),
|
||||
mIsLink(p.is_link.isProvided() ? p.is_link : !p.link_href().empty()),
|
||||
mDropShadow(p.drop_shadow),
|
||||
mImagep(p.image())
|
||||
mImagep(p.image()),
|
||||
mAlpha(p.alpha)
|
||||
{}
|
||||
|
||||
void LLStyle::setFont(const LLFontGL* font)
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ public:
|
|||
Optional<LLUIColor> color,
|
||||
readonly_color,
|
||||
selected_color;
|
||||
Optional<F32> alpha;
|
||||
Optional<const LLFontGL*> font;
|
||||
Optional<LLUIImage*> image;
|
||||
Optional<std::string> link_href;
|
||||
|
|
@ -65,6 +66,9 @@ public:
|
|||
const LLUIColor& getSelectedColor() const { return mSelectedColor; }
|
||||
void setSelectedColor(const LLUIColor& color) { mSelectedColor = color; }
|
||||
|
||||
F32 getAlpha() const { return mAlpha; }
|
||||
void setAlpha(F32 alpha) { mAlpha = alpha; }
|
||||
|
||||
bool isVisible() const;
|
||||
void setVisible(bool is_visible);
|
||||
|
||||
|
|
@ -93,7 +97,8 @@ public:
|
|||
&& mFont == rhs.mFont
|
||||
&& mLink == rhs.mLink
|
||||
&& mImagep == rhs.mImagep
|
||||
&& mDropShadow == rhs.mDropShadow;
|
||||
&& mDropShadow == rhs.mDropShadow
|
||||
&& mAlpha == rhs.mAlpha;
|
||||
}
|
||||
|
||||
bool operator!=(const LLStyle& rhs) const { return !(*this == rhs); }
|
||||
|
|
@ -102,18 +107,19 @@ public:
|
|||
LLFontGL::ShadowType mDropShadow;
|
||||
|
||||
protected:
|
||||
~LLStyle() { }
|
||||
~LLStyle() = default;
|
||||
|
||||
private:
|
||||
bool mVisible;
|
||||
std::string mFontName;
|
||||
std::string mLink;
|
||||
LLUIColor mColor;
|
||||
LLUIColor mReadOnlyColor;
|
||||
LLUIColor mSelectedColor;
|
||||
std::string mFontName;
|
||||
const LLFontGL* mFont;
|
||||
std::string mLink;
|
||||
bool mIsLink;
|
||||
LLPointer<LLUIImage> mImagep;
|
||||
F32 mAlpha;
|
||||
bool mVisible;
|
||||
bool mIsLink;
|
||||
};
|
||||
|
||||
typedef LLPointer<LLStyle> LLStyleSP;
|
||||
|
|
|
|||
|
|
@ -723,9 +723,8 @@ void LLTextBase::drawCursor()
|
|||
|
||||
if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode() && !hasSelection() && text[mCursorPos] != '\n')
|
||||
{
|
||||
LLColor4 text_color;
|
||||
const LLFontGL* fontp;
|
||||
text_color = segmentp->getColor();
|
||||
const LLColor4& text_color = segmentp->getColor();
|
||||
fontp = segmentp->getStyle()->getFont();
|
||||
fontp->render(text, mCursorPos, cursor_rect,
|
||||
LLColor4(1.f - text_color.mV[VRED], 1.f - text_color.mV[VGREEN], 1.f - text_color.mV[VBLUE], alpha),
|
||||
|
|
@ -1514,7 +1513,7 @@ void LLTextBase::draw()
|
|||
{
|
||||
bg_rect.intersectWith(text_rect);
|
||||
}
|
||||
LLColor4 bg_color = mReadOnly
|
||||
const LLColor4& bg_color = mReadOnly
|
||||
? mReadOnlyBgColor.get()
|
||||
: hasFocus()
|
||||
? mFocusBgColor.get()
|
||||
|
|
@ -1525,7 +1524,7 @@ void LLTextBase::draw()
|
|||
// Draw highlighted if needed
|
||||
if( ll::ui::SearchableControl::getHighlighted() )
|
||||
{
|
||||
LLColor4 bg_color = ll::ui::SearchableControl::getHighlightColor();
|
||||
const LLColor4& bg_color = ll::ui::SearchableControl::getHighlightColor();
|
||||
LLRect bg_rect = mVisibleTextRect;
|
||||
if( mScroller )
|
||||
bg_rect.intersectWith( text_rect );
|
||||
|
|
@ -1578,14 +1577,14 @@ void LLTextBase::draw()
|
|||
|
||||
|
||||
//virtual
|
||||
void LLTextBase::setColor( const LLColor4& c )
|
||||
void LLTextBase::setColor( const LLUIColor& c )
|
||||
{
|
||||
mFgColor = c;
|
||||
mStyleDirty = true;
|
||||
}
|
||||
|
||||
//virtual
|
||||
void LLTextBase::setReadOnlyColor(const LLColor4 &c)
|
||||
void LLTextBase::setReadOnlyColor(const LLUIColor &c)
|
||||
{
|
||||
mReadOnlyFgColor = c;
|
||||
mStyleDirty = true;
|
||||
|
|
@ -2441,8 +2440,8 @@ static LLUIImagePtr image_from_icon_name(const std::string& icon_name)
|
|||
void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Params& input_params)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
|
||||
LLStyle::Params style_params(input_params);
|
||||
style_params.fillFrom(getStyleParams());
|
||||
LLStyle::Params style_params(getStyleParams());
|
||||
style_params.overwriteFrom(input_params);
|
||||
|
||||
S32 part = (S32)LLTextParser::WHOLE;
|
||||
if (mParseHTML && !style_params.is_link) // Don't search for URLs inside a link segment (STORM-358).
|
||||
|
|
@ -2705,16 +2704,14 @@ void LLTextBase::appendAndHighlightTextImpl(const std::string &new_text, S32 hig
|
|||
{
|
||||
LLStyle::Params highlight_params(style_params);
|
||||
|
||||
LLSD pieces = LLTextParser::instance().parsePartialLineHighlights(new_text, highlight_params.color(), (LLTextParser::EHighlightPosition)highlight_part);
|
||||
auto pieces = LLTextParser::instance().parsePartialLineHighlights(new_text, highlight_params.color, (LLTextParser::EHighlightPosition)highlight_part);
|
||||
for (S32 i = 0; i < pieces.size(); i++)
|
||||
{
|
||||
LLSD color_llsd = pieces[i]["color"];
|
||||
LLColor4 lcolor;
|
||||
lcolor.setValue(color_llsd);
|
||||
highlight_params.color = lcolor;
|
||||
const auto& piece_pair = pieces[i];
|
||||
highlight_params.color = piece_pair.second;
|
||||
|
||||
LLWString wide_text;
|
||||
wide_text = utf8str_to_wstring(pieces[i]["text"].asString());
|
||||
wide_text = utf8str_to_wstring(piece_pair.first);
|
||||
|
||||
S32 cur_length = getLength();
|
||||
LLStyleConstSP sp(new LLStyle(highlight_params));
|
||||
|
|
@ -3600,8 +3597,8 @@ F32 LLTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_e
|
|||
bool LLTextSegment::canEdit() const { return false; }
|
||||
void LLTextSegment::unlinkFromDocument(LLTextBase*) {}
|
||||
void LLTextSegment::linkToDocument(LLTextBase*) {}
|
||||
const LLColor4& LLTextSegment::getColor() const { return LLColor4::white; }
|
||||
//void LLTextSegment::setColor(const LLColor4 &color) {}
|
||||
const LLUIColor& LLTextSegment::getColor() const { static const LLUIColor white = LLUIColorTable::instance().getColor("White", LLColor4::white); return white; }
|
||||
//void LLTextSegment::setColor(const LLUIColor &color) {}
|
||||
LLStyleConstSP LLTextSegment::getStyle() const {static LLStyleConstSP sp(new LLStyle()); return sp; }
|
||||
void LLTextSegment::setStyle(LLStyleConstSP style) {}
|
||||
void LLTextSegment::setToken( LLKeywordToken* token ) {}
|
||||
|
|
@ -3647,7 +3644,7 @@ LLNormalTextSegment::LLNormalTextSegment( LLStyleConstSP style, S32 start, S32 e
|
|||
}
|
||||
}
|
||||
|
||||
LLNormalTextSegment::LLNormalTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible)
|
||||
LLNormalTextSegment::LLNormalTextSegment( const LLUIColor& color, S32 start, S32 end, LLTextBase& editor, bool is_visible)
|
||||
: LLTextSegment(start, end),
|
||||
mToken(NULL),
|
||||
mEditor(editor)
|
||||
|
|
@ -3687,7 +3684,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
|
|||
|
||||
const LLFontGL* font = mStyle->getFont();
|
||||
|
||||
LLColor4 color = (mEditor.getReadOnly() ? mStyle->getReadOnlyColor() : mStyle->getColor()) % alpha;
|
||||
LLColor4 color = (mEditor.getReadOnly() ? mStyle->getReadOnlyColor() : mStyle->getColor()) % (alpha * mStyle->getAlpha());
|
||||
|
||||
if( selection_start > seg_start )
|
||||
{
|
||||
|
|
@ -3970,7 +3967,7 @@ LLLabelTextSegment::LLLabelTextSegment( LLStyleConstSP style, S32 start, S32 end
|
|||
{
|
||||
}
|
||||
|
||||
LLLabelTextSegment::LLLabelTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible)
|
||||
LLLabelTextSegment::LLLabelTextSegment( const LLUIColor& color, S32 start, S32 end, LLTextBase& editor, bool is_visible)
|
||||
: LLNormalTextSegment(color, start, end, editor, is_visible)
|
||||
{
|
||||
}
|
||||
|
|
@ -3994,7 +3991,7 @@ LLEmojiTextSegment::LLEmojiTextSegment(LLStyleConstSP style, S32 start, S32 end,
|
|||
{
|
||||
}
|
||||
|
||||
LLEmojiTextSegment::LLEmojiTextSegment(const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible)
|
||||
LLEmojiTextSegment::LLEmojiTextSegment(const LLUIColor& color, S32 start, S32 end, LLTextBase& editor, bool is_visible)
|
||||
: LLNormalTextSegment(color, start, end, editor, is_visible)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,8 +84,8 @@ public:
|
|||
virtual void unlinkFromDocument(class LLTextBase* editor);
|
||||
virtual void linkToDocument(class LLTextBase* editor);
|
||||
|
||||
virtual const LLColor4& getColor() const;
|
||||
//virtual void setColor(const LLColor4 &color);
|
||||
virtual const LLUIColor& getColor() const;
|
||||
//virtual void setColor(const LLUIColor &color);
|
||||
virtual LLStyleConstSP getStyle() const;
|
||||
virtual void setStyle(LLStyleConstSP style);
|
||||
virtual void setToken( LLKeywordToken* token );
|
||||
|
|
@ -125,7 +125,7 @@ class LLNormalTextSegment : public LLTextSegment
|
|||
{
|
||||
public:
|
||||
LLNormalTextSegment( LLStyleConstSP style, S32 start, S32 end, LLTextBase& editor );
|
||||
LLNormalTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible = true);
|
||||
LLNormalTextSegment( const LLUIColor& color, S32 start, S32 end, LLTextBase& editor, bool is_visible = true);
|
||||
virtual ~LLNormalTextSegment();
|
||||
|
||||
/*virtual*/ bool getDimensionsF32(S32 first_char, S32 num_chars, F32& width, S32& height) const;
|
||||
|
|
@ -133,7 +133,7 @@ public:
|
|||
/*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const;
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
|
||||
/*virtual*/ bool canEdit() const { return true; }
|
||||
/*virtual*/ const LLColor4& getColor() const { return mStyle->getColor(); }
|
||||
/*virtual*/ const LLUIColor& getColor() const { return mStyle->getColor(); }
|
||||
/*virtual*/ LLStyleConstSP getStyle() const { return mStyle; }
|
||||
/*virtual*/ void setStyle(LLStyleConstSP style) { mStyle = style; }
|
||||
/*virtual*/ void setToken( LLKeywordToken* token ) { mToken = token; }
|
||||
|
|
@ -170,7 +170,7 @@ class LLLabelTextSegment : public LLNormalTextSegment
|
|||
{
|
||||
public:
|
||||
LLLabelTextSegment( LLStyleConstSP style, S32 start, S32 end, LLTextBase& editor );
|
||||
LLLabelTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible = true);
|
||||
LLLabelTextSegment( const LLUIColor& color, S32 start, S32 end, LLTextBase& editor, bool is_visible = true);
|
||||
|
||||
protected:
|
||||
|
||||
|
|
@ -184,7 +184,7 @@ class LLEmojiTextSegment : public LLNormalTextSegment
|
|||
{
|
||||
public:
|
||||
LLEmojiTextSegment(LLStyleConstSP style, S32 start, S32 end, LLTextBase& editor);
|
||||
LLEmojiTextSegment(const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible = true);
|
||||
LLEmojiTextSegment(const LLUIColor& color, S32 start, S32 end, LLTextBase& editor, bool is_visible = true);
|
||||
|
||||
bool canEdit() const override { return false; }
|
||||
bool handleToolTip(S32 x, S32 y, MASK mask) override;
|
||||
|
|
@ -399,8 +399,8 @@ public:
|
|||
|
||||
// LLUICtrl interface
|
||||
/*virtual*/ bool acceptsTextInput() const override { return !mReadOnly; }
|
||||
/*virtual*/ void setColor(const LLColor4& c) override;
|
||||
virtual void setReadOnlyColor(const LLColor4 &c);
|
||||
/*virtual*/ void setColor(const LLUIColor& c) override;
|
||||
virtual void setReadOnlyColor(const LLUIColor& c);
|
||||
/*virtual*/ void onVisibilityChange(bool new_visibility) override;
|
||||
|
||||
/*virtual*/ void setValue(const LLSD& value) override;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
#include "llmath.h"
|
||||
#include "v4color.h"
|
||||
#include "lldir.h"
|
||||
#include "lluicolor.h"
|
||||
|
||||
//
|
||||
// Member Functions
|
||||
|
|
@ -80,14 +81,14 @@ S32 LLTextParser::findPattern(const std::string &text, LLSD highlight)
|
|||
return static_cast<S32>(found);
|
||||
}
|
||||
|
||||
LLSD LLTextParser::parsePartialLineHighlights(const std::string &text, const LLColor4 &color, EHighlightPosition part, S32 index)
|
||||
LLTextParser::parser_out_vec_t LLTextParser::parsePartialLineHighlights(const std::string &text, const LLUIColor& color, EHighlightPosition part, S32 index)
|
||||
{
|
||||
loadKeywords();
|
||||
|
||||
//evil recursive string atomizer.
|
||||
LLSD ret_llsd, start_llsd, middle_llsd, end_llsd;
|
||||
parser_out_vec_t ret_vec, start_vec, middle_vec, end_vec;
|
||||
|
||||
for (S32 i=index;i<mHighlights.size();i++)
|
||||
for (S32 i=index, size = (S32)mHighlights.size();i< size;i++)
|
||||
{
|
||||
S32 condition = mHighlights[i]["condition"];
|
||||
if ((S32)mHighlights[i]["highlight"]==PART && condition!=MATCHES)
|
||||
|
|
@ -104,72 +105,69 @@ LLSD LLTextParser::parsePartialLineHighlights(const std::string &text, const LLC
|
|||
EHighlightPosition newpart;
|
||||
if (start==0)
|
||||
{
|
||||
start_llsd[0]["text"] =text.substr(0,end);
|
||||
start_llsd[0]["color"]=mHighlights[i]["color"];
|
||||
if (start_vec.empty())
|
||||
{
|
||||
start_vec.push_back(std::make_pair(text.substr(0, end), LLColor4(mHighlights[i]["color"])));
|
||||
}
|
||||
else
|
||||
{
|
||||
start_vec[0] = std::make_pair(text.substr(0, end), LLColor4(mHighlights[i]["color"]));
|
||||
}
|
||||
|
||||
if (end < len)
|
||||
{
|
||||
if (part==END || part==WHOLE) newpart=END; else newpart=MIDDLE;
|
||||
end_llsd=parsePartialLineHighlights(text.substr( end ),color,newpart,i);
|
||||
end_vec = parsePartialLineHighlights(text.substr( end ),color,newpart,i);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (part==START || part==WHOLE) newpart=START; else newpart=MIDDLE;
|
||||
|
||||
start_llsd=parsePartialLineHighlights(text.substr(0,start),color,newpart,i+1);
|
||||
start_vec = parsePartialLineHighlights(text.substr(0,start),color,newpart,i+1);
|
||||
|
||||
if (end < len)
|
||||
{
|
||||
middle_llsd[0]["text"] =text.substr(start,end);
|
||||
middle_llsd[0]["color"]=mHighlights[i]["color"];
|
||||
if (middle_vec.empty())
|
||||
{
|
||||
middle_vec.push_back(std::make_pair(text.substr(start, end), LLColor4(mHighlights[i]["color"])));
|
||||
}
|
||||
else
|
||||
{
|
||||
middle_vec[0] = std::make_pair(text.substr(start, end), LLColor4(mHighlights[i]["color"]));
|
||||
}
|
||||
|
||||
if (part==END || part==WHOLE) newpart=END; else newpart=MIDDLE;
|
||||
|
||||
end_llsd=parsePartialLineHighlights(text.substr( (start+end) ),color,newpart,i);
|
||||
end_vec = parsePartialLineHighlights(text.substr( (start+end) ),color,newpart,i);
|
||||
}
|
||||
else
|
||||
{
|
||||
end_llsd[0]["text"] =text.substr(start,end);
|
||||
end_llsd[0]["color"]=mHighlights[i]["color"];
|
||||
if (end_vec.empty())
|
||||
{
|
||||
end_vec.push_back(std::make_pair(text.substr(start, end), LLColor4(mHighlights[i]["color"])));
|
||||
}
|
||||
else
|
||||
{
|
||||
end_vec[0] = std::make_pair(text.substr(start, end), LLColor4(mHighlights[i]["color"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
S32 retcount=0;
|
||||
ret_vec.reserve(start_vec.size() + middle_vec.size() + end_vec.size());
|
||||
ret_vec.insert(ret_vec.end(), start_vec.begin(), start_vec.end());
|
||||
ret_vec.insert(ret_vec.end(), middle_vec.begin(), middle_vec.end());
|
||||
ret_vec.insert(ret_vec.end(), end_vec.begin(), end_vec.end());
|
||||
|
||||
//FIXME These loops should be wrapped into a subroutine.
|
||||
for (LLSD::array_iterator iter = start_llsd.beginArray();
|
||||
iter != start_llsd.endArray();++iter)
|
||||
{
|
||||
LLSD highlight = *iter;
|
||||
ret_llsd[retcount++]=highlight;
|
||||
}
|
||||
|
||||
for (LLSD::array_iterator iter = middle_llsd.beginArray();
|
||||
iter != middle_llsd.endArray();++iter)
|
||||
{
|
||||
LLSD highlight = *iter;
|
||||
ret_llsd[retcount++]=highlight;
|
||||
}
|
||||
|
||||
for (LLSD::array_iterator iter = end_llsd.beginArray();
|
||||
iter != end_llsd.endArray();++iter)
|
||||
{
|
||||
LLSD highlight = *iter;
|
||||
ret_llsd[retcount++]=highlight;
|
||||
}
|
||||
|
||||
return ret_llsd;
|
||||
return ret_vec;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//No patterns found. Just send back what was passed in.
|
||||
ret_llsd[0]["text"] =text;
|
||||
LLSD color_sd = color.getValue();
|
||||
ret_llsd[0]["color"]=color_sd;
|
||||
return ret_llsd;
|
||||
ret_vec.push_back(std::make_pair(text, color));
|
||||
return ret_vec;
|
||||
}
|
||||
|
||||
bool LLTextParser::parseFullLineHighlights(const std::string &text, LLColor4 *color)
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "llsd.h"
|
||||
#include "llsingleton.h"
|
||||
#include "lluicolor.h"
|
||||
|
||||
class LLUUID;
|
||||
class LLVector3d;
|
||||
|
|
@ -45,7 +46,9 @@ public:
|
|||
typedef enum e_highlight_position { WHOLE, START, MIDDLE, END } EHighlightPosition;
|
||||
typedef enum e_dialog_action { ACTION_NONE, ACTION_CLOSE, ACTION_ADD, ACTION_COPY, ACTION_UPDATE } EDialogAction;
|
||||
|
||||
LLSD parsePartialLineHighlights(const std::string &text,const LLColor4 &color, EHighlightPosition part=WHOLE, S32 index=0);
|
||||
using parser_out_vec_t = std::vector<std::pair<std::string, LLUIColor>>;
|
||||
|
||||
parser_out_vec_t parsePartialLineHighlights(const std::string &text,const LLUIColor &color, EHighlightPosition part=WHOLE, S32 index=0);
|
||||
bool parseFullLineHighlights(const std::string &text, LLColor4 *color);
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -198,7 +198,61 @@ LLUIColor LLUIColorTable::getColor(std::string_view name, const LLColor4& defaul
|
|||
// update user color, loaded colors are parsed on initialization
|
||||
void LLUIColorTable::setColor(std::string_view name, const LLColor4& color)
|
||||
{
|
||||
setColor(name, color, mUserSetColors);
|
||||
auto it = mUserSetColors.lower_bound(name);
|
||||
if(it != mUserSetColors.end() && !(mUserSetColors.key_comp()(name, it->first)))
|
||||
{
|
||||
it->second = color;
|
||||
}
|
||||
else
|
||||
{
|
||||
string_color_map_t::iterator base_iter = mLoadedColors.find(name);
|
||||
if (base_iter != mLoadedColors.end())
|
||||
{
|
||||
LLColor4 original_color = base_iter->second.get();
|
||||
auto color_handle = mLoadedColors.extract(base_iter);
|
||||
auto new_color_pair = mUserSetColors.insert(std::move(color_handle));
|
||||
new_color_pair.position->second = color;
|
||||
mLoadedColors.emplace(name, LLUIColor(original_color));
|
||||
}
|
||||
else
|
||||
{
|
||||
mUserSetColors.insert(it, std::make_pair(name, color));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool LLUIColorTable::isDefault(std::string_view name) const
|
||||
{
|
||||
string_color_map_t::const_iterator base_iter = mLoadedColors.find(name);
|
||||
string_color_map_t::const_iterator user_iter = mUserSetColors.find(name);
|
||||
if (base_iter != mLoadedColors.end())
|
||||
{
|
||||
if(user_iter != mUserSetColors.end())
|
||||
return user_iter->second == base_iter->second;
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (user_iter != mUserSetColors.end()) // user only color ???
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLUIColorTable::resetToDefault(std::string_view name)
|
||||
{
|
||||
string_color_map_t::iterator iter = mUserSetColors.find(name);
|
||||
|
||||
if (iter != mUserSetColors.end())
|
||||
{
|
||||
auto default_iter = mLoadedColors.find(name);
|
||||
|
||||
if (default_iter != mLoadedColors.end())
|
||||
{
|
||||
iter->second = default_iter->second.get();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool LLUIColorTable::loadFromSettings()
|
||||
|
|
@ -223,18 +277,16 @@ void LLUIColorTable::saveUserSettings() const
|
|||
{
|
||||
Params params;
|
||||
|
||||
for(string_color_map_t::const_iterator it = mUserSetColors.begin();
|
||||
it != mUserSetColors.end();
|
||||
++it)
|
||||
for (const auto& color_pair : mUserSetColors)
|
||||
{
|
||||
// Compare user color value with the default value, skip if equal
|
||||
string_color_map_t::const_iterator itd = mLoadedColors.find(it->first);
|
||||
if(itd != mLoadedColors.end() && itd->second == it->second)
|
||||
string_color_map_t::const_iterator itd = mLoadedColors.find(color_pair.first);
|
||||
if(itd != mLoadedColors.end() && itd->second == color_pair.second)
|
||||
continue;
|
||||
|
||||
ColorEntryParams color_entry;
|
||||
color_entry.name = it->first;
|
||||
color_entry.color.value = it->second;
|
||||
color_entry.name = color_pair.first;
|
||||
color_entry.color.value = color_pair.second;
|
||||
|
||||
params.color_entries.add(color_entry);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,6 +83,10 @@ public:
|
|||
// returns true if color_name exists in the table
|
||||
bool colorExists(std::string_view color_name) const;
|
||||
|
||||
bool isDefault(std::string_view color_name) const;
|
||||
|
||||
void resetToDefault(std::string_view color_name);
|
||||
|
||||
// loads colors from settings files
|
||||
bool loadFromSettings();
|
||||
|
||||
|
|
@ -90,6 +94,9 @@ public:
|
|||
void saveUserSettings() const;
|
||||
void saveUserSettingsPaletteOnly() const; // AO, saves the user pallete, excluding skips skin-related files
|
||||
|
||||
const auto& getLoadedColors() { return mLoadedColors; }
|
||||
const auto& getUserColors() { return mUserSetColors; }
|
||||
|
||||
private:
|
||||
bool loadFromFilename(const std::string& filename, string_color_map_t& table);
|
||||
|
||||
|
|
|
|||
|
|
@ -1053,7 +1053,7 @@ bool LLUICtrl::getTentative() const
|
|||
}
|
||||
|
||||
// virtual
|
||||
void LLUICtrl::setColor(const LLColor4& color)
|
||||
void LLUICtrl::setColor(const LLUIColor& color)
|
||||
{ }
|
||||
|
||||
F32 LLUICtrl::getCurrentTransparency()
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ public:
|
|||
// selected radio button, etc.). Defaults to no-op.
|
||||
virtual void clear();
|
||||
|
||||
virtual void setColor(const LLColor4& color);
|
||||
virtual void setColor(const LLUIColor& color);
|
||||
|
||||
// Ansariel: Changed to virtual. We might want to change the transparency ourself!
|
||||
virtual F32 getCurrentTransparency();
|
||||
|
|
|
|||
|
|
@ -73,14 +73,14 @@ LLViewBorder::LLViewBorder(const LLViewBorder::Params& p)
|
|||
mStyle(p.render_style)
|
||||
{}
|
||||
|
||||
void LLViewBorder::setColors( const LLColor4& shadow_dark, const LLColor4& highlight_light )
|
||||
void LLViewBorder::setColors( const LLUIColor& shadow_dark, const LLUIColor& highlight_light )
|
||||
{
|
||||
mShadowDark = shadow_dark;
|
||||
mHighlightLight = highlight_light;
|
||||
}
|
||||
|
||||
void LLViewBorder::setColorsExtended( const LLColor4& shadow_light, const LLColor4& shadow_dark,
|
||||
const LLColor4& highlight_light, const LLColor4& highlight_dark )
|
||||
void LLViewBorder::setColorsExtended( const LLUIColor& shadow_light, const LLUIColor& shadow_dark,
|
||||
const LLUIColor& highlight_light, const LLUIColor& highlight_dark )
|
||||
{
|
||||
mShadowDark = shadow_dark;
|
||||
mShadowLight = shadow_light;
|
||||
|
|
|
|||
|
|
@ -77,9 +77,9 @@ public:
|
|||
S32 getBorderWidth() const { return mBorderWidth; }
|
||||
void setBevel(EBevel bevel) { mBevel = bevel; }
|
||||
EBevel getBevel() const { return mBevel; }
|
||||
void setColors( const LLColor4& shadow_dark, const LLColor4& highlight_light );
|
||||
void setColorsExtended( const LLColor4& shadow_light, const LLColor4& shadow_dark,
|
||||
const LLColor4& highlight_light, const LLColor4& highlight_dark );
|
||||
void setColors( const LLUIColor& shadow_dark, const LLUIColor& highlight_light );
|
||||
void setColorsExtended( const LLUIColor& shadow_light, const LLUIColor& shadow_dark,
|
||||
const LLUIColor& highlight_light, const LLUIColor& highlight_dark );
|
||||
void setTexture( const class LLUUID &image_id );
|
||||
|
||||
LLColor4 getHighlightLight() {return mHighlightLight.get();}
|
||||
|
|
|
|||
|
|
@ -402,6 +402,7 @@ set(viewer_SOURCE_FILES
|
|||
llfloatersearch.cpp
|
||||
llfloatersearchreplace.cpp
|
||||
llfloatersellland.cpp
|
||||
llfloatersettingscolor.cpp
|
||||
llfloatersettingsdebug.cpp
|
||||
llfloatersidepanelcontainer.cpp
|
||||
llfloatersnapshot.cpp
|
||||
|
|
@ -1212,6 +1213,7 @@ set(viewer_HEADER_FILES
|
|||
llfloatersearch.h
|
||||
llfloatersearchreplace.h
|
||||
llfloatersellland.h
|
||||
llfloatersettingscolor.h
|
||||
llfloatersettingsdebug.h
|
||||
llfloatersidepanelcontainer.h
|
||||
llfloatersnapshot.h
|
||||
|
|
|
|||
|
|
@ -21619,6 +21619,17 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>ColorSettingsHideDefault</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Show non-default settings only in Color Settings list</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>UpdateAppWindowTitleBar</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -775,7 +775,7 @@ public:
|
|||
mNeedsTimeBox = false;
|
||||
mUserNameTextBox->setValue(mFrom);
|
||||
updateMinUserNameWidth();
|
||||
LLColor4 sep_color = LLUIColorTable::instance().getColor("ChatTeleportSeparatorColor");
|
||||
LLUIColor sep_color = LLUIColorTable::instance().getColor("ChatTeleportSeparatorColor");
|
||||
setTransparentColor(sep_color);
|
||||
mTimeBoxTextBox->setVisible(false);
|
||||
}
|
||||
|
|
@ -1195,7 +1195,7 @@ private:
|
|||
!av_name.isDisplayNameDefault())
|
||||
{
|
||||
LLStyle::Params style_params_name;
|
||||
LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
|
||||
LLUIColor userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
|
||||
style_params_name.color(userNameColor);
|
||||
style_params_name.font.name("SansSerifSmall");
|
||||
style_params_name.font.style(mNameStyleParams.font.style);
|
||||
|
|
@ -1435,9 +1435,10 @@ void FSChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
|
|||
}
|
||||
}
|
||||
|
||||
LLColor4 txt_color = LLUIColorTable::instance().getColor("White");
|
||||
LLColor4 name_color = LLUIColorTable::instance().getColor("ChatNameColor");
|
||||
LLViewerChat::getChatColor(chat, txt_color, LLSD().with("is_local", is_local));
|
||||
F32 alpha = 1.f;
|
||||
LLUIColor txt_color = LLUIColorTable::instance().getColor("White");
|
||||
LLUIColor name_color = LLUIColorTable::instance().getColor("ChatNameColor");
|
||||
LLViewerChat::getChatColor(chat, txt_color, alpha, LLSD().with("is_local", is_local));
|
||||
LLFontGL* fontp = LLViewerChat::getChatFont();
|
||||
std::string font_name = LLFontGL::nameFromFont(fontp);
|
||||
std::string font_size = LLFontGL::sizeFromFont(fontp);
|
||||
|
|
@ -1445,6 +1446,7 @@ void FSChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
|
|||
LLStyle::Params body_message_params;
|
||||
body_message_params.color(txt_color);
|
||||
body_message_params.readonly_color(txt_color);
|
||||
body_message_params.alpha(alpha);
|
||||
body_message_params.font.name(font_name);
|
||||
body_message_params.font.size(font_size);
|
||||
body_message_params.font.style(input_append_params.font.style);
|
||||
|
|
@ -1585,7 +1587,7 @@ void FSChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
|
|||
// out of the timestamp
|
||||
if (args["show_time"].asBoolean() && !teleport_separator)
|
||||
{
|
||||
LLColor4 timestamp_color = LLUIColorTable::instance().getColor("ChatTimestampColor");
|
||||
LLUIColor timestamp_color = LLUIColorTable::instance().getColor("ChatTimestampColor");
|
||||
timestamp_style.color(timestamp_color);
|
||||
timestamp_style.readonly_color(timestamp_color);
|
||||
if (message_from_log && !is_conversation_log)
|
||||
|
|
@ -1634,7 +1636,7 @@ void FSChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
|
|||
// (don't let object names with hyperlinks override our objectim Url)
|
||||
LLStyle::Params link_params(body_message_params);
|
||||
link_params.color.control = "ChatNameObjectColor";
|
||||
LLColor4 link_color = LLUIColorTable::instance().getColor("ChatNameObjectColor");
|
||||
LLUIColor link_color = LLUIColorTable::instance().getColor("ChatNameObjectColor");
|
||||
link_params.color = link_color;
|
||||
link_params.readonly_color = link_color;
|
||||
if (message_from_log && !is_conversation_log)
|
||||
|
|
|
|||
|
|
@ -91,9 +91,10 @@ bool FSConsoleUtils::ProcessChatMessage(const LLChat& chat_msg, const LLSD &args
|
|||
|
||||
std::string message = irc_me ? chat_msg.mText.substr(3) : chat_msg.mText;
|
||||
console_chat = sender_name + delimiter + message;
|
||||
LLColor4 chatcolor;
|
||||
LLViewerChat::getChatColor(chat_msg, chatcolor);
|
||||
gConsole->addConsoleLine(console_chat, chatcolor);
|
||||
F32 alpha = 1.f;
|
||||
LLUIColor chatcolor;
|
||||
LLViewerChat::getChatColor(chat_msg, chatcolor, alpha);
|
||||
gConsole->addConsoleLine(console_chat, chatcolor % alpha);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -113,9 +114,10 @@ bool FSConsoleUtils::ProcessChatMessage(const LLChat& chat_msg, const LLSD &args
|
|||
}
|
||||
// FS:LO FIRE-1439 - Clickable avatar names on local chat radar crossing reports
|
||||
|
||||
LLColor4 chatcolor;
|
||||
LLViewerChat::getChatColor(chat_msg, chatcolor);
|
||||
gConsole->addConsoleLine(console_chat, chatcolor);
|
||||
F32 alpha = 1.f;
|
||||
LLUIColor chatcolor;
|
||||
LLViewerChat::getChatColor(chat_msg, chatcolor, alpha);
|
||||
gConsole->addConsoleLine(console_chat, chatcolor % alpha);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
@ -157,9 +159,10 @@ void FSConsoleUtils::onProcessChatAvatarNameLookup(const LLUUID& agent_id, const
|
|||
}
|
||||
|
||||
console_chat = sender_name + delimiter + message;
|
||||
LLColor4 chatcolor;
|
||||
LLViewerChat::getChatColor(chat_msg, chatcolor);
|
||||
gConsole->addConsoleLine(console_chat, chatcolor);
|
||||
F32 alpha = 1.f;
|
||||
LLUIColor chatcolor;
|
||||
LLViewerChat::getChatColor(chat_msg, chatcolor, alpha);
|
||||
gConsole->addConsoleLine(console_chat, chatcolor % alpha);
|
||||
}
|
||||
|
||||
//static
|
||||
|
|
@ -238,8 +241,9 @@ void FSConsoleUtils::onProccessInstantMessageNameLookup(const LLUUID& agent_id,
|
|||
chat.mText = message_str;
|
||||
chat.mSourceType = CHAT_SOURCE_AGENT;
|
||||
chat.mChatType = is_group ? CHAT_TYPE_IM_GROUP : CHAT_TYPE_IM;
|
||||
LLColor4 textcolor;
|
||||
LLViewerChat::getChatColor(chat, textcolor, LLSD().with("is_local", false).with("for_console", true));
|
||||
F32 alpha = 1.f;
|
||||
LLUIColor textcolor;
|
||||
LLViewerChat::getChatColor(chat, textcolor, alpha, LLSD().with("is_local", false).with("for_console", true));
|
||||
|
||||
gConsole->addConsoleLine("IM: " + sender_name + delimiter + message, textcolor, session_id);
|
||||
gConsole->addConsoleLine("IM: " + sender_name + delimiter + message, textcolor % alpha, session_id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -717,7 +717,7 @@ public:
|
|||
mNeedsTimeBox = false;
|
||||
user_name->setValue(mFrom);
|
||||
updateMinUserNameWidth();
|
||||
LLColor4 sep_color = LLUIColorTable::instance().getColor("ChatTeleportSeparatorColor");
|
||||
LLUIColor sep_color = LLUIColorTable::instance().getColor("ChatTeleportSeparatorColor");
|
||||
setTransparentColor(sep_color);
|
||||
mTimeBoxTextBox->setVisible(false);
|
||||
}
|
||||
|
|
@ -779,7 +779,7 @@ public:
|
|||
std::string username = chat.mFromName.substr(username_start + 2);
|
||||
username = username.substr(0, username.length() - 1);
|
||||
LLStyle::Params style_params_name;
|
||||
LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
|
||||
LLUIColor userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
|
||||
style_params_name.color(userNameColor);
|
||||
style_params_name.font.name("SansSerifSmall");
|
||||
style_params_name.font.style("NORMAL");
|
||||
|
|
@ -1093,7 +1093,7 @@ private:
|
|||
!av_name.isDisplayNameDefault())
|
||||
{
|
||||
LLStyle::Params style_params_name;
|
||||
LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
|
||||
LLUIColor userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
|
||||
style_params_name.color(userNameColor);
|
||||
style_params_name.font.name("SansSerifSmall");
|
||||
style_params_name.font.style("NORMAL");
|
||||
|
|
@ -1299,10 +1299,11 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
|
|||
mMoreChatPanel->reshape(mMoreChatPanel->getRect().getWidth(), height);
|
||||
}
|
||||
|
||||
LLColor4 txt_color = LLUIColorTable::instance().getColor("White");
|
||||
LLColor4 name_color(txt_color);
|
||||
F32 alpha = 1.f;
|
||||
LLUIColor txt_color = LLUIColorTable::instance().getColor("White");
|
||||
LLUIColor name_color(txt_color);
|
||||
LLViewerChat::getChatColor(chat, txt_color, alpha);
|
||||
|
||||
LLViewerChat::getChatColor(chat,txt_color);
|
||||
LLFontGL* fontp = LLViewerChat::getChatFont();
|
||||
std::string font_name = LLFontGL::nameFromFont(fontp);
|
||||
std::string font_size = LLFontGL::sizeFromFont(fontp);
|
||||
|
|
@ -1310,6 +1311,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
|
|||
LLStyle::Params body_message_params;
|
||||
body_message_params.color(txt_color);
|
||||
body_message_params.readonly_color(txt_color);
|
||||
body_message_params.alpha(alpha);
|
||||
body_message_params.font.name(font_name);
|
||||
body_message_params.font.size(font_size);
|
||||
body_message_params.font.style(input_append_params.font.style);
|
||||
|
|
@ -1377,7 +1379,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
|
|||
{
|
||||
if (!message_from_log)
|
||||
{
|
||||
LLColor4 timestamp_color = LLUIColorTable::instance().getColor("ChatTimestampColor");
|
||||
LLUIColor timestamp_color = LLUIColorTable::instance().getColor("ChatTimestampColor");
|
||||
timestamp_style.color(timestamp_color);
|
||||
timestamp_style.readonly_color(timestamp_color);
|
||||
}
|
||||
|
|
@ -1414,7 +1416,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
|
|||
// set the link for the object name to be the objectim SLapp
|
||||
// (don't let object names with hyperlinks override our objectim Url)
|
||||
LLStyle::Params link_params(body_message_params);
|
||||
LLColor4 link_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
|
||||
LLUIColor link_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
|
||||
link_params.color = link_color;
|
||||
link_params.readonly_color = link_color;
|
||||
link_params.is_link = true;
|
||||
|
|
|
|||
|
|
@ -142,8 +142,8 @@ void LLFloaterIMNearbyChatToastPanel::addMessage(LLSD& notification)
|
|||
|
||||
std::string color_name = notification["text_color"].asString();
|
||||
|
||||
LLColor4 textColor = LLUIColorTable::instance().getColor(color_name);
|
||||
textColor.mV[VALPHA] = (F32)notification["color_alpha"].asReal();
|
||||
LLUIColor textColor = LLUIColorTable::instance().getColor(color_name);
|
||||
F32 textAlpha = (F32)notification["color_alpha"].asReal();
|
||||
|
||||
S32 font_size = notification["font_size"].asInteger();
|
||||
|
||||
|
|
@ -161,6 +161,7 @@ void LLFloaterIMNearbyChatToastPanel::addMessage(LLSD& notification)
|
|||
{
|
||||
LLStyle::Params style_params;
|
||||
style_params.color(textColor);
|
||||
style_params.alpha(textAlpha);
|
||||
std::string font_name = LLFontGL::nameFromFont(messageFont);
|
||||
std::string font_style_size = LLFontGL::sizeFromFont(messageFont);
|
||||
style_params.font.name(font_name);
|
||||
|
|
@ -205,8 +206,8 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification)
|
|||
|
||||
std::string color_name = notification["text_color"].asString();
|
||||
|
||||
LLColor4 textColor = LLUIColorTable::instance().getColor(color_name);
|
||||
textColor.mV[VALPHA] = (F32)notification["color_alpha"].asReal();
|
||||
LLUIColor textColor = LLUIColorTable::instance().getColor(color_name);
|
||||
F32 textAlpha = (F32)notification["color_alpha"].asReal();
|
||||
|
||||
S32 font_size = notification["font_size"].asInteger();
|
||||
|
||||
|
|
@ -238,14 +239,9 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification)
|
|||
if (mSourceType == CHAT_SOURCE_AGENT || mSourceType == CHAT_SOURCE_OBJECT)
|
||||
{
|
||||
LLStyle::Params style_params_name;
|
||||
|
||||
LLColor4 user_name_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
|
||||
style_params_name.color(user_name_color);
|
||||
|
||||
std::string font_name = LLFontGL::nameFromFont(messageFont);
|
||||
std::string font_style_size = LLFontGL::sizeFromFont(messageFont);
|
||||
style_params_name.font.name(font_name);
|
||||
style_params_name.font.size(font_style_size);
|
||||
style_params_name.color = LLUIColorTable::instance().getColor("HTMLLinkColor");
|
||||
style_params_name.font.name = LLFontGL::nameFromFont(messageFont);
|
||||
style_params_name.font.size = LLFontGL::sizeFromFont(messageFont);
|
||||
|
||||
// style_params_name.link_href = notification["sender_slurl"].asString();
|
||||
// style_params_name.is_link = true;
|
||||
|
|
@ -297,6 +293,7 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification)
|
|||
{
|
||||
LLStyle::Params style_params;
|
||||
style_params.color(textColor);
|
||||
style_params.alpha(textAlpha);
|
||||
std::string font_name = LLFontGL::nameFromFont(messageFont);
|
||||
std::string font_style_size = LLFontGL::sizeFromFont(messageFont);
|
||||
style_params.font.name(font_name);
|
||||
|
|
|
|||
|
|
@ -681,7 +681,7 @@ public:
|
|||
|
||||
Optional<bool> show_speaker;
|
||||
|
||||
Optional<LLColor4> avatar_icon_color;
|
||||
Optional<LLUIColor> avatar_icon_color;
|
||||
|
||||
Params();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -654,6 +654,7 @@ void LLConversationViewParticipant::draw()
|
|||
static LLUIColor sFlashBgColor = LLUIColorTable::instance().getColor("MenuItemFlashBgColor", DEFAULT_WHITE);
|
||||
static LLUIColor sFocusOutlineColor = LLUIColorTable::instance().getColor("InventoryFocusOutlineColor", DEFAULT_WHITE);
|
||||
static LLUIColor sMouseOverColor = LLUIColorTable::instance().getColor("InventoryMouseOverColor", DEFAULT_WHITE);
|
||||
static LLUIColor sFriendColor = LLUIColorTable::instance().getColor("ConversationFriendColor");
|
||||
|
||||
const bool show_context = (getRoot() ? getRoot()->getShowSelectionContext() : false);
|
||||
|
||||
|
|
@ -663,23 +664,23 @@ void LLConversationViewParticipant::draw()
|
|||
F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)mTextPad;
|
||||
F32 text_left = (F32)getLabelXPos();
|
||||
|
||||
LLColor4 color;
|
||||
LLUIColor* color;
|
||||
|
||||
LLLocalSpeakerMgr *speakerMgr = LLLocalSpeakerMgr::getInstance();
|
||||
|
||||
if (speakerMgr && speakerMgr->isSpeakerToBeRemoved(mUUID))
|
||||
{
|
||||
color = sFgDisabledColor;
|
||||
color = &sFgDisabledColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (LLAvatarActions::isFriend(mUUID))
|
||||
{
|
||||
color = LLUIColorTable::instance().getColor("ConversationFriendColor");
|
||||
color = &sFriendColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
color = mIsSelected ? sHighlightFgColor : sFgColor;
|
||||
color = mIsSelected ? &sHighlightFgColor : &sFgColor;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -690,7 +691,7 @@ void LLConversationViewParticipant::draw()
|
|||
}
|
||||
|
||||
drawHighlight(show_context, mIsSelected, sHighlightBgColor, sFlashBgColor, sFocusOutlineColor, sMouseOverColor);
|
||||
drawLabel(font, text_left, y, color, right_x);
|
||||
drawLabel(font, text_left, y, color->get(), right_x);
|
||||
|
||||
LLView::draw();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,12 +113,6 @@ LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, bool show
|
|||
|
||||
// create user interface for this picker
|
||||
createUI ();
|
||||
|
||||
if (!mCanApplyImmediately)
|
||||
{
|
||||
mApplyImmediateCheck->setEnabled(false);
|
||||
mApplyImmediateCheck->set(false);
|
||||
}
|
||||
}
|
||||
|
||||
LLFloaterColorPicker::~LLFloaterColorPicker()
|
||||
|
|
@ -229,6 +223,12 @@ bool LLFloaterColorPicker::postBuild()
|
|||
mApplyImmediateCheck->set(gSavedSettings.getBOOL("ApplyColorImmediately"));
|
||||
mApplyImmediateCheck->setCommitCallback(onImmediateCheck, this);
|
||||
|
||||
if (!mCanApplyImmediately)
|
||||
{
|
||||
mApplyImmediateCheck->setEnabled(false);
|
||||
mApplyImmediateCheck->set(false);
|
||||
}
|
||||
|
||||
childSetCommitCallback("rspin", onTextCommit, (void*)this );
|
||||
childSetCommitCallback("gspin", onTextCommit, (void*)this );
|
||||
childSetCommitCallback("bspin", onTextCommit, (void*)this );
|
||||
|
|
|
|||
|
|
@ -210,8 +210,7 @@ public:
|
|||
F32 centerY = 0.5f * clientHeight;
|
||||
drawIcon(centerX, centerY - 1, iconWidth);
|
||||
|
||||
static LLColor4 defaultColor(0.75f, 0.75f, 0.75f, 1.0f);
|
||||
static LLUIColor textColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", defaultColor);
|
||||
static LLUIColor textColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", LLColor4(0.75f, 0.75f, 0.75f, 1.0f));
|
||||
S32 max_pixels = clientWidth - iconWidth;
|
||||
drawName((F32)iconWidth, centerY, max_pixels, textColor.get());
|
||||
}
|
||||
|
|
@ -718,8 +717,7 @@ void LLFloaterEmojiPicker::fillEmojis(bool fromResize)
|
|||
LLPanel::Params icon_params;
|
||||
LLRect icon_rect(0, icon_size, icon_size, 0);
|
||||
|
||||
static LLColor4 default_color(0.75f, 0.75f, 0.75f, 1.0f);
|
||||
LLColor4 bg_color = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", default_color);
|
||||
static LLUIColor bg_color = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", LLColor4(0.75f, 0.75f, 0.75f, 1.0f));
|
||||
|
||||
if (!mSelectedGroupIndex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -642,15 +642,14 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
|
|||
// <FS:Ansariel> Script debug icon
|
||||
//if (gSavedSettings.getS32("ShowScriptErrorsLocation") == 1)// show error in window //("ScriptErrorsAsChat"))
|
||||
{
|
||||
|
||||
// <FS:Kadah> [FSllOwnerSayToScriptDebugWindow]
|
||||
// LLColor4 txt_color;
|
||||
|
||||
// LLViewerChat::getChatColor(chat_msg,txt_color);
|
||||
//LLUIColor txt_color;
|
||||
//F32 alpha = 1.f;
|
||||
//LLViewerChat::getChatColor(chat_msg, txt_color, alpha);
|
||||
|
||||
// LLFloaterScriptDebug::addScriptLine(chat_msg.mText,
|
||||
// chat_msg.mFromName,
|
||||
// txt_color,
|
||||
// txt_color % alpha,
|
||||
// chat_msg.mFromID);
|
||||
LLFloaterScriptDebug::addScriptLine(chat_msg);
|
||||
// <FS:Ansariel> Script debug icon
|
||||
|
|
|
|||
|
|
@ -64,8 +64,6 @@ bool LLFloaterScriptEdPrefs::postBuild()
|
|||
void LLFloaterScriptEdPrefs::applyUIColor(LLUICtrl* ctrl, const LLSD& param)
|
||||
{
|
||||
LLUIColorTable::instance().setColor(param.asString(), LLColor4(ctrl->getValue()));
|
||||
mEditor->initKeywords();
|
||||
mEditor->loadKeywords();
|
||||
|
||||
// <FS:Ansariel> FIRE-16740: Color syntax highlighting changes don't immediately appear in script window
|
||||
// This will return both LLPreviewLSL as well as LLLiveLSLEditor instances because they are grouped into "preview_script"!
|
||||
|
|
|
|||
|
|
@ -0,0 +1,334 @@
|
|||
/**
|
||||
* @file llfloatersettingscolor.cpp
|
||||
* @brief Implementation of LLFloaterSettingsColor
|
||||
* @author Rye Cogtail<rye@alchemyviewer.org>
|
||||
*
|
||||
* $LicenseInfo:firstyear=2024&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2024, 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 "llfloatersettingscolor.h"
|
||||
|
||||
#include "llfloater.h"
|
||||
#include "llfiltereditor.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llspinctrl.h"
|
||||
#include "llcolorswatch.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "lltexteditor.h"
|
||||
|
||||
|
||||
LLFloaterSettingsColor::LLFloaterSettingsColor(const LLSD& key)
|
||||
: LLFloater(key),
|
||||
mSettingList(NULL)
|
||||
{
|
||||
mCommitCallbackRegistrar.add("CommitSettings", boost::bind(&LLFloaterSettingsColor::onCommitSettings, this));
|
||||
mCommitCallbackRegistrar.add("ClickDefault", boost::bind(&LLFloaterSettingsColor::onClickDefault, this));
|
||||
}
|
||||
|
||||
LLFloaterSettingsColor::~LLFloaterSettingsColor()
|
||||
{}
|
||||
|
||||
bool LLFloaterSettingsColor::postBuild()
|
||||
{
|
||||
enableResizeCtrls(true, false, true);
|
||||
|
||||
mAlphaSpinner = getChild<LLSpinCtrl>("alpha_spinner");
|
||||
mColorSwatch = getChild<LLColorSwatchCtrl>("color_swatch");
|
||||
|
||||
mDefaultButton = getChild<LLUICtrl>("default_btn");
|
||||
mSettingNameText = getChild<LLTextBox>("color_name_txt");
|
||||
|
||||
getChild<LLFilterEditor>("filter_input")->setCommitCallback(boost::bind(&LLFloaterSettingsColor::setSearchFilter, this, _2));
|
||||
|
||||
mSettingList = getChild<LLScrollListCtrl>("setting_list");
|
||||
mSettingList->setCommitOnSelectionChange(true);
|
||||
mSettingList->setCommitCallback(boost::bind(&LLFloaterSettingsColor::onSettingSelect, this));
|
||||
|
||||
updateList();
|
||||
|
||||
gSavedSettings.getControl("ColorSettingsHideDefault")->getCommitSignal()->connect(boost::bind(&LLFloaterSettingsColor::updateList, this, false));
|
||||
|
||||
return LLFloater::postBuild();
|
||||
}
|
||||
|
||||
void LLFloaterSettingsColor::draw()
|
||||
{
|
||||
LLScrollListItem* first_selected = mSettingList->getFirstSelected();
|
||||
if (first_selected)
|
||||
{
|
||||
if(auto cell = first_selected->getColumn(1))
|
||||
{
|
||||
updateControl(cell->getValue().asString());
|
||||
}
|
||||
}
|
||||
|
||||
LLFloater::draw();
|
||||
}
|
||||
|
||||
void LLFloaterSettingsColor::onCommitSettings()
|
||||
{
|
||||
LLScrollListItem* first_selected = mSettingList->getFirstSelected();
|
||||
if (!first_selected)
|
||||
{
|
||||
return;
|
||||
}
|
||||
auto cell = first_selected->getColumn(1);
|
||||
|
||||
if (!cell)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
auto color_name = cell->getValue().asString();
|
||||
if (color_name.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLColor4 col4;
|
||||
LLColor3 col3;
|
||||
col3.setValue(mColorSwatch->getValue());
|
||||
col4 = LLColor4(col3, (F32)mAlphaSpinner->getValue().asReal());
|
||||
LLUIColorTable::instance().setColor(color_name, col4);
|
||||
|
||||
updateDefaultColumn(color_name);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterSettingsColor::onClickDefault()
|
||||
{
|
||||
LLScrollListItem* first_selected = mSettingList->getFirstSelected();
|
||||
if (first_selected)
|
||||
{
|
||||
auto cell = first_selected->getColumn(1);
|
||||
if (cell)
|
||||
{
|
||||
auto name = cell->getValue().asString();
|
||||
LLUIColorTable::instance().resetToDefault(name);
|
||||
updateDefaultColumn(name);
|
||||
updateControl(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// we've switched controls, or doing per-frame update, so update spinners, etc.
|
||||
void LLFloaterSettingsColor::updateControl(const std::string& color_name)
|
||||
{
|
||||
hideUIControls();
|
||||
|
||||
if (!isSettingHidden(color_name))
|
||||
{
|
||||
mDefaultButton->setVisible(true);
|
||||
mSettingNameText->setVisible(true);
|
||||
mSettingNameText->setText(color_name);
|
||||
mSettingNameText->setToolTip(color_name);
|
||||
|
||||
LLColor4 clr = LLUIColorTable::instance().getColor(color_name);
|
||||
mColorSwatch->setVisible(true);
|
||||
// only set if changed so color picker doesn't update
|
||||
if (clr != LLColor4(mColorSwatch->getValue()))
|
||||
{
|
||||
mColorSwatch->setOriginal(clr);
|
||||
}
|
||||
mAlphaSpinner->setVisible(true);
|
||||
mAlphaSpinner->setLabel(std::string("Alpha"));
|
||||
if (!mAlphaSpinner->hasFocus())
|
||||
{
|
||||
mAlphaSpinner->setPrecision(3);
|
||||
mAlphaSpinner->setMinValue(0.0);
|
||||
mAlphaSpinner->setMaxValue(1.f);
|
||||
mAlphaSpinner->setValue(clr.mV[VALPHA]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void LLFloaterSettingsColor::updateList(bool skip_selection)
|
||||
{
|
||||
std::string last_selected;
|
||||
LLScrollListItem* item = mSettingList->getFirstSelected();
|
||||
if (item)
|
||||
{
|
||||
LLScrollListCell* cell = item->getColumn(1);
|
||||
if (cell)
|
||||
{
|
||||
last_selected = cell->getValue().asString();
|
||||
}
|
||||
}
|
||||
|
||||
mSettingList->deleteAllItems();
|
||||
|
||||
const auto& base_colors = LLUIColorTable::instance().getLoadedColors();
|
||||
for (const auto& pair : base_colors)
|
||||
{
|
||||
const auto& name = pair.first;
|
||||
if (matchesSearchFilter(name) && !isSettingHidden(name))
|
||||
{
|
||||
LLSD row;
|
||||
|
||||
row["columns"][0]["column"] = "changed_color";
|
||||
row["columns"][0]["value"] = LLUIColorTable::instance().isDefault(name) ? "" : "*";
|
||||
|
||||
row["columns"][1]["column"] = "color";
|
||||
row["columns"][1]["value"] = name;
|
||||
|
||||
LLScrollListItem* item = mSettingList->addElement(row, ADD_BOTTOM, nullptr);
|
||||
if (!mSearchFilter.empty() && (last_selected == name) && !skip_selection)
|
||||
{
|
||||
std::string lower_name(name);
|
||||
LLStringUtil::toLower(lower_name);
|
||||
if (LLStringUtil::startsWith(lower_name, mSearchFilter))
|
||||
{
|
||||
item->setSelected(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto& pair : LLUIColorTable::instance().getUserColors())
|
||||
{
|
||||
const auto& name = pair.first;
|
||||
if (base_colors.find(name) == base_colors.end() && matchesSearchFilter(name) && !isSettingHidden(name))
|
||||
{
|
||||
LLSD row;
|
||||
|
||||
row["columns"][0]["column"] = "changed_color";
|
||||
row["columns"][0]["value"] = LLUIColorTable::instance().isDefault(name) ? "" : "*";
|
||||
|
||||
row["columns"][1]["column"] = "color";
|
||||
row["columns"][1]["value"] = name;
|
||||
|
||||
LLScrollListItem* item = mSettingList->addElement(row, ADD_BOTTOM, nullptr);
|
||||
if (!mSearchFilter.empty() && (last_selected == name) && !skip_selection)
|
||||
{
|
||||
std::string lower_name(name);
|
||||
LLStringUtil::toLower(lower_name);
|
||||
if (LLStringUtil::startsWith(lower_name, mSearchFilter))
|
||||
{
|
||||
item->setSelected(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mSettingList->updateSort();
|
||||
|
||||
if (!mSettingList->isEmpty())
|
||||
{
|
||||
if (mSettingList->hasSelectedItem())
|
||||
{
|
||||
mSettingList->scrollToShowSelected();
|
||||
}
|
||||
else if (!mSettingList->hasSelectedItem() && !mSearchFilter.empty() && !skip_selection)
|
||||
{
|
||||
if (!mSettingList->selectItemByPrefix(mSearchFilter, false, 1))
|
||||
{
|
||||
mSettingList->selectFirstItem();
|
||||
}
|
||||
mSettingList->scrollToShowSelected();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LLSD row;
|
||||
|
||||
row["columns"][0]["column"] = "changed_color";
|
||||
row["columns"][0]["value"] = "";
|
||||
row["columns"][1]["column"] = "color";
|
||||
row["columns"][1]["value"] = "No matching colors.";
|
||||
|
||||
mSettingList->addElement(row);
|
||||
hideUIControls();
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterSettingsColor::onSettingSelect()
|
||||
{
|
||||
LLScrollListItem* first_selected = mSettingList->getFirstSelected();
|
||||
if (first_selected)
|
||||
{
|
||||
auto cell = first_selected->getColumn(1);
|
||||
if (cell)
|
||||
{
|
||||
updateControl(cell->getValue().asString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterSettingsColor::setSearchFilter(const std::string& filter)
|
||||
{
|
||||
if(mSearchFilter == filter)
|
||||
return;
|
||||
mSearchFilter = filter;
|
||||
LLStringUtil::toLower(mSearchFilter);
|
||||
updateList();
|
||||
}
|
||||
|
||||
bool LLFloaterSettingsColor::matchesSearchFilter(std::string setting_name)
|
||||
{
|
||||
// If the search filter is empty, everything passes.
|
||||
if (mSearchFilter.empty()) return true;
|
||||
|
||||
LLStringUtil::toLower(setting_name);
|
||||
std::string::size_type match_name = setting_name.find(mSearchFilter);
|
||||
|
||||
return (std::string::npos != match_name);
|
||||
}
|
||||
|
||||
bool LLFloaterSettingsColor::isSettingHidden(const std::string& color_name)
|
||||
{
|
||||
static LLCachedControl<bool> hide_default(gSavedSettings, "ColorSettingsHideDefault", false);
|
||||
return hide_default && LLUIColorTable::instance().isDefault(color_name);
|
||||
}
|
||||
|
||||
void LLFloaterSettingsColor::updateDefaultColumn(const std::string& color_name)
|
||||
{
|
||||
if (isSettingHidden(color_name))
|
||||
{
|
||||
hideUIControls();
|
||||
updateList(true);
|
||||
return;
|
||||
}
|
||||
|
||||
LLScrollListItem* item = mSettingList->getFirstSelected();
|
||||
if (item)
|
||||
{
|
||||
LLScrollListCell* cell = item->getColumn(0);
|
||||
if (cell)
|
||||
{
|
||||
std::string is_default = LLUIColorTable::instance().isDefault(color_name) ? "" : "*";
|
||||
cell->setValue(is_default);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterSettingsColor::hideUIControls()
|
||||
{
|
||||
mColorSwatch->setVisible(false);
|
||||
mAlphaSpinner->setVisible(false);
|
||||
mDefaultButton->setVisible(false);
|
||||
mSettingNameText->setVisible(false);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
/**
|
||||
* @file llfloatersettingscolor.h
|
||||
* @brief Header file for LLFloaterSettingsColor
|
||||
* @author Rye Cogtail<rye@alchemyviewer.org>
|
||||
*
|
||||
* $LicenseInfo:firstyear=2024&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2024, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LLFLOATERCOLORSETTINGS_H
|
||||
#define LLFLOATERCOLORSETTINGS_H
|
||||
|
||||
#include "llcontrol.h"
|
||||
#include "llfloater.h"
|
||||
|
||||
class LLColorSwatchCtrl;
|
||||
class LLScrollListCtrl;
|
||||
class LLSpinCtrl;
|
||||
class LLTextBox;
|
||||
|
||||
class LLFloaterSettingsColor final
|
||||
: public LLFloater
|
||||
{
|
||||
friend class LLFloaterReg;
|
||||
|
||||
public:
|
||||
|
||||
bool postBuild() override;
|
||||
void draw() override;
|
||||
|
||||
void updateControl(const std::string& color_name);
|
||||
|
||||
void onCommitSettings();
|
||||
void onClickDefault();
|
||||
|
||||
bool matchesSearchFilter(std::string setting_name);
|
||||
bool isSettingHidden(const std::string& color_name);
|
||||
|
||||
private:
|
||||
LLFloaterSettingsColor(const LLSD& key);
|
||||
virtual ~LLFloaterSettingsColor();
|
||||
|
||||
void updateList(bool skip_selection = false);
|
||||
void onSettingSelect();
|
||||
void setSearchFilter(const std::string& filter);
|
||||
|
||||
void updateDefaultColumn(const std::string& color_name);
|
||||
void hideUIControls();
|
||||
|
||||
LLScrollListCtrl* mSettingList;
|
||||
|
||||
protected:
|
||||
LLUICtrl* mDefaultButton = nullptr;
|
||||
LLTextBox* mSettingNameText = nullptr;
|
||||
|
||||
LLSpinCtrl* mAlphaSpinner = nullptr;
|
||||
LLColorSwatchCtrl* mColorSwatch = nullptr;
|
||||
|
||||
std::string mSearchFilter;
|
||||
};
|
||||
|
||||
#endif //LLFLOATERCOLORSETTINGS_H
|
||||
|
||||
|
|
@ -279,15 +279,11 @@ void LLHUDNameTag::renderText(bool for_select)
|
|||
mOffsetY = lltrunc(mHeight * ((mVertAlignment == ALIGN_VERT_CENTER) ? 0.5f : 1.f));
|
||||
|
||||
// *TODO: make this a per-text setting
|
||||
//LLColor4 bg_color = LLUIColorTable::instance().getColor("NameTagBackground");
|
||||
//bg_color.setAlpha(gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor);
|
||||
|
||||
static LLUIColor s_bg_color = LLUIColorTable::instance().getColor("NameTagBackground");
|
||||
static LLCachedControl<F32> chatBubbleOpacity(gSavedSettings, "ChatBubbleOpacity");
|
||||
LLColor4 bg_color = s_bg_color.get();
|
||||
F32 color_alpha = chatBubbleOpacity * alpha_factor;
|
||||
static LLCachedControl<F32> bubble_opacity(gSavedSettings, "ChatBubbleOpacity");
|
||||
static LLUIColor nametag_bg_color = LLUIColorTable::instance().getColor("NameTagBackground");
|
||||
F32 color_alpha = bubble_opacity * alpha_factor;
|
||||
LLColor4 bg_color = nametag_bg_color;
|
||||
bg_color.setAlpha(color_alpha);
|
||||
// </FS:Ansariel>
|
||||
|
||||
// scale screen size of borders down
|
||||
//RN: for now, text on hud objects is never occluded
|
||||
|
|
@ -350,8 +346,7 @@ void LLHUDNameTag::renderText(bool for_select)
|
|||
x_offset = -0.5f * mWidth + (HORIZONTAL_PADDING / 2.f);
|
||||
}
|
||||
|
||||
LLColor4 label_color(0.f, 0.f, 0.f, 1.f);
|
||||
label_color.mV[VALPHA] = alpha_factor;
|
||||
LLColor4 label_color(0.f, 0.f, 0.f, alpha_factor);
|
||||
hud_render_text(segment_iter->getText(), render_position, *fontp, segment_iter->mStyle, LLFontGL::NO_SHADOW, x_offset, y_offset, label_color, false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -148,14 +148,10 @@ void LLHUDText::renderText()
|
|||
mOffsetY = lltrunc(mHeight * ((mVertAlignment == ALIGN_VERT_CENTER) ? 0.5f : 1.f));
|
||||
|
||||
// *TODO: make this a per-text setting
|
||||
// <FS:Ansariel> Performance improvement
|
||||
//LLColor4 bg_color = LLUIColorTable::instance().getColor("ObjectBubbleColor");
|
||||
//bg_color.setAlpha(gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor);
|
||||
static LLUIColor s_bg_color = LLUIColorTable::instance().getColor("ObjectBubbleColor");
|
||||
static LLCachedControl<F32> chatBubbleOpacity(gSavedSettings, "ChatBubbleOpacity");
|
||||
LLColor4 bg_color = s_bg_color.get();
|
||||
bg_color.setAlpha(chatBubbleOpacity * alpha_factor);
|
||||
// </FS:Ansariel>
|
||||
static LLCachedControl<F32> bubble_opacity(gSavedSettings, "ChatBubbleOpacity");
|
||||
static LLUIColor nametag_bg_color = LLUIColorTable::instance().getColor("ObjectBubbleColor");
|
||||
LLColor4 bg_color = nametag_bg_color;
|
||||
bg_color.setAlpha(bubble_opacity * alpha_factor);
|
||||
|
||||
const S32 border_height = 16;
|
||||
const S32 border_width = 16;
|
||||
|
|
|
|||
|
|
@ -2887,11 +2887,13 @@ void LLInventoryGalleryItem::draw()
|
|||
LLPanel::draw();
|
||||
|
||||
// Draw border
|
||||
LLUIColor border_color = LLUIColorTable::instance().getColor(mSelected ? "MenuItemHighlightBgColor" : "TextFgTentativeColor", LLColor4::white);
|
||||
static LLUIColor menu_highlighted_color = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", LLColor4::white);;
|
||||
static LLUIColor text_fg_tentative_color = LLUIColorTable::instance().getColor("TextFgTentativeColor", LLColor4::white);;
|
||||
const LLColor4& border_color = mSelected ? menu_highlighted_color : text_fg_tentative_color;
|
||||
LLRect border = mThumbnailCtrl->getRect();
|
||||
border.mRight = border.mRight + 1;
|
||||
border.mTop = border.mTop + 1;
|
||||
gl_rect_2d(border, border_color.get(), false);
|
||||
gl_rect_2d(border, border_color, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -652,9 +652,9 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string
|
|||
|
||||
LLColor4 LLManip::setupSnapGuideRenderPass(S32 pass)
|
||||
{
|
||||
static LLColor4 grid_color_fg = LLUIColorTable::instance().getColor("GridlineColor");
|
||||
static LLColor4 grid_color_bg = LLUIColorTable::instance().getColor("GridlineBGColor");
|
||||
static LLColor4 grid_color_shadow = LLUIColorTable::instance().getColor("GridlineShadowColor");
|
||||
static LLUIColor grid_color_fg = LLUIColorTable::instance().getColor("GridlineColor");
|
||||
static LLUIColor grid_color_bg = LLUIColorTable::instance().getColor("GridlineBGColor");
|
||||
static LLUIColor grid_color_shadow = LLUIColorTable::instance().getColor("GridlineShadowColor");
|
||||
|
||||
LLColor4 line_color;
|
||||
F32 line_alpha = gSavedSettings.getF32("GridOpacity");
|
||||
|
|
|
|||
|
|
@ -283,9 +283,10 @@ void LLHandlerUtil::logToNearbyChat(const LLNotificationPtr& notification, EChat
|
|||
// Ansariel: Also log to console if enabled
|
||||
if (gSavedSettings.getBOOL("FSUseNearbyChatConsole"))
|
||||
{
|
||||
LLColor4 chatcolor;
|
||||
LLViewerChat::getChatColor(chat_msg, chatcolor);
|
||||
gConsole->addConsoleLine(chat_msg.mText, chatcolor);
|
||||
F32 alpha = 1.f;
|
||||
LLUIColor chatcolor;
|
||||
LLViewerChat::getChatColor(chat_msg, chatcolor, alpha);
|
||||
gConsole->addConsoleLine(chat_msg.mText, chatcolor % alpha);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1020,8 +1020,8 @@ void LLOutfitGalleryItem::setOutfitWorn(bool value)
|
|||
LLStringUtil::format_map_t worn_string_args;
|
||||
std::string worn_string = getString("worn_string", worn_string_args);
|
||||
LLUIColor text_color = LLUIColorTable::instance().getColor("White", LLColor4::white);
|
||||
mOutfitWornText->setReadOnlyColor(text_color.get());
|
||||
mOutfitNameText->setReadOnlyColor(text_color.get());
|
||||
mOutfitWornText->setReadOnlyColor(text_color);
|
||||
mOutfitNameText->setReadOnlyColor(text_color);
|
||||
mOutfitWornText->setFont(value ? LLFontGL::getFontSansSerifBold() : LLFontGL::getFontSansSerifSmall());
|
||||
mOutfitNameText->setFont(value ? LLFontGL::getFontSansSerifBold() : LLFontGL::getFontSansSerifSmall());
|
||||
mOutfitWornText->setValue(value ? worn_string : "");
|
||||
|
|
|
|||
|
|
@ -468,7 +468,7 @@ void LLPanelPermissions::refresh()
|
|||
|
||||
// // Style for creator and owner links (both group and agent)
|
||||
// LLStyle::Params style_params;
|
||||
// LLColor4 link_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
|
||||
// LLUIColor link_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
|
||||
// style_params.color = link_color;
|
||||
// style_params.readonly_color = link_color;
|
||||
// style_params.is_link = true; // link will be added later
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ void LLScriptEditor::drawLineNumbers()
|
|||
const LLWString ltext = utf8str_to_wstring(llformat("%d", line.mLineNum ));
|
||||
bool is_cur_line = cursor_line == line.mLineNum;
|
||||
const U8 style = is_cur_line ? LLFontGL::BOLD : LLFontGL::NORMAL;
|
||||
const LLColor4 fg_color = is_cur_line ? mCursorColor : mReadOnlyFgColor;
|
||||
const LLColor4& fg_color = is_cur_line ? mCursorColor : mReadOnlyFgColor;
|
||||
getFont()->render(
|
||||
ltext, // string to draw
|
||||
0, // begin offset
|
||||
|
|
@ -187,7 +187,7 @@ void LLScriptEditor::loadKeywords(const std::string& filename,
|
|||
for (size_t i = 0; i < count; i++)
|
||||
{
|
||||
std::string name = utf8str_trim(funcs[i]);
|
||||
mKeywords.addToken(LLKeywordToken::TT_WORD, name, color, tooltips[i] );
|
||||
mKeywords.addToken(LLKeywordToken::TT_WORD, name, LLUIColor(color), tooltips[i] );
|
||||
}
|
||||
segment_vec_t segment_list;
|
||||
LLStyleConstSP style = new LLStyle(LLStyle::Params().font(getFont()).color(mDefaultColor.get()));
|
||||
|
|
|
|||
|
|
@ -146,12 +146,12 @@ F32 LLSelectMgr::sHighlightAlpha = 0.f;
|
|||
F32 LLSelectMgr::sHighlightAlphaTest = 0.f;
|
||||
F32 LLSelectMgr::sHighlightUAnim = 0.f;
|
||||
F32 LLSelectMgr::sHighlightVAnim = 0.f;
|
||||
LLColor4 LLSelectMgr::sSilhouetteParentColor;
|
||||
LLColor4 LLSelectMgr::sSilhouetteChildColor;
|
||||
LLColor4 LLSelectMgr::sHighlightInspectColor;
|
||||
LLColor4 LLSelectMgr::sHighlightParentColor;
|
||||
LLColor4 LLSelectMgr::sHighlightChildColor;
|
||||
LLColor4 LLSelectMgr::sContextSilhouetteColor;
|
||||
LLUIColor LLSelectMgr::sSilhouetteParentColor;
|
||||
LLUIColor LLSelectMgr::sSilhouetteChildColor;
|
||||
LLUIColor LLSelectMgr::sHighlightInspectColor;
|
||||
LLUIColor LLSelectMgr::sHighlightParentColor;
|
||||
LLUIColor LLSelectMgr::sHighlightChildColor;
|
||||
LLUIColor LLSelectMgr::sContextSilhouetteColor;
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// struct LLDeRezInfo
|
||||
|
|
@ -6705,8 +6705,10 @@ void LLSelectMgr::renderSilhouettes(bool for_hud)
|
|||
bool wireframe_selection = (gFloaterTools && gFloaterTools->getVisible()) || LLSelectMgr::sRenderHiddenSelections;
|
||||
F32 fogCfx = (F32)llclamp((getSelectionCenterGlobal() - gAgentCamera.getCameraPositionGlobal()).magVec() / (getBBoxOfSelection().getExtentLocal().magVec() * 4), 0.0, 1.0); // <FS:Ansariel> Performance improvement
|
||||
|
||||
static LLColor4 sParentColor = LLColor4(sSilhouetteParentColor[VRED], sSilhouetteParentColor[VGREEN], sSilhouetteParentColor[VBLUE], LLSelectMgr::sHighlightAlpha);
|
||||
static LLColor4 sChildColor = LLColor4(sSilhouetteChildColor[VRED], sSilhouetteChildColor[VGREEN], sSilhouetteChildColor[VBLUE], LLSelectMgr::sHighlightAlpha);
|
||||
LLColor4 sParentColor = sSilhouetteParentColor;
|
||||
sParentColor.mV[VALPHA] = LLSelectMgr::sHighlightAlpha;
|
||||
LLColor4 sChildColor = sSilhouetteChildColor;
|
||||
sChildColor.mV[VALPHA] = LLSelectMgr::sHighlightAlpha;
|
||||
|
||||
auto renderMeshSelection_f = [fogCfx, wireframe_selection](LLSelectNode* node, LLViewerObject* objectp, LLColor4 hlColor)
|
||||
{
|
||||
|
|
@ -8350,12 +8352,9 @@ S32 LLObjectSelection::getSelectedObjectRenderCost()
|
|||
cost += object->getRenderCost(textures);
|
||||
computed_objects.insert(object->getID());
|
||||
|
||||
const_child_list_t children = object->getChildren();
|
||||
for (const_child_list_t::const_iterator child_iter = children.begin();
|
||||
child_iter != children.end();
|
||||
++child_iter)
|
||||
const const_child_list_t& children = object->getChildren();
|
||||
for (LLViewerObject* child_obj : children)
|
||||
{
|
||||
LLViewerObject* child_obj = *child_iter;
|
||||
LLVOVolume *child = dynamic_cast<LLVOVolume*>( child_obj );
|
||||
if (child)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
#include "llcontrol.h"
|
||||
#include "llviewerobject.h" // LLObjectSelection::getSelectedTEValue template
|
||||
#include "llmaterial.h"
|
||||
#include "lluicolor.h"
|
||||
|
||||
#include <deque>
|
||||
#include <boost/iterator/filter_iterator.hpp>
|
||||
|
|
@ -517,12 +518,12 @@ public:
|
|||
static F32 sHighlightAlphaTest;
|
||||
static F32 sHighlightUAnim;
|
||||
static F32 sHighlightVAnim;
|
||||
static LLColor4 sSilhouetteParentColor;
|
||||
static LLColor4 sSilhouetteChildColor;
|
||||
static LLColor4 sHighlightParentColor;
|
||||
static LLColor4 sHighlightChildColor;
|
||||
static LLColor4 sHighlightInspectColor;
|
||||
static LLColor4 sContextSilhouetteColor;
|
||||
static LLUIColor sSilhouetteParentColor;
|
||||
static LLUIColor sSilhouetteChildColor;
|
||||
static LLUIColor sHighlightParentColor;
|
||||
static LLUIColor sHighlightChildColor;
|
||||
static LLUIColor sHighlightInspectColor;
|
||||
static LLUIColor sContextSilhouetteColor;
|
||||
|
||||
LLCachedControl<bool> mHideSelectedObjects;
|
||||
LLCachedControl<bool> mRenderHighlightSelections;
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
|
|||
|
||||
// Style for creator and owner links
|
||||
LLStyle::Params style_params;
|
||||
LLColor4 link_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
|
||||
LLUIColor link_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
|
||||
style_params.color = link_color;
|
||||
style_params.readonly_color = link_color;
|
||||
style_params.is_link = true; // link will be added later
|
||||
|
|
|
|||
|
|
@ -374,8 +374,8 @@ void LLSpeakerMgr::update(bool resort_ok)
|
|||
return;
|
||||
}
|
||||
|
||||
LLColor4 speaking_color = LLUIColorTable::instance().getColor("SpeakingColor");
|
||||
LLColor4 overdriven_color = LLUIColorTable::instance().getColor("OverdrivenColor");
|
||||
static const LLUIColor speaking_color = LLUIColorTable::instance().getColor("SpeakingColor");
|
||||
static const LLUIColor overdriven_color = LLUIColorTable::instance().getColor("OverdrivenColor");
|
||||
|
||||
if(resort_ok) // only allow list changes when user is not interacting with it
|
||||
{
|
||||
|
|
|
|||
|
|
@ -472,6 +472,7 @@ private:
|
|||
// Locks: Mw (ctor invokes without lock)
|
||||
void setDesiredDiscard(S32 discard, S32 size);
|
||||
|
||||
// <FS:Ansariel> OpenSim compatibility
|
||||
// Threads: T*
|
||||
// Locks: Mw
|
||||
bool insertPacket(S32 index, U8* data, S32 size);
|
||||
|
|
@ -479,7 +480,6 @@ private:
|
|||
// Locks: Mw
|
||||
void clearPackets();
|
||||
|
||||
// <FS:Ansariel> OpenSim compatibility
|
||||
// Locks: Mw
|
||||
void setupPacketData();
|
||||
// </FS:Ansariel>
|
||||
|
|
@ -608,6 +608,7 @@ private:
|
|||
|
||||
// Work Data
|
||||
LLMutex mWorkMutex;
|
||||
// <FS:Ansariel> OpenSim compatibility
|
||||
struct PacketData
|
||||
{
|
||||
PacketData(U8* data, S32 size)
|
||||
|
|
@ -623,6 +624,7 @@ private:
|
|||
S32 mFirstPacket;
|
||||
S32 mLastPacket;
|
||||
U16 mTotalPackets;
|
||||
// </FS:Ansariel>
|
||||
U8 mImageCodec;
|
||||
|
||||
LLViewerAssetStats::duration_t mMetricsStartTime;
|
||||
|
|
@ -939,9 +941,11 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,
|
|||
mRetryAttempt(0),
|
||||
mActiveCount(0),
|
||||
mWorkMutex(),
|
||||
// <FS:Ansariel> OpenSim compatibility
|
||||
mFirstPacket(0),
|
||||
mLastPacket(-1),
|
||||
mTotalPackets(0),
|
||||
// </FS:Ansariel>
|
||||
mImageCodec(IMG_CODEC_INVALID),
|
||||
mMetricsStartTime(0),
|
||||
mHttpHandle(LLCORE_HTTP_HANDLE_INVALID),
|
||||
|
|
@ -1000,7 +1004,7 @@ LLTextureFetchWorker::~LLTextureFetchWorker()
|
|||
mFetcher->mTextureCache->writeComplete(mCacheWriteHandle, true);
|
||||
}
|
||||
mFormattedImage = NULL;
|
||||
clearPackets();
|
||||
clearPackets(); // <FS:Ansariel> OpenSim compatibility
|
||||
if (mHttpBufferArray)
|
||||
{
|
||||
mHttpBufferArray->release();
|
||||
|
|
@ -1012,6 +1016,7 @@ LLTextureFetchWorker::~LLTextureFetchWorker()
|
|||
mFetcher->updateStateStats(mCacheReadCount, mCacheWriteCount, mResourceWaitCount);
|
||||
}
|
||||
|
||||
// <FS:Ansariel> OpenSim compatibility
|
||||
// Locks: Mw
|
||||
void LLTextureFetchWorker::clearPackets()
|
||||
{
|
||||
|
|
@ -1022,7 +1027,6 @@ void LLTextureFetchWorker::clearPackets()
|
|||
mFirstPacket = 0;
|
||||
}
|
||||
|
||||
// <FS:Ansariel> OpenSim compatibility
|
||||
// Locks: Mw
|
||||
void LLTextureFetchWorker::setupPacketData()
|
||||
{
|
||||
|
|
@ -1235,7 +1239,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
|||
mHttpReplySize = 0;
|
||||
mHttpReplyOffset = 0;
|
||||
mHaveAllData = false;
|
||||
clearPackets(); // TODO: Shouldn't be necessary
|
||||
clearPackets(); // <FS:Ansariel> OpenSim compatibility
|
||||
mCacheReadHandle = LLTextureCache::nullHandle();
|
||||
mCacheWriteHandle = LLTextureCache::nullHandle();
|
||||
setState(LOAD_FROM_TEXTURE_CACHE);
|
||||
|
|
@ -2666,8 +2670,8 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, bool threaded, bool qa_mod
|
|||
: LLWorkerThread("TextureFetch", threaded, true),
|
||||
mDebugCount(0),
|
||||
mDebugPause(false),
|
||||
mPacketCount(0),
|
||||
mBadPacketCount(0),
|
||||
mPacketCount(0), // <FS:Ansariel> OpenSim compatibility
|
||||
mBadPacketCount(0), // <FS:Ansariel> OpenSim compatibility
|
||||
mQueueMutex(),
|
||||
mNetworkQueueMutex(),
|
||||
mTextureCache(cache),
|
||||
|
|
@ -3543,7 +3547,6 @@ void LLTextureFetch::sendRequestListToSimulators()
|
|||
}
|
||||
} // -Mfnq
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
@ -3581,6 +3584,7 @@ bool LLTextureFetchWorker::insertPacket(S32 index, U8* data, S32 size)
|
|||
}
|
||||
return true;
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
void LLTextureFetchWorker::setState(e_state new_state)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -314,8 +314,10 @@ public:
|
|||
LLUUID mDebugID;
|
||||
S32 mDebugCount;
|
||||
bool mDebugPause;
|
||||
// <FS:Ansariel> OpenSim compatibility
|
||||
S32 mPacketCount;
|
||||
S32 mBadPacketCount;
|
||||
// </FS:Ansariel>
|
||||
|
||||
static LLTrace::CountStatHandle<F64> sCacheHit;
|
||||
static LLTrace::CountStatHandle<F64> sCacheAttempt;
|
||||
|
|
|
|||
|
|
@ -328,13 +328,6 @@ void LLTextureBar::draw()
|
|||
|
||||
{
|
||||
LLGLSUIDefault gls_ui;
|
||||
// draw the packet data
|
||||
// {
|
||||
// std::string num_str = llformat("%3d/%3d", mImagep->mLastPacket+1, mImagep->mPackets);
|
||||
// LLFontGL::getFontMonospace()->renderUTF8(num_str, 0, bar_left + 100, getRect().getHeight(), color,
|
||||
// LLFontGL::LEFT, LLFontGL::TOP);
|
||||
// }
|
||||
|
||||
// draw the image size at the end
|
||||
{
|
||||
std::string num_str = llformat("%3dx%3d (%2d) %7d", mImagep->getWidth(), mImagep->getHeight(),
|
||||
|
|
@ -717,7 +710,6 @@ void LLGLTexMemBar::draw()
|
|||
// </FS:Ansariel>
|
||||
gTextureList.getNumImages(),
|
||||
LLAppViewer::getTextureFetch()->getNumRequests(), LLAppViewer::getTextureFetch()->getNumDeletes(),
|
||||
LLAppViewer::getTextureFetch()->mPacketCount, LLAppViewer::getTextureFetch()->mBadPacketCount,
|
||||
LLAppViewer::getTextureCache()->getNumReads(), LLAppViewer::getTextureCache()->getNumWrites(),
|
||||
LLLFSThread::sLocal->getPending(),
|
||||
LLImageRaw::sRawImageCount,
|
||||
|
|
|
|||
|
|
@ -668,7 +668,7 @@ void LLToolBarView::draw()
|
|||
// Draw drop zones if drop of a tool is active
|
||||
if (isToolDragged())
|
||||
{
|
||||
LLColor4 drop_color = LLUIColorTable::instance().getColor( "ToolbarDropZoneColor" );
|
||||
static const LLUIColor drop_color = LLUIColorTable::instance().getColor( "ToolbarDropZoneColor" );
|
||||
|
||||
for (S32 i = LLToolBarEnums::TOOLBAR_FIRST; i <= LLToolBarEnums::TOOLBAR_LAST; i++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@ LLViewerChat::font_change_signal_t LLViewerChat::sChatFontChangedSignal;
|
|||
|
||||
//static
|
||||
// <FS:Ansariel> Add additional options
|
||||
//void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color)
|
||||
//void LLViewerChat::getChatColor(const LLChat& chat, LLUIColor& r_color, F32& r_color_alpha)
|
||||
//{
|
||||
void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color, LLSD args)
|
||||
void LLViewerChat::getChatColor(const LLChat& chat, LLUIColor& r_color, F32& r_color_alpha, LLSD args)
|
||||
{
|
||||
const bool is_local = args.has("is_local") ? args["is_local"].asBoolean() : true;
|
||||
const bool for_console = args.has("for_console") && args["for_console"].asBoolean();
|
||||
|
|
@ -108,7 +108,10 @@ void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color, LLSD args
|
|||
// </FS:CR>
|
||||
|
||||
//color based on contact sets prefs
|
||||
LGGContactSets::getInstance()->hasFriendColorThatShouldShow(chat.mFromID, ContactSetType::CHAT, r_color);
|
||||
if (LLColor4 cscolor; LGGContactSets::getInstance()->hasFriendColorThatShouldShow(chat.mFromID, ContactSetType::CHAT, cscolor))
|
||||
{
|
||||
r_color = cscolor;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case CHAT_SOURCE_OBJECT:
|
||||
|
|
@ -134,7 +137,7 @@ void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color, LLSD args
|
|||
}
|
||||
break;
|
||||
default:
|
||||
r_color.setToWhite();
|
||||
r_color = LLUIColorTable::instance().getColor("White");
|
||||
}
|
||||
|
||||
// <FS:KC> Keyword alerts
|
||||
|
|
@ -142,7 +145,7 @@ void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color, LLSD args
|
|||
static LLCachedControl<bool> sFSKeywordChangeColor(gSavedPerAccountSettings, "FSKeywordChangeColor");
|
||||
if (sFSKeywordChangeColor && FSKeywords::getInstance()->chatContainsKeyword(chat, is_local))
|
||||
{
|
||||
r_color = sFSKeywordColor;
|
||||
r_color = sFSKeywordColor();
|
||||
}
|
||||
// </FS:KC>
|
||||
|
||||
|
|
@ -159,11 +162,15 @@ void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color, LLSD args
|
|||
{
|
||||
// diminish far-off chat
|
||||
// <FS:Ansariel> FIRE-3572: Customize local chat color brightness change based on distance
|
||||
//r_color.mV[VALPHA] = 0.8f;
|
||||
//r_color_alpha = 0.8f;
|
||||
static LLCachedControl<F32> fsBeyondNearbyChatColorDiminishFactor(gSavedSettings, "FSBeyondNearbyChatColorDiminishFactor", 0.8f);
|
||||
r_color.mV[VALPHA] = fsBeyondNearbyChatColorDiminishFactor();
|
||||
r_color_alpha = fsBeyondNearbyChatColorDiminishFactor();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
else
|
||||
{
|
||||
r_color_alpha = 1.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,8 +29,7 @@
|
|||
|
||||
#include "llchat.h"
|
||||
#include "llfontgl.h"
|
||||
#include "v4color.h"
|
||||
|
||||
#include "lluicolor.h"
|
||||
|
||||
class LLViewerChat
|
||||
{
|
||||
|
|
@ -38,8 +37,8 @@ public:
|
|||
typedef boost::signals2::signal<void (LLFontGL*)> font_change_signal_t;
|
||||
|
||||
// <FS:AO>
|
||||
//static void getChatColor(const LLChat& chat, LLColor4& r_color);
|
||||
static void getChatColor(const LLChat& chat, LLColor4& r_color, LLSD args = LLSD::emptyMap());
|
||||
//static void getChatColor(const LLChat& chat, LLUIColor& r_color, F32& r_color_alpha);
|
||||
static void getChatColor(const LLChat& chat, LLUIColor& r_color, F32& r_color_alpha, LLSD args = LLSD::emptyMap());
|
||||
// </FS:AO>
|
||||
static void getChatColor(const LLChat& chat, std::string& r_color_name, F32& r_color_alpha);
|
||||
static LLFontGL* getChatFont();
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@
|
|||
#include "llfloaterscriptlimits.h"
|
||||
#include "llfloatersearch.h"
|
||||
#include "llfloatersellland.h"
|
||||
#include "llfloatersettingscolor.h"
|
||||
#include "llfloatersettingsdebug.h"
|
||||
#include "llfloatersidepanelcontainer.h"
|
||||
#include "llfloatersnapshot.h"
|
||||
|
|
@ -579,6 +580,7 @@ void LLViewerFloaterReg::registerFloaters()
|
|||
LLFloaterReg::add("script_limits", "floater_script_limits.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptLimits>);
|
||||
LLFloaterReg::add("my_scripts", "floater_my_scripts.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMyScripts>);
|
||||
LLFloaterReg::add("sell_land", "floater_sell_land.xml", &LLFloaterSellLand::buildFloater);
|
||||
LLFloaterReg::add("settings_color", "floater_settings_color.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsColor>);
|
||||
LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsDebug>);
|
||||
LLFloaterReg::add("sound_devices", "floater_sound_devices.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundDevices>);
|
||||
// <FS:LO> Add ability for the statistics window to not be able to receive focus
|
||||
|
|
|
|||
|
|
@ -661,11 +661,9 @@ void init_menus()
|
|||
///
|
||||
/// set up the colors
|
||||
///
|
||||
LLColor4 color;
|
||||
|
||||
// do not set colors in code, let the skin decide. -Zi
|
||||
/*
|
||||
LLColor4 context_menu_color = LLUIColorTable::instance().getColor("MenuPopupBgColor");
|
||||
LLUIColor context_menu_color = LLUIColorTable::instance().getColor("MenuPopupBgColor");
|
||||
|
||||
gMenuAvatarSelf->setBackgroundColor( context_menu_color );
|
||||
gMenuAvatarOther->setBackgroundColor( context_menu_color );
|
||||
|
|
@ -675,7 +673,7 @@ void init_menus()
|
|||
|
||||
gMenuLand->setBackgroundColor( context_menu_color );
|
||||
|
||||
color = LLUIColorTable::instance().getColor( "MenuPopupBgColor" );
|
||||
LLUIColor color = LLUIColorTable::instance().getColor( "MenuPopupBgColor" );
|
||||
gPopupMenuView->setBackgroundColor( color );
|
||||
*/
|
||||
|
||||
|
|
@ -700,7 +698,7 @@ void init_menus()
|
|||
// ONLY change the color IF we are in beta. Otherwise leave it alone so it can use the skinned color. -Zi
|
||||
if(LLGridManager::getInstance()->isInSLBeta())
|
||||
{
|
||||
color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" );
|
||||
LLUIColor color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" );
|
||||
gMenuBarView->setBackgroundColor( color );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1959,26 +1959,23 @@ void LLViewerObjectList::clearAllMapObjectsInRegion(LLViewerRegion* regionp)
|
|||
|
||||
void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
|
||||
{
|
||||
// <FS:Ansariel> Factor out calls to getInstance
|
||||
LLUIColorTable& colortable = LLUIColorTable::instance();
|
||||
|
||||
LLColor4 above_water_color = colortable.getColor( "NetMapOtherOwnAboveWater" );
|
||||
LLColor4 below_water_color = colortable.getColor( "NetMapOtherOwnBelowWater" );
|
||||
LLColor4 you_own_above_water_color =
|
||||
colortable.getColor( "NetMapYouOwnAboveWater" );
|
||||
LLColor4 you_own_below_water_color =
|
||||
colortable.getColor( "NetMapYouOwnBelowWater" );
|
||||
LLColor4 group_own_above_water_color =
|
||||
colortable.getColor( "NetMapGroupOwnAboveWater" );
|
||||
LLColor4 group_own_below_water_color =
|
||||
colortable.getColor( "NetMapGroupOwnBelowWater" );
|
||||
static const LLUIColor above_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnAboveWater" );
|
||||
static const LLUIColor below_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnBelowWater" );
|
||||
static const LLUIColor you_own_above_water_color =
|
||||
LLUIColorTable::instance().getColor( "NetMapYouOwnAboveWater" );
|
||||
static const LLUIColor you_own_below_water_color =
|
||||
LLUIColorTable::instance().getColor( "NetMapYouOwnBelowWater" );
|
||||
static const LLUIColor group_own_above_water_color =
|
||||
LLUIColorTable::instance().getColor( "NetMapGroupOwnAboveWater" );
|
||||
static const LLUIColor group_own_below_water_color =
|
||||
LLUIColorTable::instance().getColor( "NetMapGroupOwnBelowWater" );
|
||||
|
||||
// <FS:CR> FIRE-1846: Firestorm netmap enhancements
|
||||
LLColor4 you_own_physical_color = colortable.getColor ( "NetMapYouPhysical", LLColor4::red );
|
||||
LLColor4 group_own_physical_color = colortable.getColor ( "NetMapGroupPhysical", LLColor4::green );
|
||||
LLColor4 other_own_physical_color = colortable.getColor ( "NetMapOtherPhysical", LLColor4::green );
|
||||
LLColor4 scripted_object_color = colortable.getColor ( "NetMapScripted", LLColor4::orange );
|
||||
LLColor4 temp_on_rez_object_color = colortable.getColor ( "NetMapTempOnRez", LLColor4::orange );
|
||||
static const LLUIColor you_own_physical_color = LLUIColorTable::instance().getColor ( "NetMapYouPhysical", LLColor4::red );
|
||||
static const LLUIColor group_own_physical_color = LLUIColorTable::instance().getColor ( "NetMapGroupPhysical", LLColor4::green );
|
||||
static const LLUIColor other_own_physical_color = LLUIColorTable::instance().getColor ( "NetMapOtherPhysical", LLColor4::green );
|
||||
static const LLUIColor scripted_object_color = LLUIColorTable::instance().getColor ( "NetMapScripted", LLColor4::orange );
|
||||
static const LLUIColor temp_on_rez_object_color = LLUIColorTable::instance().getColor ( "NetMapTempOnRez", LLColor4::orange );
|
||||
static LLCachedControl<bool> fs_netmap_physical(gSavedSettings, "FSNetMapPhysical", false);
|
||||
static LLCachedControl<bool> fs_netmap_scripted(gSavedSettings, "FSNetMapScripted", false);
|
||||
static LLCachedControl<bool> fs_netmap_temp_on_rez(gSavedSettings, "FSNetMapTempOnRez", false);
|
||||
|
|
@ -2022,7 +2019,7 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
|
|||
// See DEV-17370 and DEV-29869/SNOW-79 for details.
|
||||
approx_radius = llmin(approx_radius, (F32)max_radius);
|
||||
|
||||
LLColor4U color = above_water_color;
|
||||
LLColor4U color = above_water_color.get();
|
||||
if( objectp->permYouOwner() )
|
||||
{
|
||||
const F32 MIN_RADIUS_FOR_OWNED_OBJECTS = 2.f;
|
||||
|
|
@ -2035,35 +2032,35 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
|
|||
{
|
||||
if ( objectp->permGroupOwner() )
|
||||
{
|
||||
color = group_own_above_water_color;
|
||||
color = group_own_above_water_color.get();
|
||||
}
|
||||
else
|
||||
{
|
||||
color = you_own_above_water_color;
|
||||
color = you_own_above_water_color.get();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( objectp->permGroupOwner() )
|
||||
{
|
||||
color = group_own_below_water_color;
|
||||
color = group_own_below_water_color.get();
|
||||
}
|
||||
else
|
||||
{
|
||||
color = you_own_below_water_color;
|
||||
color = you_own_below_water_color.get();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
if( pos.mdV[VZ] < water_height )
|
||||
{
|
||||
color = below_water_color;
|
||||
color = below_water_color.get();
|
||||
}
|
||||
|
||||
// <FS:CR> FIRE-1846: Firestorm netmap enhancements
|
||||
if (fs_netmap_scripted && objectp->flagScripted())
|
||||
{
|
||||
color = scripted_object_color;
|
||||
color = scripted_object_color.get();
|
||||
if( approx_radius < MIN_RADIUS_FOR_ACCENTED_OBJECTS )
|
||||
{
|
||||
approx_radius = MIN_RADIUS_FOR_ACCENTED_OBJECTS;
|
||||
|
|
@ -2074,15 +2071,15 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
|
|||
{
|
||||
if (objectp->permYouOwner())
|
||||
{
|
||||
color = you_own_physical_color;
|
||||
color = you_own_physical_color.get();
|
||||
}
|
||||
else if (objectp->permGroupOwner())
|
||||
{
|
||||
color = group_own_physical_color;
|
||||
color = group_own_physical_color.get();
|
||||
}
|
||||
else
|
||||
{
|
||||
color = other_own_physical_color;
|
||||
color = other_own_physical_color.get();
|
||||
}
|
||||
if( approx_radius < MIN_RADIUS_FOR_ACCENTED_OBJECTS )
|
||||
{
|
||||
|
|
@ -2092,7 +2089,7 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
|
|||
|
||||
if (fs_netmap_temp_on_rez && objectp->flagTemporaryOnRez())
|
||||
{
|
||||
color = temp_on_rez_object_color;
|
||||
color = temp_on_rez_object_color.get();
|
||||
if( approx_radius < MIN_RADIUS_FOR_ACCENTED_OBJECTS )
|
||||
{
|
||||
approx_radius = MIN_RADIUS_FOR_ACCENTED_OBJECTS;
|
||||
|
|
|
|||
|
|
@ -53,6 +53,14 @@
|
|||
static const U8 OVERLAY_IMG_COMPONENTS = 4;
|
||||
static const F32 LINE_WIDTH = 0.0625f;
|
||||
|
||||
bool LLViewerParcelOverlay::sColorSetInitialized = false;
|
||||
LLUIColor LLViewerParcelOverlay::sAvailColor;
|
||||
LLUIColor LLViewerParcelOverlay::sOwnedColor;
|
||||
LLUIColor LLViewerParcelOverlay::sGroupColor;
|
||||
LLUIColor LLViewerParcelOverlay::sSelfColor;
|
||||
LLUIColor LLViewerParcelOverlay::sForSaleColor;
|
||||
LLUIColor LLViewerParcelOverlay::sAuctionColor;
|
||||
|
||||
// [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-06-20 (Catznip-3.3)
|
||||
LLViewerParcelOverlay::update_signal_t* LLViewerParcelOverlay::mUpdateSignal = NULL;
|
||||
// [/SL:KB]
|
||||
|
|
@ -67,6 +75,17 @@ LLViewerParcelOverlay::LLViewerParcelOverlay(LLViewerRegion* region, F32 region_
|
|||
mTimeSinceLastUpdate(),
|
||||
mOverlayTextureIdx(-1)
|
||||
{
|
||||
if (!sColorSetInitialized)
|
||||
{
|
||||
sColorSetInitialized = true;
|
||||
sAvailColor = LLUIColorTable::instance().getColor("PropertyColorAvail").get();
|
||||
sOwnedColor = LLUIColorTable::instance().getColor("PropertyColorOther").get();
|
||||
sGroupColor = LLUIColorTable::instance().getColor("PropertyColorGroup").get();
|
||||
sSelfColor = LLUIColorTable::instance().getColor("PropertyColorSelf").get();
|
||||
sForSaleColor = LLUIColorTable::instance().getColor("PropertyColorForSale").get();
|
||||
sAuctionColor = LLUIColorTable::instance().getColor("PropertyColorAuction").get();
|
||||
}
|
||||
|
||||
// Create a texture to hold color information.
|
||||
// 4 components
|
||||
// Use mipmaps = false, clamped, NEAREST filter, for sharp edges
|
||||
|
|
@ -328,12 +347,12 @@ void LLViewerParcelOverlay::updateOverlayTexture()
|
|||
mOverlayTextureIdx = 0;
|
||||
}
|
||||
|
||||
const LLColor4U avail = LLUIColorTable::instance().getColor("PropertyColorAvail").get();
|
||||
const LLColor4U owned = LLUIColorTable::instance().getColor("PropertyColorOther").get();
|
||||
const LLColor4U group = LLUIColorTable::instance().getColor("PropertyColorGroup").get();
|
||||
const LLColor4U self = LLUIColorTable::instance().getColor("PropertyColorSelf").get();
|
||||
const LLColor4U for_sale = LLUIColorTable::instance().getColor("PropertyColorForSale").get();
|
||||
const LLColor4U auction = LLUIColorTable::instance().getColor("PropertyColorAuction").get();
|
||||
const LLColor4U avail = sAvailColor.get();
|
||||
const LLColor4U owned = sOwnedColor.get();
|
||||
const LLColor4U group = sGroupColor.get();
|
||||
const LLColor4U self = sSelfColor.get();
|
||||
const LLColor4U for_sale = sForSaleColor.get();
|
||||
const LLColor4U auction = sAuctionColor.get();
|
||||
|
||||
// Create the base texture.
|
||||
U8 *raw = mImageRaw->getData();
|
||||
|
|
@ -346,7 +365,7 @@ void LLViewerParcelOverlay::updateOverlayTexture()
|
|||
{
|
||||
U8 ownership = mOwnership[i];
|
||||
|
||||
F32 r,g,b,a;
|
||||
U8 r,g,b,a;
|
||||
|
||||
// Color stored in low three bits
|
||||
switch( ownership & 0x7 )
|
||||
|
|
@ -445,11 +464,11 @@ void LLViewerParcelOverlay::updatePropertyLines()
|
|||
return;
|
||||
|
||||
LLColor4U colors[PARCEL_COLOR_MASK + 1];
|
||||
colors[PARCEL_SELF] = LLUIColorTable::instance().getColor("PropertyColorSelf").get();
|
||||
colors[PARCEL_OWNED] = LLUIColorTable::instance().getColor("PropertyColorOther").get();
|
||||
colors[PARCEL_GROUP] = LLUIColorTable::instance().getColor("PropertyColorGroup").get();
|
||||
colors[PARCEL_FOR_SALE] = LLUIColorTable::instance().getColor("PropertyColorForSale").get();
|
||||
colors[PARCEL_AUCTION] = LLUIColorTable::instance().getColor("PropertyColorAuction").get();
|
||||
colors[PARCEL_SELF] = sSelfColor.get();
|
||||
colors[PARCEL_OWNED] = sOwnedColor.get();
|
||||
colors[PARCEL_GROUP] = sGroupColor.get();
|
||||
colors[PARCEL_FOR_SALE] = sForSaleColor.get();
|
||||
colors[PARCEL_AUCTION] = sAuctionColor.get();
|
||||
|
||||
mEdges.clear();
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#include "lluuid.h"
|
||||
#include "llviewertexture.h"
|
||||
#include "llgl.h"
|
||||
#include "lluicolor.h"
|
||||
|
||||
class LLViewerRegion;
|
||||
class LLVector3;
|
||||
|
|
@ -135,6 +136,14 @@ private:
|
|||
|
||||
std::vector<Edge> mEdges;
|
||||
|
||||
static bool sColorSetInitialized;
|
||||
static LLUIColor sAvailColor;
|
||||
static LLUIColor sOwnedColor;
|
||||
static LLUIColor sGroupColor;
|
||||
static LLUIColor sSelfColor;
|
||||
static LLUIColor sForSaleColor;
|
||||
static LLUIColor sAuctionColor;
|
||||
|
||||
// [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-06-20 (Catznip-3.3)
|
||||
static update_signal_t* mUpdateSignal;
|
||||
// [/SL:KB]
|
||||
|
|
|
|||
|
|
@ -262,15 +262,9 @@ public:
|
|||
image_rect.mTop = image_rect.mBottom + mImage->getHeight();
|
||||
mImage->draw(LLRect((S32)image_rect.mLeft, (S32)image_rect.mTop, (S32)image_rect.mRight, (S32)image_rect.mBottom));
|
||||
|
||||
LLColor4 color;
|
||||
if (mEditor.getReadOnly())
|
||||
{
|
||||
color = LLUIColorTable::instance().getColor("TextEmbeddedItemReadOnlyColor");
|
||||
}
|
||||
else
|
||||
{
|
||||
color = LLUIColorTable::instance().getColor("TextEmbeddedItemColor");
|
||||
}
|
||||
static const LLUIColor embedded_item_readonly_col = LLUIColorTable::instance().getColor("TextEmbeddedItemReadOnlyColor");
|
||||
static const LLUIColor embedded_item_col = LLUIColorTable::instance().getColor("TextEmbeddedItemColor");
|
||||
const LLColor4& color = mEditor.getReadOnly() ? embedded_item_readonly_col : embedded_item_col;
|
||||
|
||||
F32 right_x;
|
||||
mStyle->getFont()->render(mLabel, 0, image_rect.mRight + EMBEDDED_ITEM_LABEL_PADDING, draw_rect.mTop, color, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::UNDERLINE, LLFontGL::NO_SHADOW, static_cast<S32>(mLabel.length()), S32_MAX, &right_x);
|
||||
|
|
|
|||
|
|
@ -2383,7 +2383,7 @@ void LLViewerWindow::initWorldUI()
|
|||
// gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP | FOLLOWS_RIGHT);
|
||||
// gStatusBar->setShape(status_bar_container->getLocalRect());
|
||||
// // sync bg color with menu bar
|
||||
// gStatusBar->setBackgroundColor(gMenuBarView->getBackgroundColor().get());
|
||||
// gStatusBar->setBackgroundColor(gMenuBarView->getBackgroundColor());
|
||||
// // add InBack so that gStatusBar won't be drawn over menu
|
||||
// status_bar_container->addChildInBack(gStatusBar, 2/*tab order, after menu*/);
|
||||
// status_bar_container->setVisible(true);
|
||||
|
|
@ -2392,7 +2392,7 @@ void LLViewerWindow::initWorldUI()
|
|||
// LLView* nav_bar_container = getRootView()->getChild<LLView>("nav_bar_container");
|
||||
|
||||
// navbar->setShape(nav_bar_container->getLocalRect());
|
||||
// navbar->setBackgroundColor(gMenuBarView->getBackgroundColor().get());
|
||||
// navbar->setBackgroundColor(gMenuBarView->getBackgroundColor());
|
||||
// nav_bar_container->addChild(navbar);
|
||||
// nav_bar_container->setVisible(true);
|
||||
//}
|
||||
|
|
@ -2878,7 +2878,7 @@ void LLViewerWindow::setNormalControlsVisible( bool visible )
|
|||
void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid)
|
||||
{
|
||||
LLSD args;
|
||||
LLColor4 new_bg_color;
|
||||
LLUIColor new_bg_color;
|
||||
|
||||
// god more important than project, proj more important than grid
|
||||
if ( god_mode )
|
||||
|
|
|
|||
|
|
@ -3352,7 +3352,7 @@ void LLVOAvatar::idleUpdateLipSync(bool voice_enabled)
|
|||
void LLVOAvatar::idleUpdateLoadingEffect()
|
||||
{
|
||||
// update visibility when avatar is partially loaded
|
||||
if (updateIsFullyLoaded()) // changed?
|
||||
if (!mFullyLoaded && updateIsFullyLoaded()) // Avoid repeat calculations by checking if mFullyLoaded is true first.
|
||||
{
|
||||
if (isFullyLoaded())
|
||||
{
|
||||
|
|
@ -4045,7 +4045,11 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name)
|
|||
std::deque<LLChat>::iterator chat_iter = mChats.begin();
|
||||
mNameText->clearString();
|
||||
|
||||
LLColor4 new_chat = LLUIColorTable::instance().getColor( isSelf() ? "UserChatColor" : "AgentChatColor" );
|
||||
static const LLUIColor user_chat_color = LLUIColorTable::instance().getColor("UserChatColor");
|
||||
static const LLUIColor agent_chat_color = LLUIColorTable::instance().getColor("AgentChatColor");
|
||||
// <FS:CR> Colorize tags
|
||||
//const LLColor4& new_chat = isSelf() ? user_chat_color : agent_chat_color;
|
||||
LLColor4 new_chat = isSelf() ? user_chat_color : agent_chat_color;
|
||||
|
||||
// <FS:CR> Colorize tags
|
||||
new_chat = LGGContactSets::getInstance()->colorize(getID(), new_chat, ContactSetType::CHAT);
|
||||
|
|
|
|||
|
|
@ -987,7 +987,7 @@ LLTerrainPartition::LLTerrainPartition(LLViewerRegion* regionp)
|
|||
}
|
||||
|
||||
// Do not add vertices; honor strict vertex count specified by strider_vertex_count
|
||||
void gen_terrain_tangents(U32 strider_vertex_count, // <FS/> [FIRE-34363] Fix implicit cast from U32->U16 that can cause a crash
|
||||
void gen_terrain_tangents(U32 strider_vertex_count,
|
||||
U32 strider_index_count,
|
||||
LLStrider<LLVector3> &verticesp,
|
||||
LLStrider<LLVector3> &normalsp,
|
||||
|
|
@ -1003,7 +1003,7 @@ void gen_terrain_tangents(U32 strider_vertex_count, // <FS/>
|
|||
std::vector<LLVector2> texcoords(strider_vertex_count);
|
||||
std::vector<U16> indices(strider_index_count);
|
||||
|
||||
for (U32 v = 0; v < strider_vertex_count; ++v) // <FS/> [FIRE-34363] Fix implicit cast from U32->U16 that can cause a crash
|
||||
for (U32 v = 0; v < strider_vertex_count; ++v)
|
||||
{
|
||||
F32 *vert = verticesp[v].mV;
|
||||
vertices[v] = LLVector4a(vert[0], vert[1], vert[2], 1.f);
|
||||
|
|
@ -1019,7 +1019,7 @@ void gen_terrain_tangents(U32 strider_vertex_count, // <FS/>
|
|||
|
||||
LLCalculateTangentArray(strider_vertex_count, vertices, normals, texcoords.data(), strider_index_count / 3, indices.data(), tangents);
|
||||
|
||||
for (U32 v = 0; v < strider_vertex_count; ++v) // <FS/> [FIRE-34363] Fix implicit cast from U32->U16 that can cause a crash
|
||||
for (U32 v = 0; v < strider_vertex_count; ++v)
|
||||
{
|
||||
tangentsp[v] = tangents[v];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,117 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<floater
|
||||
legacy_header_height="18"
|
||||
can_minimize="false"
|
||||
height="360"
|
||||
min_height="367"
|
||||
layout="topleft"
|
||||
name="settings_color"
|
||||
help_topic="settings_color"
|
||||
title="Color Settings"
|
||||
reuse_instance="true"
|
||||
can_resize="true"
|
||||
min_width="550"
|
||||
width="570">
|
||||
<filter_editor
|
||||
follows="left|top|right"
|
||||
height="23"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
right="-10"
|
||||
label="Enter search text"
|
||||
max_length_chars="300"
|
||||
name="filter_input"
|
||||
text_pad_left="10"
|
||||
top="30" />
|
||||
<scroll_list
|
||||
column_padding="0"
|
||||
draw_heading="true"
|
||||
draw_stripes="false"
|
||||
heading_height="23"
|
||||
height="266"
|
||||
layout="topleft"
|
||||
search_column="1"
|
||||
sort_column="1"
|
||||
left="10"
|
||||
follows="left|top|bottom"
|
||||
name="setting_list"
|
||||
top_pad="2"
|
||||
width="300">
|
||||
<scroll_list.columns
|
||||
name="changed_color"
|
||||
relative_width="0.05" />
|
||||
<scroll_list.columns
|
||||
label="Color"
|
||||
name="color" />
|
||||
</scroll_list>
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
name="color_name_txt"
|
||||
font="SansSerifSmallBold"
|
||||
top_delta="8"
|
||||
left_pad="10"
|
||||
visible="true"
|
||||
use_ellipses="true"
|
||||
text_color="White"
|
||||
width="240">
|
||||
Color name
|
||||
</text>
|
||||
<color_swatch
|
||||
top_pad="0"
|
||||
left_delta="0"
|
||||
follows="top|left"
|
||||
can_apply_immediately="true"
|
||||
height="180"
|
||||
name="color_swatch"
|
||||
visible="true"
|
||||
layout="topleft"
|
||||
width="240">
|
||||
<color_swatch.commit_callback
|
||||
function="CommitSettings" />
|
||||
</color_swatch>
|
||||
<spinner
|
||||
height="20"
|
||||
label="Alpha"
|
||||
layout="topleft"
|
||||
follows="top|left"
|
||||
left_delta="0"
|
||||
min_val="0"
|
||||
max_val="1"
|
||||
decimal_digits="3"
|
||||
name="alpha_spinner"
|
||||
top_pad="5"
|
||||
visible="true"
|
||||
width="120">
|
||||
<spinner.commit_callback
|
||||
function="CommitSettings" />
|
||||
</spinner>
|
||||
<button
|
||||
height="22"
|
||||
label="Reset to default"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
name="default_btn"
|
||||
visible="true"
|
||||
top_pad="15"
|
||||
width="240">
|
||||
<button.commit_callback
|
||||
function="ClickDefault" />
|
||||
</button>
|
||||
<check_box
|
||||
control_name="ColorSettingsHideDefault"
|
||||
height="16"
|
||||
initial_value="true"
|
||||
label="Show changed colors only"
|
||||
layout="topleft"
|
||||
top_pad="10"
|
||||
left="10"
|
||||
follows="left|bottom"
|
||||
name="hide_default"
|
||||
width="500">
|
||||
</check_box>
|
||||
</floater>
|
||||
|
|
@ -183,6 +183,13 @@
|
|||
function="Advanced.ShowDebugSettings"
|
||||
parameter="all" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Show Color settings"
|
||||
name="Color Settings">
|
||||
<menu_item_call.on_click
|
||||
function="Floater.Toggle"
|
||||
parameter="settings_color" />
|
||||
</menu_item_call>
|
||||
<menu_item_separator />
|
||||
<menu_item_call
|
||||
label="XUI Preview Tool"
|
||||
|
|
|
|||
|
|
@ -5142,6 +5142,13 @@
|
|||
label="XUI"
|
||||
name="XUI"
|
||||
tear_off="true">
|
||||
<menu_item_call
|
||||
label="Show Color settings"
|
||||
name="Color Settings">
|
||||
<menu_item_call.on_click
|
||||
function="Floater.Toggle"
|
||||
parameter="settings_color" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Reload Color Settings"
|
||||
name="Reload Color Settings">
|
||||
|
|
|
|||
Loading…
Reference in New Issue