Not logged inGosu Forums
Forum back to Help Search Register Login
Up Topic Gosu / Gosu Exchange / Is there any Gui libs that extend Gosu?
- - By Azurazen Date 2014-11-14 01:01
I know of fidgit and gglib, but are they still in development or have they faded away?

If there isn't what would be the best way to go about making a gui? Is there any resources that I should look at specifically?
Parent - By jlnr (dev) Date 2014-11-14 04:56
I think most games just write their menu & HUD code from scratch. I think the key to implementing any kind of GUI is to segment your apps into "states" or "scenes" so that you don't end up with the messiness of seven different menus in a single Window subclass. Most games in the Gosu Exchange forum should get this right, so you can look at them.
And if you need a complete GUI toolkit because your app needs more than plain buttons, you can always fork and improve either of the existing GUI libraries. The next user might appreciate it :)
Parent - - By jahmaican Date 2014-11-14 08:33 Edited 2014-11-14 08:40
Making GUIs is actually quite straightforward so you should go ahead and try doing it your way. First, think what elements you need, and then just write it how you feel it.

For example, if you need a dialog box, it needs a state for it - and then you can have a method for invoking a dialog in game, i.e. game pauses and the box with given contents is shown on top.
Then, to let user actually do something, you need a concept of button (that has some text on it and a certain action), and then a concept of the action itself. E.g. there will be a 'Cancel' button, that invokes 'cancel' action when clicked, and this action does nothing but return to previous state.
Of course there's more than one way to implement the above and you can hardly go wrong with such simple stuff, so again - do it how you feel it and then think if it makes sense. Eventually you will end up with a piece of code that does exactly what you need, and not "everything that anyone could ever need".

On a not-so-relevant thought, I played with actual ruby GUI libraries once and turns out you can easily use gosu and wx together (meaning you can have separate gosu window and wx app and they can communicate in real time).
Parent - - By jlnr (dev) Date 2014-11-14 15:04

> you can easily use gosu and wx together

Wait what?! That's always relevant! :) Doesn't wx have a main loop that you need to run (same as Gosu::Window#show)?

I was always waiting for a Ruby GUI framework to become the de-facto standard, and then I wanted to add integration with Gosu. But that doesn't seem to happen, and if wx works with Gosu without me doing anything, I should at least ship an example. (If you still have a test project floating around, let me know :) )
Parent - - By jlnr (dev) Date 2014-11-14 15:17
Umm, and am I mistaken or is it not really possible to install wxWidgets on anything but Windows anymore? There is a Mac gem, but it crashes when you run it on a modern, 64-bit Mac. :(
Parent - By jahmaican Date 2014-11-14 16:38
Don't ask a Windows user :)

But sure, I can provide an example when I get home.
Parent - By lol_o2 Date 2014-11-14 14:25
I made a "framework" (and I update it sometimes), which among some useful features, has a GUI. I used it several times so it's tested and working and even extensible. But it's now quite user friendly (yet) when it comes to extend or separate it from "framework". You can download examples from GitHub.
Parent - By SamVimes Date 2014-11-26 21:55
> and gglib, but are they still in development or have they faded away?

I read the thread about gglib and was really interested to try the 2.0 version.  But I couldn't find it anywhere.  The source code location,, looks to be gone.  There's a 1.3.0 version on RubyGems, but it's clearly not the newest (May 2009, versus the April 2011 date on that newest post).  There's also a GitHub project, but it's empty.

psadda, are you still around?

I can build my own widgets one at a time, but it seems a shame, if someone else has already forged the path.  Plus, I know my strengths, and UI design ain't one of them.
- By Azurazen Date 2014-11-15 00:46
Thanks for the information, Im going to give it a shot building one myself..again.... I've just gotta remember not to let it consume my entire project ha ha.
Up Topic Gosu / Gosu Exchange / Is there any Gui libs that extend Gosu?

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill