GUI does not show up?

Elspin

26-04-2011 22:09:30

Hi, I'm fairly new to MyGUI so I hope this isn't just something silly. Sometimes, the gui will show up and sometimes it won't. There is never any errors in the log other than it complaining about the skin name and going to the default (and I'm only trying to use the default). Here is the location/all relevant code:

Right above the creation of my framelistener:

mPlatform = new MyGUI::OgrePlatform();
mPlatform->initialise(mRenderWindow, mMgr);

mGUI = new MyGUI::Gui();
mGUI->initialise();


at the end of the constructor of my frame listener:

MyGUI::StaticTextPtr pausetext = mGUI->createWidget<MyGUI::StaticText>("default", 700, 10, 300, 26, MyGUI::Align::Default, "Main");
pausetext->setCaption("Paused");

MyGUI::ButtonPtr menuButton = mGUI->createWidget<MyGUI::Button>("default", 10, 10, 300, 26, MyGUI::Align::Default, "Main");
menuButton->setCaption("exit");

// set callback
menuButton->eventMouseButtonClick = MyGUI::newDelegate(this, &InputListener::genericEvent);


and aside from that there's the mouse movement/keyboard press injections. I'm following the MyGUI quickstart (http://www.ogre3d.org/tikiwiki/MyGUI+quickstart) on the ogre wiki, which supposedly has problems, so I'd really appreciate it if anyone could tell me what's wrong with what I'm doing/what I need to add to make a working test. Thanks in advance for any help!

Altren

27-04-2011 10:34:29

Read MyGUI.log. There's no such skin as "default". Use "StaticText" and "Button" skins.

And default skin that used instead of wrong one is empty skin, not some default button or default static text skin.

Elspin

27-04-2011 22:33:35

Read MyGUI.log. There's no such skin as "default". Use "StaticText" and "Button" skins.

And default skin that used instead of wrong one is empty skin, not some default button or default static text skin.


Ahhhh, that'll explain it, I thought that skins were centric to all the elements, not just a single element.

Thanks a lot for the help, now I can get on to re-writing my GUI in MyGUI.