| 29 | } |
| 30 | |
| 31 | void DemoKeeper::createScene() |
| 32 | { |
| 33 | base::BaseDemoManager::createScene(); |
| 34 | createEntities(); |
| 35 | |
| 36 | const MyGUI::VectorWidgetPtr& root = MyGUI::LayoutManager::getInstance().loadLayout("HelpPanel.layout"); |
| 37 | if (root.size() == 1) |
| 38 | root.at(0)->findWidget("Text")->castType<MyGUI::TextBox>()->setCaption( |
| 39 | "Implementation of custom complex cursor behaviour, interaction of system and in-game cursors."); |
| 40 | |
| 41 | const std::string& resourceCategory = MyGUI::ResourceManager::getInstance().getCategoryName(); |
| 42 | MyGUI::FactoryManager::getInstance().registerFactory<ResourcePointerContext>(resourceCategory); |
| 43 | |
| 44 | MyGUI::ResourceManager::getInstance().load("Contexts.xml"); |
| 45 | |
| 46 | MyGUI::ResourceManager::getInstance().load("DemoPointers.xml"); |
| 47 | |
| 48 | mPointerContextManager = new PointerContextManager(this); |
| 49 | mPointerContextManager->addContext("ptrx_Normal"); |
| 50 | mPointerContextManager->setPointer("default"); |
| 51 | |
| 52 | mEnemyPanel = new EnemyPanel(); |
| 53 | mFriendPanel = new FriendPanel(); |
| 54 | mControlPanel = new ControlPanel(mPointerContextManager); |
| 55 | |
| 56 | MyGUI::IntSize size = MyGUI::RenderManager::getInstance().getViewSize(); |
| 57 | setMousePosition(size.width / 2, size.height / 2); |
| 58 | updateCursorPosition(); |
| 59 | |
| 60 | #ifdef MYGUI_OGRE_PLATFORM |
| 61 | mEnemyPanel->setVisible(false); |
| 62 | mFriendPanel->setVisible(false); |
| 63 | #endif |
| 64 | |
| 65 | updateCamera(0, 0); |
| 66 | } |
| 67 | |
| 68 | void DemoKeeper::destroyScene() |
| 69 | { |
nothing calls this directly
no test coverage detected