Creating widgets using editor?

Shamus88

25-03-2009 18:23:06

Hi all,

Please don't flame me if this seems to be a noobish question. I tried to find information about this issue but can't seem to locate an answer.

I downloaded the myGUI SDK and followed the instructions to compile it on the wiki. The engine compiled fine and I tried out the code samples. Which also turns out to be fine.

However, so far I have only been using code to create the widgets. I ran into a dead end when I try to change fonts. (I am used to using OGRE's overlays). So I start to wonder, from the myGUI wiki it seems that myGUI should have an editor to create the widgets? From the wiki it seems that you can only use code.

I tried compiling the LayoutEditor in the solution from the SDK that I downloaded but apparently it can't find some Ogre header files even though I checked to make sure the Dependencies folders are updated and all the include/linkers are also correct in VS2005.

So in conclusion, is it possible to use an editor (just like the screenshots) to create widgets instead? And if yes, how do you do that? Thanks for your patience with me!

nikki

25-03-2009 23:26:15

Yes, I infact almost always use only the editor. :)

Just doublecheck your include folders.

jonathanc

27-03-2009 01:06:16

Right, managed to get editor running and create a custom layout. However,I can't seem to exit from Test mode.
Also are there any tutorials to get me started on the layout editor? At the moment all I can do is create layout and load it in my app. Unsure of how to do other things like add and use custom fonts and also how to make a checkbox work.

Much appreciated if someone could kindly guide me so I can get started. Thanks!
:D

Altren

27-03-2009 12:43:08

However,I can't seem to exit from Test mode.Press escape.
also how to make a checkbox work.http://www.ogre3d.org/wiki/index.php/MyGUI_FAQ

Shamus88

27-03-2009 22:16:51

Thanks that helped a lot!
Also, can you make the mousepointer start at the buttons/widgets instead of top left of screen?

I tried mGUI->injectMouseMove(rWin->getWidth()/2-150,rWin->getHeight()/2-65,300);

calling it once at initialise but the cursor snaps back to top left when I move the mouse...


edit: oh no...my Layout Editor doesn't seem to work with version 2.2.2 (which I updated to)

Altren

28-03-2009 11:09:47

Also, can you make the mousepointer start at the buttons/widgets instead of top left of screen?

I tried mGUI->injectMouseMove(rWin->getWidth()/2-150,rWin->getHeight()/2-65,300);

calling it once at initialise but the cursor snaps back to top left when I move the mouse...
You should create your own mouse coordinates, update them on mouse move and use them in injectMouseMove.oh no...my Layout Editor doesn't seem to work with version 2.2.2 (which I updated to)What do you mean? First it should work with newer version (we was keeping backward capability), but I recommend you compile newer one from package that you downloaded.

jonathanc

28-03-2009 16:04:22

Thanks for the suggestion about the mouse!

However, the 2.2.2 package I downloaded doesn't contain the Layout Editor. What I did was recompile the engine and then try to recompile the editor. However, I can't seem to compile it as I get tons of errors.

Altren

28-03-2009 17:37:02

You downloaded this, right? https://sourceforge.net/project/showfil ... _id=671292
There is layout editor, just open your eyes ;) in Tools.

jonathanc

28-03-2009 20:52:00

You downloaded this, right? https://sourceforge.net/project/showfil ... _id=671292
There is layout editor, just open your eyes ;) in Tools.


omg :D my bad! So used to it being in the main directory!

edit: hmm seems you can't change text colour for widgets in the editor anymore...also can't seem to name the widgets... or am I wrong again? :P

Altren

28-03-2009 22:37:58

What you trying to write in colour?

jonathanc

29-03-2009 00:12:51

What you trying to write in colour?

I was referring to the older Layout Editor whereby you can change the Font of the buttons for example. You used to be able to change the font colours etc. It's ok though, still very useful to me at the moment.

Also, can you please elaborate more on what you said about setting the mouse position? I know that OIS automatically initialises mouse at 0,0. I have looked at various WIKIs but still can't find a good solution.

Thanks.