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

Method createScene

Demos/Demo_PluginStrangeButton/DemoKeeper.cpp:38–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 }
37
38 void DemoKeeper::createScene()
39 {
40 base::BaseDemoManager::createScene();
41 MyGUI::LayoutManager::getInstance().loadLayout("Wallpaper.layout");
42 const MyGUI::VectorWidgetPtr& root = MyGUI::LayoutManager::getInstance().loadLayout("HelpPanel.layout");
43 root.at(0)->findWidget("Text")->castType<MyGUI::TextBox>()->setCaption(
44 "Example of using plugins in MyGUI. Actually nothing interesting to look at.");
45
46 const MyGUI::IntSize& view = MyGUI::RenderManager::getInstance().getViewSize();
47 const MyGUI::IntSize size(300, 26);
48
49#ifdef MYGUI_STATIC
50 plugin_item = new plugin::Plugin();
51 MyGUI::PluginManager::getInstance().installPlugin(plugin_item);
52#else
53 MyGUI::PluginManager::getInstance().loadPlugin(plugin_name);
54#endif
55
56 MyGUI::Widget* widget = MyGUI::Gui::getInstance().createWidgetT(
57 "StrangeButton",
58 "Button",
59 MyGUI::IntCoord((view.width - size.width) / 2, (view.height - size.height) / 2, size.width, size.height),
60 MyGUI::Align::Default,
61 "Main");
62 m_button = widget->castType<MyGUI::TextBox>();
63 m_button->setCaption("Plugin StrangeButton demo");
64 }
65
66 void DemoKeeper::destroyScene()
67 {

Callers

nothing calls this directly

Calls 8

loadLayoutMethod · 0.80
findWidgetMethod · 0.80
installPluginMethod · 0.80
loadPluginMethod · 0.80
IntCoordFunction · 0.50
setCaptionMethod · 0.45
getViewSizeMethod · 0.45
createWidgetTMethod · 0.45

Tested by

no test coverage detected