예제 #1
0
파일: UIListBox.cpp 프로젝트: 2asoft/xray
CUIListBoxItem* CUIListBox::GetItemByTAG(u32 tag_val)
{
	for(WINDOW_LIST_it it = m_pad->GetChildWndList().begin(); m_pad->GetChildWndList().end()!=it; ++it)
	{
		CUIListBoxItem* item = smart_cast<CUIListBoxItem*>(*it);
		if (item)
		{
			if (item->GetTAG() == tag_val)
				return item;
		}
		
	}
	return NULL;
}
예제 #2
0
int CUIListBox::GetIdxByTAG(u32 tag_val)
{
	int result = -1;

	for(WINDOW_LIST_it it = m_pad->GetChildWndList().begin(); m_pad->GetChildWndList().end()!=it; ++it)
	{
		CUIListBoxItem* item = smart_cast<CUIListBoxItem*>(*it);
		if (item)
		{
			if(result==-1)	result=0;
			else			++result;

			if (item->GetTAG() == tag_val)
				break;
		}
	}
	return result;
}