void InspectWidget::entity_ChildRemoved(Eris::Entity* entity) { for (unsigned int i = 0; i < mChildList->getItemCount(); ++i) { CEGUI::ListboxItem* item = mChildList->getListboxItemFromIndex(i); if (item->getUserData() == entity) { mChildList->removeItem(item); break; } } }
bool InspectWidget::ChildList_MouseDoubleClick(const CEGUI::EventArgs& args) { //Inspect the child entity CEGUI::ListboxItem* item = mChildList->getFirstSelectedItem(); if (item) { startInspecting(static_cast<EmberEntity*>(item->getUserData())); } return true; }
bool FileWindow::onSelect(const CEGUI::EventArgs& e) { CEGUI::ListboxItem* item = _pFileList->getFirstSelectedItem(); if (item == NULL) { return true; } intptr_t data = reinterpret_cast< intptr_t >(item->getUserData()); if (data == 0) { //file _pSelectBox->setText(item->getText()); _pOkButton->setEnabled(true); } else if (data == 1) { //dir TCHAR* name = ::bootes::lib::util::TChar::C2T(item->getText().c_str()); tc_string dir = _cwd + _T('\\') + name; delete name; list(dir.c_str()); } return true; }