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); }
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); }