本文整理汇总了C++中LLNotificationPtr::getIcon方法的典型用法代码示例。如果您正苦于以下问题:C++ LLNotificationPtr::getIcon方法的具体用法?C++ LLNotificationPtr::getIcon怎么用?C++ LLNotificationPtr::getIcon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLNotificationPtr
的用法示例。
在下文中一共展示了LLNotificationPtr::getIcon方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: showNotification
void LLMediaCtrl::showNotification(LLNotificationPtr notify)
{
LLWindowShade* shade = getChild<LLWindowShade>("notification_shade");
if (notify->getIcon() == "Popup_Caution")
{
shade->setBackgroundImage(LLUI::getUIImage("Yellow_Gradient"));
shade->setTextColor(LLColor4::black);
shade->setCanClose(true);
}
else if (notify->getName() == "AuthRequest")
{
shade->setBackgroundImage(LLUI::getUIImage("Yellow_Gradient"));
shade->setTextColor(LLColor4::black);
shade->setCanClose(false);
}
else
{
//HACK: make this a property of the notification itself, "cancellable"
shade->setCanClose(false);
shade->setTextColor(LLUIColorTable::instance().getColor("LabelTextColor"));
}
mWindowShade->show(notify);
}
示例2: showNotification
void LLPanelPrimMediaControls::showNotification(LLNotificationPtr notify)
{
delete mWindowShade;
LLWindowShade::Params params;
params.rect = mMediaRegion->getLocalRect();
params.follows.flags = FOLLOWS_ALL;
//HACK: don't hardcode this
if (notify->getIcon() == "Popup_Caution")
{
params.bg_image.name = "Yellow_Gradient";
params.text_color = LLColor4::black;
}
else
{
//HACK: make this a property of the notification itself, "cancellable"
params.can_close = false;
params.text_color.control = "LabelTextColor";
}
mWindowShade = LLUICtrlFactory::create<LLWindowShade>(params);
mMediaRegion->addChild(mWindowShade);
mWindowShade->show(notify);
}