GeonBit.UI: UI extension for MonoGame

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?

Hi @Mathetis, I’ll soon release a version that will address touch input.
@thera next version will allow finer control in input methods, so it might help you too. but I’m not sure it will be enough for full joystick / gamepad support, unless you want to use them to emulate mouse.

Will update soon when its ready.

Thanks :slight_smile:

@Mathetis here’s the promised update - I released a new version where you can override the class that provide GeonBit.UI mouse-based input, and emulate mouse events using touch input.

The rest of the system will act the same, only with touch instead of mouse.

It will require some implementation though, you’ll have to implement this API:

Let me know if something is unclear… cheers :slight_smile:

1 Like

Hi, just want to say I loved the demo and the potential in your UI library. Do you have any plans to make it compatibel with the new monogame 3.8 installs running under vs2019 ? I was trying to install it via nuget package version 3.4.0.1 but it fails as I get a message : GeonBit.UI 3.4.0.1 is not compatible with netcoreapp3.1

GeonBit.UI - GamePad-Support

It was about time…

Click to watch the YouTube-Video!

  • Implemented using the Microsoft.Xna.Framework.Input namespace from the MonoGame.Framework!
  • Available on my GamePad-Branch

Hello Com!

4 years after my original GamePad-Implementation for GeonBit.UI, I’m ready to show you my new one. But this time every single
usually interactable entity from the GeonBit.UI library is supported! No mouse-roaming anymore for “complex” entities like SelectList or DropDownButton or even complex UI-Scenarios with nested Panels and complex entities.

How does it work under the hood?

First of all I created the IGamePadInput interface of course and added its functionallity to the DefaultInputProvider. But instead of imitating the regular IMouseInput techniques, I created a specialized, GamePad-Supported version of each usually interactable entity of GeonBit.UI.

To enable the important core events for each entity in relation to the users GamePad-Input, I created an IEntityGamePad interface and traversed specialized GamePad-Events to the original GeonBit.UI-IMouseInput ones. This has the great advantage that I can precisley decide what action on each GamePad-Input-Supported-Entity really has to happen before the input get traversed to its final destination.

This also means that I nearly don’t needed to modify the original source code of GeonBit.UI, despite the general GamePad implementation and one single modification.

The one single core-change I did was on this line in the Entity class to make it possible to search in hidden entities (children):

The reason for this is that it wasn’t possible to find my own custom entites, when they were added to a PanelTabs-Entity, because its internal _panelsPanel (which hosts the added entites), got automatically skipped on Entity.Find() (because they are hidden by default).

However, this change will not break your existing code, because the “skipHidden” parameter automatically sets to false, which is the standard behavier of GeonBit.UI.

Also on board is a GamePadSetup class, which makes it easy to configure the deadzones of your GamePad-Thumbsticks for example, but it also initializes a set of RichParagraphStyleInstruction with original GamePad-Colors from Xbox-Controllers, so that it perfectly integrates with GeonBit.UI.

Where to find?

I know that the GeonBit.UI library is made of high-quality and so it should stay. In the moment you will only find this GamePad-Implementation on my GamePad-Branch.

Feel free to share your (improvment)-suggestions here and if you think that my work could meet the high quality expectations of this library, you could maybe give this post a like and show @GeonBit your interest in an official GamePad-Integration directly into the GeonBit.UI library.

In the case this should ever happen, I am willing to create a “clean” version of my GamePad-Branch which only contains the most important commits and a well integrated sample project.


Thanks for reading and have fun using your GamePad with GeonBit.UI! :grin:

Cheers,
Marcel

PS: TRY THE SAMPLE PROJECT!

- Made with :heart: -

1 Like

Hi all :slight_smile:
Happy to announce I just released a new version 4.0.6.1 which have the following changes:

  • Upgraded project to .net core 3.1.
  • Upgraded MonoGame version to 3.8.0.
  • Separated examples to a different project.
  • Fixed bug with line space and zoom (overflow panel).
  • Fixed bug with wrong slider being changed by mouse wheel after hover.

After I’ll use it a bit in my own project and see its stable, I’ll start checking out enhancements and PRs that are not bugfix, like the addition proposed by @BlizzCrafter above.

Please let me know if you find any issues with the new release :slight_smile:

Thanks!

1 Like

Hi all!

I don’t know how many of you are still using the GeonBit.UI package, but after a long time of neglection I finally updated to .net 6 and latest MonoGame version!

Let me know if you have any questions and sorry for not updating for a while, I haven’t touched MonoGame for a long time but I’m back :wink:

3 Likes

Hi @GeonBit ,

Welcome Back!

I’ve been using this library extensively for my project I’ve been developing and it has been very solid so far! There have been a few little things I have added as well as a fix or two, but I am very thankful for your development of this UI library.

If you’re curious, I can send you message with a video of my projects interface utilizing the library :slight_smile:

Any plans for new functionality for GeonBit.UI?

Thanks man :slight_smile:

If you have any PRs you want to submit with improvements and fixes feel free, I’ll try to be more on it now.

And sure Id love to see video if you have to share, I’m always keen to see fellow indie dev projects, especially if they use something I made.

Currently I dont have any features planned for it, but I’ll probably add some as I work on my project. I did add few improvements with the transition to .net 6 but it was mostly re-structuring the projects and adding the ability to switch theme on the fly.

Another update to GeonBit.UI - finally got rid of the content XML files and switched to regular XML files, meaning we no longer need to add reference to the DataType project.