GeonBit.UI: UI extension for MonoGame

can you reproduce the garbage generation?

nopeā€¦ only what I showed in previous post (garbage collection every ~15 seconds and looks pretty flat.

Hello Geon,

How easy is it to change the textures and the look of the UI when using GeonBit.UI?

I really like what I see here, it looks very polished, but Iā€™m planning on making more of a dark/gritty game, and the feeling I get from the screenshots I see here is just too happyā€¦ itā€™s not very fitting for what I have in mind.

Itā€™s very easy, all the texture files are just lying there in plain png files (inside GeonBit.UI/themes//textures) , and if you do drastic change to panels borders (for example create panel texture with a much thicker border than default) you can update the textures metadata XML file (in same folder) to make GeonBit use it properly.

Hereā€™s an example of something awesome @matt did with it (hope itā€™s cool Iā€™m showing it off Matt ;)) https://t.co/t5VR8EwfDy

Ofc he did custom shader work too to get that animated effect, but its a good example of how different UI themes can look.

PS if you edit the theme itā€™s recommended to rename the theme folder so next time you do nuget update the GeonBit.UI package wonā€™t try to override your files.

1 Like

No problem @GeonBit. All the textures can be easily replaced. Like Ronen said - make a copy of a theme folder and start experimenting with the contents.

1 Like

Awesome! Thanks for the replies. :slight_smile:

Hey guys, Iā€™ve been trying to use this with FNA, Iā€™ve fixed all the compile time errors, but at runtime Iā€™m having problems loading the xml data into the types defined in the DataTypes project (which I compiled linked with FNA btw), to be honest I donā€™t understand that custom pipeline thing, is it mandatory to convert those xml files into binaries (xnb I assume)? If not, are there any general directions on how to get things working? I thought that I could load the DataTypes.dll in the MonoGame pipeline tool somehow (compiled linked to the MonoGame framework obviously) and it would be able to convert those files and I would be able to use them in FNA, but that doesnā€™t seem to be the case so Iā€™m extremely confused on how that pipeline thing is supposed to work, even in MonoGame. Iā€™ve been able to use Ruminate and Gwen (by Benpye) but didnā€™t like them, the former is too basic and the latter has some issues. NuclearWinter I suppose is discontinued since the developers abandoned the game engine they were developing with it, and Iā€™m looking for something open source so EmptyKeys isnā€™t an option, and also I donā€™t want ā€œextravagant nonsenseā€ :stuck_out_tongue: so Neoforce for example is a no-go for me. This one seems quite good and I really liked the code, only problem is getting it to work with FNA so if you guys could gimme a hand Iā€™d appreciate. Thanks.

I never used FNA, but in MonoGame you can add references (dlls) to the content manager (click on the root directory and on the settings tab thereā€™s a references button) to make it recognize classes so it can later serialize from XML. Tbh Iā€™m not completely sure why it needs the reference but this is what youā€™re missing - the reference to DataTypes.dll from the content manager (at least thatā€™s the case with MG).

If thereā€™s an option to add reference to FNA content manager (does it have one?) this is probably what you need to do, if not, another option might be to install MG, compile the XMLs with it and add the compiled files to the content manager of FNA - as a port of xna it should be able to handle compiled content but as I said - I never worked with FNA so Iā€™m guessing here.

Btw if you make it work on FNA Iā€™d love to hear about it and what you needed to do to make it work - might as well update the docs with it :slight_smile:

I still donā€™t understand how that content pipeline thing works, however, in order to learn that I think a good way would be to see how it works in MonoGame, the problem is, I canā€™t make it workā€¦ when I try to run the solutions in the project (which should run the examples) I get a lot of these:

Processor ā€˜FontDescriptionProcessorā€™ had unexpected failure!
Importer ā€˜XmlImporterā€™ had unexpected failure!

However, I donā€™t see any code not even remotely resembling an importer of kindsā€¦ am I supposed to provide an importer or something? If I can get it working in MonoGame (and understand the black magic) I think I can make it work with FNA, but so far Iā€™m quite confused :(. Iā€™ve tried both the solution at the root and in the MG36 folder.
I did read the docs and in ā€œManual Installā€ I donā€™t know how to perform the step 2ā€¦ Iā€™ve read quite a bit of docs, even the CocosSharp, but I still have no idea what is this ā€œpipeline managerā€, I donā€™t think itā€™s the graphical asset converter tool, but I donā€™t know if itā€™s a project or what, maybe itā€™s something very obvious Iā€™m missing because apparently everybody knows what it is :).

Well, apparently the so called ā€œpipeline managerā€ is indeed the pipeline tool. I found a way to add references but itā€™s a bit obscureā€¦ I could link it to the DataTypes dlls and it worked fine to convert the types there into binaries, however, there are some files in the folders like styles and fonts which it wonā€™t convertā€¦ anyway, after fiddling around I could get it working in FNA (kinda), it doesnā€™t properly because of those files I couldnā€™t convert into binaries, but at least it runs. I still canā€™t find a way to get it working on MonoGame (whatā€™s kinda ironic provided itā€™s the supported framework :stuck_out_tongue: ).

I think I found a clueā€¦ when I build the MonoGame project, it calls MGCB.exe (donā€™t know where though, itā€™s not in build actions), and it calls it with an absolute path to the directory of the project, and MGCB.exe looks at the wrong place, for example, this:

ā€œC:\Program Files (x86)\MSBuild\MonoGame\v3.0\Tools\MGCB.exeā€ /@:ā€œG:\TESTS\uimg\GeonBit.UI-master\GeonBit.UI.MG36\Content\Content.mgcbā€ /platform:DesktopGL /outputDir:ā€œG:\TESTS\uimg\GeonBit.UI-master\GeonBit.UI.MG36\Content\bin\DesktopGLā€ /intermediateDir:ā€œG:\TESTS\uimg\GeonBit.UI-master\GeonBit.UI.MG36\Content\obj\DesktopGLā€ /quiet

still looks at the working directory, I donā€™t know if itā€™s a bug in MGCB or what, but that returns with error code 214 and when ran in cmd it says it canā€™t find the resources.
This pipeline thing is driving me crazy thoughā€¦ it shouldnā€™t be so complicated. A lot of things seem to work by black magic so when they break you have no clue on how to even start to fix it.

Also, the MG36 project isnā€™t 100% correctly configured, the DataTypes is still linked to 3.5 libs.

Iā€™m finding these error messages much more cryptic than C++ :stuck_out_tongue: hehe.

The Build Action for the .mgcb file is probably set to MonoGameContentReference. That build action is imported in the templates MG provides. If youā€™re interested, itā€™s defined in the .targets file here. That sets a build hook that builds and copies added or changed content referenced in the .mgcb when you build the project. The error message you get in VS when a build fails are not helpful, so I recommend you build the content using the Pipeline Tool to get more specific error messages.

I seeā€¦ anyway, I do understand how the content pipeline works in theory, in fact itā€™s very simple, you have ā€˜importersā€™ that convert sources into some kinda binaries you can use in the engine, and that mgcb tool is just a tool to automate the batch processing of the assets, however, in practice itā€™s a different beast. I canā€™t for the love of mine get it to process the GeonBit UI assets, spritefonts fail with index outta bounds, effects fail with some directx dependency problems, some xmls also fail with ā€œelement ā€˜Bā€™ is requiredā€, whatever that means. Iā€™m giving @prime31ā€™s Nez another try. The official FNA repos wonā€™t work for me so Iā€™m setting it up by hand, but at least it officially supports FNA.

Hi @Alan,

Sorry for the late replay, wasnā€™t here lately. Which MonoGame are you using? And are you using the NuGet package and followed the instructions in the readme?

BTW, if you work on Linux thereā€™s a known issue to build effects (not related to GeonBit, its in MonoGame), so you need to use the pre-compiled effects.

Also, if you download the entire git and just build it as an exe instead of a lib, does it work for you? The project from the git should compile as an exe and run a demo program.

Thanks,

Hi, no apology necessary. Iā€™ve tried both in MG3.5.1 and the latest 3.6, none of them could build the contents; 3.6 fails building spritefonts with unexpected failure. I did download the entire git and tried to build, the solution, as well as the MG36 project to no avail. I managed to get it working in FNA though, just without the content pipeline of course. So, no worries, Iā€™m not really planning to use MonoGame anytime soon anyway. But boy, every time Iā€™ve tried it, the experience was never smooth, and I still donā€™t know how some things work, for example I managed to get the latest Nez running in the latest FNA but it was a bit of hit and miss since I really donā€™t know how the whole shebang works, Iā€™ve even opened the csprojs and sln to take a look, but some things, like for example when I try to reproduce the FNATester from scratch I get very different results, even adding the exact same references it still wonā€™t find stuff like Content for example, so these things I can only describe as black magic :).

I donā€™t know man I never had these kind of problems with MonoGame beforeā€¦ sounds like something is broken, are you using Windows with visual studio? I think MG work best on vs/Windows.

Yes, I am using VS2017, but no problem man, Iā€™m going to give it another try next weekend. Thanks for your support so far :slight_smile:

On the git page, it mentions

It is currently not designed for keyboard-only / joystick input (e.g. it doesnā€™t support tab navigating etc.)

Are there any plans on supporting that form of input? Is there any easy way to disable mouse input as it is?

sorry but not at the moment. it will require some coding work to get what you want. If youā€™re up to the challenge I can guide you with some hints of what to change and where, send me an email or pm if youā€™re interested.

This is impressive. Is there a tutorial on using this UI with a touch interface?