Displaying Text - GUI Style

Celtic

20-05-2007 10:31:38

Hey Everyone,

I know lots of GUI's already exist, but I am particularly interested in creating my own and up to now, everything has been going wonderfully.

I am not using overlays, instead I am using manual objects. I have now encountered a problem that seems to be MOGRE related, and its got to do with displaying text. With Ogre, I used the MovableText class to output text, but with MOGRE it does not seem to be supported. I searched and found a thread detailing how to recompile Mogre to include that class, but that thread was over a year old and so I figure that there must be support already in MOGRE for displaying text without using overlays.

Does anyone know if this support exists, and if so could you point me towards the class that will help?

Thanks alot,

Celtic

Darby

21-05-2007 15:30:18

As far as I know, there's no such class in Mogre.
Mogre is just a wrapper, it does not add 3d functionality beyond Ogre itself.
(It does have some native classes, but they are utility)

In other words, go ahead and use the solution provided by Bekas back then - compile the MovableText into Mogre. I did and it works just fine.

pin

22-05-2007 13:47:16

I made my own GUI using Overlays. I'm rather happy how it came out.

GermanDZ

12-06-2007 22:24:23

Nice,

How do you manage the events (mouse & keyboard) over the Overlays? I just need a clue...

Celtic

14-06-2007 23:43:19

I also took a page out of Pin's book and made a GUI using Overlays.

To handle input you can use a number of different methods, I wanted to avoid using any prebuilt SDK or DirectX's DirectInput so I use windows messages to register user input.

I dont know if this is the correct way to do this, but this is how I gave my overlay elements input Events...

1. You know the screen coordinates of the mouse relative to your render target.

So to determine if the mouse is over an overlay, you can use the Contains method of an overlay element.

if (MyElement.Contains(MouseLocation.X, MouseLocation.Y))

Once you know what Overlay element has captured the mouse, you can then use the mouse state to determine what the user has done to the element..

I know thats a crappy explanation, if you would like I can send you my code, but basically I created a new class called GUIObject that contains an OverlayContainer, and the GUIObject class then handles all the Event firing and what not internally, so I can use it the same as I would a Windows Container, like this...

MyGUIObject.MouseDown += new GUIInputEvent(MyInputMethod);

Dont know if that helped :p

pin

25-06-2007 12:25:44

Nice,

How do you manage the events (mouse & keyboard) over the Overlays? I just need a clue...


Hey,

I'm using Immediate Gui (which means no event handling).

http://www.google.com/search?q=immediat ... RO210RO210

http://sol.gfxile.net/imgui/

Calin

GermanDZ

25-06-2007 18:14:22

Thanks,

I am porting QuickGUI (I already have a barely working version) to MOGRE.

I am planning to release a version, please ask about it if you are interested.