예제 #1
0
bool	LLNearbyChatScreenChannel::createPoolToast()
{
	LLToastPanelBase* panel= m_create_toast_panel_callback_t();
	if(!panel)
		return false;
	
	LLToast::Params p;
	p.panel = panel;
	p.lifetime_secs = gSavedSettings.getS32("NearbyToastLifeTime");
	p.fading_time_secs = gSavedSettings.getS32("NearbyToastFadingTime");

	LLToast* toast = new LLNearbyChatToast(p, this);
	
	
	toast->setOnFadeCallback(boost::bind(&LLNearbyChatScreenChannel::onToastFade, this, _1));

	LL_DEBUGS("NearbyChat") << "Creating and pooling toast" << llendl;	
	m_toast_pool.push_back(toast->getHandle());
	return true;
}
예제 #2
0
bool	LLNearbyChatScreenChannel::createPoolToast()
{
	LLToastPanelBase* panel= m_create_toast_panel_callback_t();
	if(!panel)
		return false;
	
	LLToast::Params p;
	p.panel = panel;
	p.lifetime_secs = gSavedSettings.getS32("NearbyToastLifeTime");
	p.fading_time_secs = gSavedSettings.getS32("NearbyToastFadingTime");

	LLToast* toast = new LLNearbyChatToast(p, this);
	reshapePanel(panel);
	
	toast->setOnFadeCallback(boost::bind(&LLNearbyChatScreenChannel::onToastFade, this, _1));

	// If the toast gets somehow prematurely destroyed, deactivate it to prevent crash (STORM-1352).
	toast->setOnToastDestroyedCallback(boost::bind(&LLNearbyChatScreenChannel::onToastDestroyed, this, _1, false));

	LL_DEBUGS("NearbyChat") << "Creating and pooling toast" << llendl;	
	m_toast_pool.push_back(toast->getHandle());
	return true;
}