Need your valuable help to create a Button in OGRE by myGUI


17-03-2010 13:11:18

Dear friends,

I am a new guy in MYGUI forum.I have a doubt. please help me with it.
I have configured myGUI 3.0 in my system.I want to use the myGUI controls in my application.
I have set all the configuration requirements as per the instructions.
1. The resources.cfg updation.
2. MyGUI path settings in Ogre application etc.

My Question:
A) In my OGRE project, I have checked the following method to create a button manually,
worked well but appeared like a caption. :cry:

mPlatform = new MyGUI::OgrePlatform();
mPlatform->initialise(mWindow, mSceneMgr);
mGUI = new MyGUI::Gui();
mInfo = new diagnostic::StatisticInfo();

MyGUI::ButtonPtr button = mGUI->createWidget<MyGUI::Button>("Button",30, 40, 300, 26, MyGUI::Align::Default,"B1");

B) I ran the myGUI layout editor project and created a single button.Saved it as button.layout.

MyGUI::ButtonPtr button2 = mGUI->findWidget<MyGUI::Button>("button1");

C) Then I tried to load it as,
but simply a caption appeared.That's all.

How can I create an interactive button in my OGRE RENDER window using MyGUI?

Thank you ,


17-03-2010 14:24:57

Look in MyGUI.log and you will see problem. You need to create it on valid layer.

By the way, you don't need to callbutton2->setVisible(true);widgets is visible by default.