MCPcopy Create free account
hub / github.com/MyGUI/mygui / createScene

Method createScene

Demos/Demo_Pointers/DemoKeeper.cpp:31–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 9

loadLayoutMethod · 0.80
findWidgetMethod · 0.80
addContextMethod · 0.80
sizeMethod · 0.45
setCaptionMethod · 0.45
loadMethod · 0.45
setPointerMethod · 0.45
getViewSizeMethod · 0.45
setVisibleMethod · 0.45

Tested by

no test coverage detected