diff options
| author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-20 19:17:38 +0200 | 
|---|---|---|
| committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-20 19:17:38 +0200 | 
| commit | 13a6077b780117be0fa3a054426d139ca1d35df9 (patch) | |
| tree | 0597cfbf98db2787f75b3ec33fe2637c14f0ee7e /indra/newview/llchiclet.cpp | |
| parent | 58439da4c696f8dd6002e6399e4563cbda251a1e (diff) | |
Implemented normal task EXT-2081 - Object IM chiclets art needs to be hooked up to LLDialog chiclets.
Implemented LLDialog(LLScriptFloater) and Script Chiclets.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llchiclet.cpp')
| -rw-r--r-- | indra/newview/llchiclet.cpp | 56 | 
1 files changed, 56 insertions, 0 deletions
| diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index caf6917d90..15c4c5f95d 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -43,6 +43,7 @@  #include "lllocalcliprect.h"  #include "llmenugl.h"  #include "lloutputmonitorctrl.h" +#include "llscriptfloater.h"  #include "lltextbox.h"  #include "llvoiceclient.h"  #include "llvoicecontrolpanel.h" @@ -1392,3 +1393,58 @@ LLChicletSpeakerCtrl::LLChicletSpeakerCtrl(const Params&p)   : LLOutputMonitorCtrl(p)  {  } + +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// + +LLScriptChiclet::Params::Params() + : avatar_icon("avatar_icon") +{ +	// *TODO Vadim: Get rid of hardcoded values. +	rect(CHICLET_RECT); +	name("dialog_chiclet"); + +	avatar_icon.name("avatar_icon"); +	avatar_icon.follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP | FOLLOWS_BOTTOM); + +	avatar_icon.rect(CHICLET_ICON_RECT); +	avatar_icon.mouse_opaque(false); +} + +LLScriptChiclet::LLScriptChiclet(const Params&p) + : LLIMChiclet(p) + , mChicletIconCtrl(NULL) +{ +	mImage = LLUI::getUIImage("Generic_Object_Small"); +} + +void LLScriptChiclet::setSessionId(const LLUUID& session_id) +{ +	setShowNewMessagesIcon( getSessionId() != session_id ); + +	LLIMChiclet::setSessionId(session_id); +	LLNotificationPtr notification = LLNotifications::getInstance()->find( +		LLScriptFloaterManager::getInstance()->getNotificationId(session_id)); +	if(notification) +	{ +		setToolTip(notification->getSubstitutions()["TITLE"].asString()); +	} +} + +void LLScriptChiclet::draw() +{ +	mImage->draw(getLocalRect()); +	LLIMChiclet::draw(); +} + +void LLScriptChiclet::onMouseDown() +{ +	LLScriptFloaterManager::getInstance()->toggleScriptFloater(getSessionId()); +} + +BOOL LLScriptChiclet::handleMouseDown(S32 x, S32 y, MASK mask) +{ +	onMouseDown(); +	return LLChiclet::handleMouseDown(x, y, mask); +} | 
