My game has basic functionality and is playable with a command line, but I would like to put a GUI on top of it.
It is a platformer type game written in C# with the XNA framework.
I have googled and found a few libraries, but they all seem very gum and duct tape. Is there a mature or standard way of making a GUI for my situation?
The most famous library to create some GUI in C language is certainly GTK. With this library you can easily create some buttons (for your example). When a user clicks on the button, a signal is emitted and you can write a handler to do some actions.
Building a simple GUI toolkit means providing a couple of basic primitive elements that render content, and then slightly more complex layout elements that can modify the way in which their primitives render the content. Is it possible to write a GUI in C without a Windows API, just a raw C code? Yes.
C has no such library connected to it like the string library, IO library, etc, that we every now and again use. This weakness opened the skyline for engineers to pick from a wide assortment of GUI library toolbox accessible in C.
The standard answer is: look at the Gamestate management tutorial in Education Catalog.
This doesn't give you very nice widgets, but rather shows a way of managing the game flow and some menus (including pause menu).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With