本文整理汇总了C++中LLTextBox::setReadOnlyColor方法的典型用法代码示例。如果您正苦于以下问题:C++ LLTextBox::setReadOnlyColor方法的具体用法?C++ LLTextBox::setReadOnlyColor怎么用?C++ LLTextBox::setReadOnlyColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLTextBox
的用法示例。
在下文中一共展示了LLTextBox::setReadOnlyColor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setup
void setup(const LLChat& chat,const LLStyle::Params& style_params)
{
mAvatarID = chat.mFromID;
mSessionID = chat.mSessionID;
mSourceType = chat.mSourceType;
gCacheName->get(mAvatarID, FALSE, boost::bind(&LLChatHistoryHeader::nameUpdatedCallback, this, _1, _2, _3, _4));
//*TODO overly defensive thing, source type should be maintained out there
if (chat.mFromID.isNull() && (chat.mFromName.empty() || chat.mFromName == SYSTEM_FROM))
{
mSourceType = CHAT_SOURCE_SYSTEM;
}
LLTextBox* userName = getChild<LLTextBox>("user_name");
userName->setReadOnlyColor(style_params.readonly_color());
userName->setColor(style_params.color());
userName->setValue(chat.mFromName);
mFrom = chat.mFromName;
if (chat.mFromName.empty() || CHAT_SOURCE_SYSTEM == mSourceType)
{
mFrom = LLTrans::getString("SECOND_LIFE");
userName->setValue(mFrom);
}
mMinUserNameWidth = style_params.font()->getWidth(userName->getWText().c_str()) + PADDING;
setTimeField(chat);
LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>("avatar_icon");
if(mSourceType != CHAT_SOURCE_AGENT)
icon->setDrawTooltip(false);
switch (mSourceType)
{
case CHAT_SOURCE_AGENT:
icon->setValue(chat.mFromID);
break;
case CHAT_SOURCE_OBJECT:
icon->setValue(LLSD("OBJECT_Icon"));
break;
case CHAT_SOURCE_SYSTEM:
icon->setValue(LLSD("SL_Logo"));
break;
case CHAT_SOURCE_UNKNOWN:
icon->setValue(LLSD("Unknown_Icon"));
}
}