本文整理汇总了C++中cegui::MultiColumnList::resetList方法的典型用法代码示例。如果您正苦于以下问题:C++ MultiColumnList::resetList方法的具体用法?C++ MultiColumnList::resetList怎么用?C++ MultiColumnList::resetList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cegui::MultiColumnList
的用法示例。
在下文中一共展示了MultiColumnList::resetList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateCanSaleMCLDate
bool UpdateCanSaleMCLDate(const CEGUI::EventArgs& e)
{
AHdata& ah = GetInst(AHdata);
AHdata::vecOrderRaw listOR = ah.m_CanSaleOrder;//可出售列表
CEGUI::MultiColumnList* mcl = WMCL(WEArgs(e).window);
if(!mcl)
return false;
mcl->resetList();
AHdata::vecOrderRaw::iterator it = listOR.begin();
for (uint i = 0 ; i < listOR.size() ; ++i,++it)
{
mcl->addRow();
CEGUI::ListboxTextItem* lti = new CEGUI::ListboxTextItem(ToCEGUIString(AppFrame::GetText("AU_104")),it->id);//第二个参数与订单ID关联
lti->setSelectionBrushImage(IMAGES_FILE_NAME,BRUSH_NAME);
mcl->setItem(lti,0,i);
lti = new CEGUI::ListboxTextItem(CEGUI::PropertyHelper::intToString(it->price));
lti->setSelectionBrushImage(IMAGES_FILE_NAME,BRUSH_NAME);
mcl->setItem(lti,1,i);
lti = new CEGUI::ListboxTextItem(CEGUI::PropertyHelper::intToString(it->cnt));
lti->setSelectionBrushImage(IMAGES_FILE_NAME,BRUSH_NAME);
mcl->setItem(lti,2,i);
}
return true;
}
示例2: UpdatePerMCLDate
bool UpdatePerMCLDate(const CEGUI::EventArgs& e)
{
AHdata& ah = GetInst(AHdata);
//AHdata::listSubOrderRaw listSubOR = ah.m_AgentOrder;
AHdata::MapSubOrderRaw mapSubOR = ah.m_AgentOrder;
CEGUI::MultiColumnList* mcl = WMCL(WEArgs(e).window);
if(!mcl)
return false;
mcl->resetList();
AHdata::MapSubOrderRaw::iterator it = mapSubOR.begin();
for (int i = 0 ; it != mapSubOR.end(); ++it,++i)
{
mcl->addRow();
CEGUI::ListboxTextItem* lti = NULL;
lti = new CEGUI::ListboxTextItem(CEGUI::PropertyHelper::intToString(it->first),it->first);//控件ID与订单ID关联
lti->setSelectionBrushImage(IMAGES_FILE_NAME,BRUSH_NAME);
mcl->setItem(lti,0,i);
AH::SubOrderRaw& mapOr = it->second;
if(mapOr.type == AH::OT_BUY)
lti = new CEGUI::ListboxTextItem(ToCEGUIString(AppFrame::GetText("AU_104")));
else if(mapOr.type == AH::OT_SELL)
lti = new CEGUI::ListboxTextItem(ToCEGUIString(AppFrame::GetText("AU_105")));
lti->setSelectionBrushImage(IMAGES_FILE_NAME,BRUSH_NAME);
mcl->setItem(lti,1,i);
lti = new CEGUI::ListboxTextItem(CEGUI::PropertyHelper::intToString(mapOr.cnt));
lti->setSelectionBrushImage(IMAGES_FILE_NAME,BRUSH_NAME);
mcl->setItem(lti,2,i);
lti = new CEGUI::ListboxTextItem(CEGUI::PropertyHelper::intToString(mapOr.price));
lti->setSelectionBrushImage(IMAGES_FILE_NAME,BRUSH_NAME);
mcl->setItem(lti,3,i);
/////////////////////////////////////////////////
// zhaohang 2010/5/12
// 时间UI未处理
/////////////////////////////////////////////////
uint subtime = mapOr.gentime / 60 / 60;
lti = new CEGUI::ListboxTextItem(CEGUI::PropertyHelper::intToString(subtime));
lti->setSelectionBrushImage(IMAGES_FILE_NAME,BRUSH_NAME);
mcl->setItem(lti,4,i);
}
return false;
}
示例3: OnMasterListQuery
void CServerBrowser::OnMasterListQuery(int iType)
{
// Reset the server browser list
CEGUI::MultiColumnList * pMultiColumnList = (CEGUI::MultiColumnList *)m_GUIElements.pServerMultiColumnList;
pMultiColumnList->resetList();
// Reset the server and master list queries
m_pMasterListQuery->Reset();
m_pServerQuery->Reset();
// Query the master list
if(!m_pMasterListQuery->Query(iType))
{
String strError("Failed to contact the master list (%s).\nPlease check your internet connection.", m_pMasterListQuery->GetHttpClient()->GetLastErrorString().Get());
g_pClient->GetGUI()->ShowMessageBox(strError.Get(), "Error");
}
}