Topic: Extending MGui

I realise that I'm suggesting a load of different things and offering to take on a lot of these things... I hope you don't mind, I'm just trying to get a better feel for the engine and try to help where possible.

While looking at the options for GUI within Maratis, the 2 options seem to be doing it in 3D and rendering it in a separate render pass, or doing it in 2D, but hard coding the UI using MGui. The first thing that I noticed is that MGui isn't being built as a dynamic library. Is it possible to use MGui within a game application at all if it was changed to not being a static lib?

Secondly, are there any plans to make MGui data driven? I have done a _lot_ of UI work in my current job and the most tedious thing I have found is for a UI designer to make a mock up, for me to have implemented it, then they come and ask me to move something 5px to the right. It's reasonably bad in data, where I wouldn't have to recompile every time, but if it's in code, it would be even more fustrating. The other option, doing it in 3D, might be an option, but all the UI designers I have worked with are more comfortable in Photoshop and Flash than blender/max/maya/... With regards to there being no editor for MGui, that could fairly easily be fixed by creating a photoshop/gimp plugin. There already some photoshop ones that will export the layer information to xml and similar things for gimp

Of course, some 3D menus can look amazing, and this would always be an option, but there are usually things which are easier to do in 2D. Anyway, just wondering what the general thoughts about this would be. I have no UI design for my project at all right now, so I don't know what I will require, but it's a good idea for me to get an idea what sort of work is associated with each option (integrating a flash renderer for a main menu UI is still on the cards too)

As a side note. Is it possible to create child windows? If I'm going to go ahead with the profiler, it would be cool to have it give it's information in a pop-out window so you can see the information it produces.

Re: Extending MGui

ok, basically MGui was designed to build maratis editor and is not designed for games, there is probably some code that can be used to create a more game suitable version, but right now it is probably very "system" and it force you to create the interface by code. Also, as you mention it is not dynamic, but it could be. The data system is just not using MEngine (only MCore).

I did some interface for games, and, as a designer I was more attracted to the freedom of 3d and of a visual editor. We can use Maratis to put "2d" meshs items using the ortho view (bottom view for ex to have x-y coords). The problem is the interaction that then need to be coded, by script or by c++. An interesting technique would be to create a bank of GUI behaviors (Menu, Button etc) that can reduce the code need and be setup visually.
> Like you sugest, to not have to go to blender to model a simple quad with a texture, we could add a meshLoader that takes a simple image file (jpg, gif or/and psd) and create a flat quad automatically. The rest can be done with a 3d tool if you want a real 3d button.

- child windows : yes you can create multiple screen using viewports and scissor test (with MRenderingContext).
> You can do that in a custom MGame class, the draw function.
> You can also draw multiple scenes at the same time but with different sub-window : your profiler text can be a MOText in a separate scene that you update.


As a general statement, what is missing today is some pre-coded behaviors, I only created very basic ones like Follow and Look-at. With a bigger bank of standard behaviors, it will reduce some code needs.

Re: Extending MGui

Thanks for the info, I will have a look at what possible options are.

If I create any generic behaviours, I will make sure to share them and upload where appropriate smile