|
|
@ -215,29 +215,34 @@ void CChatWindow::displayMessage(const ucstring &msg, NLMISC::CRGBA col, CChatGr
|
|
|
|
CChatTextManager &ctm = getChatTextMngr();
|
|
|
|
CChatTextManager &ctm = getChatTextMngr();
|
|
|
|
|
|
|
|
|
|
|
|
gl = dynamic_cast<CGroupList *>(_Chat->getGroup("cb:text_list"));
|
|
|
|
gl = dynamic_cast<CGroupList *>(_Chat->getGroup("cb:text_list"));
|
|
|
|
if (gl) gl->addChild(ctm.createMsgText(msg, col));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if the group is closed, make it blink
|
|
|
|
CViewBase *child = ctm.createMsgText(msg, col);
|
|
|
|
if (!_Chat->isOpen())
|
|
|
|
if (child)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (numBlinks) _Chat->enableBlink(numBlinks);
|
|
|
|
if (gl) gl->addChild(child);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (_ParentBlink)
|
|
|
|
// if the group is closed, make it blink
|
|
|
|
{
|
|
|
|
if (!_Chat->isOpen())
|
|
|
|
CGroupContainer *father = dynamic_cast<CGroupContainer *>(_Chat->getParent());
|
|
|
|
|
|
|
|
if (father && !father->isOpen())
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
father->enableBlink(numBlinks);
|
|
|
|
if (numBlinks) _Chat->enableBlink(numBlinks);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (_ParentBlink)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CGroupContainer *father = dynamic_cast<CGroupContainer *>(_Chat->getParent());
|
|
|
|
|
|
|
|
if (father && !father->isOpen())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
father->enableBlink(numBlinks);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (windowVisible != NULL)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
*windowVisible = isVisible();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*for(std::vector<IObserver *>::iterator it = _Observers.begin(); it != _Observers.end(); ++it)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
(*it)->displayMessage(this, msg, col, numBlinks);
|
|
|
|
|
|
|
|
}*/
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (windowVisible != NULL)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
*windowVisible = isVisible();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*for(std::vector<IObserver *>::iterator it = _Observers.begin(); it != _Observers.end(); ++it)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
(*it)->displayMessage(this, msg, col, numBlinks);
|
|
|
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//=================================================================================
|
|
|
|
//=================================================================================
|
|
|
@ -563,12 +568,17 @@ void CChatGroupWindow::displayMessage(const ucstring &msg, NLMISC::CRGBA col, CC
|
|
|
|
ucstring newmsg = msg;
|
|
|
|
ucstring newmsg = msg;
|
|
|
|
ucstring prefix;
|
|
|
|
ucstring prefix;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CViewBase *child = NULL;
|
|
|
|
if (gl != NULL)
|
|
|
|
if (gl != NULL)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
gl->addChild(ctm.createMsgText(newmsg, col));
|
|
|
|
child = ctm.createMsgText(newmsg, col);
|
|
|
|
if (!gl->getParent()->getActive())
|
|
|
|
if (child)
|
|
|
|
if (tab != NULL)
|
|
|
|
{
|
|
|
|
tab->setTextColorNormal(newMsgColor);
|
|
|
|
gl->addChild(child);
|
|
|
|
|
|
|
|
if (!gl->getParent()->getActive())
|
|
|
|
|
|
|
|
if (tab != NULL)
|
|
|
|
|
|
|
|
tab->setTextColorNormal(newMsgColor);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// *** Display the message in the UserChat (special case)
|
|
|
|
// *** Display the message in the UserChat (special case)
|
|
|
@ -635,31 +645,37 @@ void CChatGroupWindow::displayMessage(const ucstring &msg, NLMISC::CRGBA col, CC
|
|
|
|
|
|
|
|
|
|
|
|
if (gl != NULL)
|
|
|
|
if (gl != NULL)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
gl->addChild(ctm.createMsgText(newmsg, col));
|
|
|
|
child = ctm.createMsgText(newmsg, col);
|
|
|
|
if (!gl->getParent()->getActive())
|
|
|
|
if (child)
|
|
|
|
if (tab != NULL)
|
|
|
|
{
|
|
|
|
tab->setTextColorNormal(newMsgColor);
|
|
|
|
gl->addChild(child);
|
|
|
|
|
|
|
|
if (!gl->getParent()->getActive())
|
|
|
|
|
|
|
|
if (tab != NULL)
|
|
|
|
|
|
|
|
tab->setTextColorNormal(newMsgColor);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (child)
|
|
|
|
// *** Blink and visibility event
|
|
|
|
|
|
|
|
// if the group is closed, make it blink
|
|
|
|
|
|
|
|
if (!_Chat->isOpen())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (numBlinks) _Chat->enableBlink(numBlinks);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (_ParentBlink)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CGroupContainer *father = dynamic_cast<CGroupContainer *>(_Chat->getParent());
|
|
|
|
// *** Blink and visibility event
|
|
|
|
if (father && !father->isOpen())
|
|
|
|
// if the group is closed, make it blink
|
|
|
|
|
|
|
|
if (!_Chat->isOpen())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
father->enableBlink(numBlinks);
|
|
|
|
if (numBlinks) _Chat->enableBlink(numBlinks);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (_ParentBlink)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CGroupContainer *father = dynamic_cast<CGroupContainer *>(_Chat->getParent());
|
|
|
|
|
|
|
|
if (father && !father->isOpen())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
father->enableBlink(numBlinks);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (windowVisible != NULL)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
*windowVisible = isVisible();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (windowVisible != NULL)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
*windowVisible = isVisible();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -685,8 +701,9 @@ void CChatGroupWindow::displayTellMessage(const ucstring &msg, NLMISC::CRGBA col
|
|
|
|
nlwarning("<CChatGroupWindow::displayTellMessage> can't get text_list.");
|
|
|
|
nlwarning("<CChatGroupWindow::displayTellMessage> can't get text_list.");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CViewBase *child = getChatTextMngr().createMsgText(msg, col);
|
|
|
|
gl->addChild(getChatTextMngr().createMsgText(msg, col));
|
|
|
|
if (child)
|
|
|
|
|
|
|
|
gl->addChild(child);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//=================================================================================
|
|
|
|
//=================================================================================
|
|
|
|