Esempio n. 1
0
void IntroState::createMyGui()
{
    MyGUI::OgrePlatform *mp = new MyGUI::OgrePlatform();
    mp->initialise(_root->getAutoCreatedWindow(), Ogre::Root::getSingleton().getSceneManager("SceneManager"));
    MyGUI::Gui *mGUI = new MyGUI::Gui();
    mGUI->initialise();
   layout = MyGUI::LayoutManager::getInstance().loadLayout(LAYOUT_INTRO);
  //MyGUI::PointerManager::getInstancePtr()->setVisible(true);
}
Esempio n. 2
0
void GraphicsImpl::setupGUI()
{
	MyGUI::Gui * mGUI;
	MyGUI::OgrePlatform* platform = new MyGUI::OgrePlatform();
	platform->initialise(window, sceneMgr);
	gui = new MyGUI::Gui();
	gui->initialise();

	mainGuiWidget = gui->createWidgetReal<MyGUI::Widget>("Default", 0.0, 0.0, 1.0, 1.0, MyGUI::Align::Default, "Main");

	MyGUI::ButtonPtr button = mainGuiWidget->createWidgetReal<MyGUI::Button>("Button", 0.005, 0.008, 0.156, 0.05, MyGUI::Align::Default, "exit");
	button->setCaption("exit");
	// set callback
	button->eventMouseButtonClick = MyGUI::newDelegate(this, &GraphicsImpl::guiCallback);

	button = mainGuiWidget->createWidgetReal<MyGUI::Button>("Button", 0.182, 0.008, 0.156, 0.05, MyGUI::Align::Default, "do");
	button->setCaption("do something");
	// set callback
	button->eventMouseButtonClick = MyGUI::newDelegate(this, &GraphicsImpl::guiCallback);
}