Forums Archived

The forums are being archived. See this topic for more information.

How are folks doing UI elements, like menus?

Get help and support with Rubygame

How are folks doing UI elements, like menus?

Postby cgmjr » Mon Feb 01, 2010 4:14 pm

Reading through the comments on Sprites, I see:
Code: Select all
...sprites can be the foundation of most on-screen objects, such as characters, items, missiles, and even user-interface elements.

That sounds nice. I'm putting a pretty face on my prototype. It is an intro screen with a couple of menu options. I've gimped it up pretty, including the "buttons" themselves.

But I need to do a hotspot or something to allow the user to activate the option. I'm considering doing a Sprite-something, perhaps a transparent Rect and some sort of collision detect with a mouse click.

Before I chase that rabbit, how are y'all doing that sort of thing, if at all?
User avatar
cgmjr
 
Posts: 39
Joined: Mon Jan 11, 2010 6:41 am

Re: How are folks doing UI elements, like menus?

Postby jacius » Mon Feb 01, 2010 9:09 pm

I know of two existing GUI libraries that work with Rubygame:

IMO, Rubygoo is the more mature and well designed of the two, so I would check it out first.
User avatar
jacius
Site Admin
 
Posts: 131
Joined: Fri Feb 06, 2009 11:13 pm

Re: How are folks doing UI elements, like menus?

Postby kiba » Mon Feb 01, 2010 9:45 pm

Don't use rbgooey. It's outdated and crappy. (Yes, I wrote it)
I write libre games. My libre game programming service is also availiable for anybody that want to pay.

I ran the Libregamewiki, the free gaming encyclopedia.
kiba
 
Posts: 53
Joined: Sat Feb 07, 2009 2:13 am

Re: How are folks doing UI elements, like menus?

Postby cgmjr » Mon Feb 01, 2010 11:43 pm

kiba wrote:Don't use rbgooey. It's outdated and crappy. (Yes, I wrote it)


*laugh* Okey dokey.

My needs are pretty simple, and I have it mostly working. It is not very extensible, and I'll have to pay off that debt eventually, but hats off again to Rubygame for Least Astonishment :) I grabbed the MouseReleaseEvent and used:

Code: Select all
if @my_rect.collide_point?(*event.pos)


to determine if the mouse click is within the area of my image that represents a menu option.

Now, about Screen.update(Rect)...hmm...
User avatar
cgmjr
 
Posts: 39
Joined: Mon Jan 11, 2010 6:41 am

Re: How are folks doing UI elements, like menus?

Postby shawn42 » Tue Feb 02, 2010 4:19 pm

Rubygoo development has been halted. I am working to incorporate the UI elements into Gamebox. But it still works (well I think) and provides theming too! Let me know if you use it and need any help. I'm also usually available in #rubygame or #gamebox on freenode.
User avatar
shawn42
 
Posts: 109
Joined: Tue Feb 10, 2009 8:22 pm


Return to Help & Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron