GUI Survey for 2022

GUIs for MonoGame have come and gone over the years. If you’re currently using a GUI framework, please share which one, and the pros and cons thereof.

I’m currently GUI-less…

I’ve just been using my own UI library.

Pros is that I can make pretty much any type of UI with it including really custom stuff. (For example https://github.com/Apostolique/BinaryInput.) It’s built with the idea that everything can be animated.

Cons is that it’s really experimental so not much handholding. It’s also not as performant as other ones like IMGUI. Documentation needs some work.

3 Likes

It looks like a good start. Poking around the github page and the docs at github.io, I didn’t see any control borders or scrollable content. If it can do those things, you may wish to update the showcase.

What do you mean by control border?

For scrollable, there’s https://github.com/Apostolique/Apos.Gui/blob/main/Source/Vertical.cs or https://github.com/Apostolique/Apos.Gui/blob/main/Source/Horizontal.cs.

For the most part, these types of components would be reimplemented to fit each unique game. The idea for the library is that it provides a structure to code custom stuff on top. The few components that are provided out of the box are there for convenience.

1 Like

Squid looks interesting in that it draws to an ISquidRenderer back-end which means it could be used with any framework.

@craftworkgames created one for MonoGame.

@Apostolique, If you look at the Squid screenshots, you can see borders around buttons, text boxes, checkboxes and list boxes, whereas with Apos.Gui I only saw naked text labels in the screenshots. GUI projects definitely benefit from good screenshots to convey what things will often look like in practice. If Apos.Gui is capable of more out of the box, you may wish to show more of that.

If you want something with more out of the box there’s Myra.

Depending how complex and fancy want your gui. With exception of perhaps https://www.noesisengine.com/ there isn’t anything I would consider monogame friendly, game ready GUI framework. If you want simple tool like gui you can use myra mentioned above but at that point you can as well go with DearImgui which is ultimate gui solution for tools (not games). Leaving you realistically with one alternative, make your own.

It depends on the usage intended, if it’s for tools, the accepted industry standard is ImGUI. It is very widespread within the game industry and used by most studios these days (e.g. Blizzard, Google, Rockstar, Square-Enix…) because it is very well fitted to game requirements, very fast to program, and very well maintained by game industry veterans.

If one GUI toolkit should ever be considered to be part of the official MG API, it’d likely be ImGUI.

If we’re talking about UI frameworks to design gameplay interfaces, AFAIK there is currently no open-source library that fits this (like something like Unity’s uGUI, or middleware like Neosis would).

1 Like

Mine is designed for user-facing UIs and is open source. I claim that since components are coded on the game side. Components are also part of the update loop so can be animated or have any custom code. They are also part of the draw loop with access to the SpriteBatch.

I mostly just provide a sort of UI framework with ergonomics similar to IMGUI.

1 Like

I created a new GUI framework for myself , I couldn’t find something that I liked and that could fit my programming style, still working on it for the past 2 years and it is the most complex thing I ever wrote in my life, that’s why it is taking so long to make.
It has concepts of ImGUI plus retained mode at the same time for games and editors , it is a hybrid of both. Hope I can share something by end of the year.

2 Likes

Sounds interesting. Does it support the CSS box model with padding, margin, border and content?

There is also MonoGame.Extended.Gui

ImGUI looks really cool but it’s only for c++ right? I don’t understand how it could be implemented in MonoGame.

Pretty easy go to GitHub - dovker/Monogame.ImGui: An ImGui.NET wrapper for Monogame

Thanks. I’ve collected 3 MonoGame + ImGui project URLs now, plus a dead one:

I find ImGui more trouble than it’s worth. I’m constantly fighting things that wont scroll, items that appear out of bounds, floating windows that are responding to the wrong input, etc. Trying to do any sort of custom controls is pretty much out of the question as the work involved would be tremendous.

I’m all for Noesis creating an official port for MonoGame, but they wanted to see if people are interested, and according to my post Noesis UI - Do you want to see an official version supporting MonoGame? - General - Community | MonoGame, it doesn’t seem like people are :frowning:

1 Like

I have tried almost every UI framework I could find for monogame. GeonBit, Monigame.Extended, Xui, EmptyKeys, you name it. I finally settled Myra UI. For one main reason.

Everythig works as expected. There’s no lack of functionality. Besides one that I have found and that’s built in ToolTips. But that’s easy enough to build in. Besides that, it’s font rendering is smooth and clean, thanks to StashFontSharp. Its straight forward, to the point. Doesnt require any crazy setup. Comes with a editor, StyleSheets are easy to create, thanks to a built in texturepacker that spits out a texture atlas and a file that says where everything is thats read in by the framework automatically. Its been a real pleasure to use.

I originally settled on MLEM.UI but its font rendering didnt work just right and I didn’t want to spend the time to fix it.

But yeah, can’t recommend Myra enough. It’s great.

4 Likes

I can’t imagine anyone would want to use Myra over Imgui, however they are both Tool gui, neither has capability to create decently looking game gui, in the end you will always end up doing that yourself.

1 Like

I played a lot with Myra too, but I found little bugs with the stylesheets not containing the proper elements and having to investigate the code to hack things in. It’s a good choice for composing the UI in XML but it deviates too far from XAML for me, while investigating it I kept wanting more XAML systems in place and that was causing me frustration. Myra’s default style is definitely “tool” orientated, but there you can craft your own stylesheet and make a good game UI.

I then went on to play with EmptyKeys and that was probably the closest to XMAL, and one of the best options in my opinion, but it’s held back by a few things:

  1. It’s hard to get the generator working in your projects with MonoGame so that you can craft the xaml and generate the UI code when you run your project.
  2. The generator and tools are a few years old and using .NET Framework, which restricts the platform you can work on.
  3. The generator code is quite complex. I was looking for a way to add the ability to specify the x:FieldModifier XAML directive but it was just too much work to understand. .NET 5+ has added a lot of stuff for code generator projects, it would be awesome for this to move on from .NET Framework and into the modern C# world.\
  4. Events on controls don’t work like you would expect them to. They expect you to use command binding on everything.

But I still keep coming back to just wishing Noesis was MonoGame cross-platform as it would be a really easy way for me to build an in game editor for my game engine, without the complex hassle of ImGUI.

2 Likes

ImGUI is literally easiest to use, what hassle are you talking about? As mentioned above, it is used in production in high end companies, neosis on the other hand… you sure you aint Noesis salesman? Honestly, imgui is as comfortable as it gets, nothing comes close, Noesis is lightyears behind.

(I mean, I know you listed some issue, but I’ve integrated ImGui into three projects, one using MG, one FNA and one own rendering back end and never had single issue you mentioned, so it is bit complicated to take them seriously)

1 Like