Page 1 of 1

How to ... in Allegro or SDL?

Posted: Fri Nov 28, 2008 7:31 pm
by XianForce
Well I wanted to make a simple as hell GUI for something where it just has a blue screen with 40 % opaqueness. Then it would just display options and you could use the up and down arrow keys to go through the options then the left and right arrow keys to open that option. I would assume I need some sort of API even for something as simple as this, but how would I go about doing this? I was looking through allegro docs and they aren't very helpful, its too inorganized xD...

Re: How to ... in Allegro or SDL?

Posted: Sat Nov 29, 2008 12:23 am
by PixelP
Do some tutorials and see how the two libraries are like.
SDL tutorials: http://lazyfoo.net/SDL_tutorials/index.php
Allegro tutorials: http://loomsoft.net/resources/alltut/alltut_index.htm

Re: How to ... in Allegro or SDL?

Posted: Sat Nov 29, 2008 7:03 am
by programmerinprogress
There Are specialised GUI extensions for the Allegro and SDL libraries(I think), although i've never used them.

If you want to make a very simple GUI, I guess you could write your own routines to display menus, I once built a little toolbar for an editor I made within a single window in SDL, so it wasnt a 'true' menu, but you could click on icons, and stuff would happen, which was all I needed.

I just used a little enginuity, think about it, SDL supports event-driven programming, so all you do is use those events (such as mouse down, mouse up, arrow keys etc), use them to work to your needs, if you do it right, you've got a simple menu system!

It all just depends on what your needs are, if you only need a few menu options/buttons, you can get away with simple controls.

I hope this helped ;)