Example #1
0
void GVEvent::UpdateClientAttrDisplay(const UIData::tagGoodAttr* pGoodAttr)
{
    if(!pGoodAttr)
        return;
    //客户端界面图形ID
    Editbox* pEditBox = GetEditbox("GoodsTreeFrame/ClientProperty/EditGraID");
    if(pEditBox)
        pEditBox->setText(PropertyHelper::intToString(pGoodAttr->dwIconId));
    //落地图形ID
    pEditBox = GetEditbox("GoodsTreeFrame/ClientProperty/EditGraID1");
    if(pEditBox)
        pEditBox->setText(PropertyHelper::intToString(pGoodAttr->dwGroundId));
    //换装图形ID
    pEditBox = GetEditbox("GoodsTreeFrame/ClientProperty/EditGraID2");
    if(pEditBox)
        pEditBox->setText(PropertyHelper::intToString(pGoodAttr->dwEquipID));
    //拾取声音ID
    pEditBox = GetEditbox("GoodsTreeFrame/ClientProperty/EditGraID3");
    if(pEditBox)
        pEditBox->setText(PropertyHelper::intToString(pGoodAttr->dwSound));
    //挥动弱势伤害声音ID
    pEditBox = GetEditbox("GoodsTreeFrame/ClientProperty/EditGraID4");
    if(pEditBox)
        pEditBox->setText(PropertyHelper::intToString(pGoodAttr->dwSoundID1));
    //特殊击中被击中声音ID
    pEditBox = GetEditbox("GoodsTreeFrame/ClientProperty/EditGraID5");
    if(pEditBox)
        pEditBox->setText(PropertyHelper::intToString(pGoodAttr->dwSoundID2));
    //武器动作类型
    pEditBox = GetEditbox("GoodsTreeFrame/ClientProperty/EditGraID51");
    if(pEditBox)
        pEditBox->setText(PropertyHelper::intToString(pGoodAttr->dwWeaponActType));
    //攻击时是否混音
    Combobox* cbbo = GetCombobox("GoodsTreeFrame/BaseProperty/CombBoxIsDB1");
    if(pGoodAttr->bSoundSwitch == false)
        cbbo->setItemSelectState(1,true);
    else
        cbbo->setItemSelectState(size_t(0),true);
    //描述
    MultiLineEditbox* muleditbox = static_cast<MultiLineEditbox*>(m_wnd->getChildRecursive("GoodsTreeFrame/ClientProperty/Content"));
    muleditbox->setText(pGoodAttr->strContent.c_str());
}
Example #2
0
void Chat::processMessage(Event * event)
{
	using namespace CEGUI;

	const char * message = event->getProperty("eventData").c_str() ;

	String messageChat(message);

	// add this entry to the command history buffer
	d_history.push_back(messageChat);
	// reset history position
	d_historyPos = d_history.size();
	// append newline to this entry
	message += '\n';
	// get history window
	MultiLineEditbox* history = static_cast<MultiLineEditbox*>(d_root->getChild("ListOfMessage"));
	// append new text to history output
	history->setText(history->getText() + messageChat);
	// scroll to bottom of history output
	history->setCaretIndex(static_cast<size_t>(-1));

}