Nearly all games must have some sort of UI - so what have people been doing when using monogame. I’ve done some (admitedly not much) searching, but not really found what looks like a good answer.
Even implementing a simple text box is probably a lot of work to get the input handling etc. done. Does everyone roll their own or are there libraries people are using?
I have written my own UI system, and I update it when I need a new function, but if you don’t want to write your own, try theese:
I’ve used a variety of systems. Some based on XNA’s Game State Management sample and some custom written for the project. I’ve seen many projects use XNA’s Game State Management sample as a basis for their screen and UI systems.
What you ultimately use will depend on your UI requirements. Do you just need a gamepad-controlled list of menu items? Or do you need a more complex UI that has buttons, formatted text boxes, checkboxes and scrolling lists with keyboard, mouse and touch input? Or something in between?
I started rolling my own GUI framework about a year ago and what I ended up with was a complete game framework… lol.
You can see a screenshot of the GUI in action here:
The game framework is called Astrid. It does some of the things that MonoGame does, and is heavily influenced by LibGDX. I’ve also sprinkled in lots of my own ideas. It’s open source, and you’re welcome to take a look at how the GUI system works.
It’s mostly just me working on the project, so it’s not as complete as MonoGame or LibGDX but it does do enough to make a game.
Just some simple textboxes, buttons - basic stuff
When you say textboxes, do you mean a label for display or text edit for entry of text by the user via a keyboard? One is simple (can be complicated as well if you need more features) and the other gets more complicated real quick depending on your requirements.
The questions you need to define:
- do you need line- or word-wrapping?
- do you need clipping of text to the bounds of the control?
- international language support?
- left/centre/right/full justification?
- colour support? For the entire text or per-character/word?
The fewer features you need, the simpler it gets.
Heh, just a simple text box, eg. For a username. I think I’ve got ruminate up and running from the links above. Will try that. Thanks