| 31 | static SampleLayout* mSampleLayout; |
| 32 | |
| 33 | SampleLayout::SampleLayout() : |
| 34 | BaseLayout("SampleLayout.layout") |
| 35 | { |
| 36 | assignWidget(mpResourcesTree, "ResourcesTree"); |
| 37 | mpResourcesTree->eventTreeNodePrepare += newDelegate(this, &SampleLayout::notifyTreeNodePrepare); |
| 38 | |
| 39 | |
| 40 | MyGUI::TreeControl::Node* pRoot = mpResourcesTree->getRoot(); |
| 41 | |
| 42 | /*#ifdef MYGUI_OGRE_PLATFORM |
| 43 | Ogre::ArchiveManager::ArchiveMapIterator ArchiveIterator = Ogre::ArchiveManager::getSingleton().getArchiveIterator(); |
| 44 | while (ArchiveIterator.hasMoreElements()) |
| 45 | { |
| 46 | Ogre::Archive* pArchive = ArchiveIterator.getNext(); |
| 47 | |
| 48 | MyGUI::TreeControl::Node* pNode = new MyGUI::TreeControl::Node(pArchive->getName(), "Data"); |
| 49 | pNode->setData(pArchive); |
| 50 | pRoot->add(pNode); |
| 51 | } |
| 52 | #else*/ |
| 53 | common::VectorFileInfo result; |
| 54 | common::getSystemFileList(result, gMediaBase, L"*.*"); |
| 55 | |
| 56 | for (auto& item : result) |
| 57 | { |
| 58 | if (item.name == L".." || item.name == L".") |
| 59 | continue; |
| 60 | MyGUI::TreeControl::Node* pNode = new MyGUI::TreeControl::Node(item.name, "Data"); |
| 61 | |
| 62 | pNode->setData(PairFileInfo(gMediaBase, item)); |
| 63 | pRoot->add(pNode); |
| 64 | } |
| 65 | |
| 66 | //#endif |
| 67 | } |
| 68 | |
| 69 | void SampleLayout::notifyTreeNodePrepare(MyGUI::TreeControl* pTreeControl, MyGUI::TreeControl::Node* pNode) |
| 70 | { |
nothing calls this directly
no test coverage detected