Ejemplo n.º 1
0
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;
		}
	}
}
Ejemplo n.º 2
0
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;
}
Ejemplo n.º 3
0
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;
}