| 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 | { |
nothing calls this directly
no test coverage detected