How to ... in Allegro or SDL?
Moderator: Coders of Rage
How to ... in Allegro or SDL?
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...
- PixelP
- Chaos Rift Regular
- Posts: 153
- Joined: Tue Oct 07, 2008 12:23 pm
- Programming Language of Choice: c/c++
- Location: sweden
- Contact:
Re: How to ... in Allegro or SDL?
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
SDL tutorials: http://lazyfoo.net/SDL_tutorials/index.php
Allegro tutorials: http://loomsoft.net/resources/alltut/alltut_index.htm
- programmerinprogress
- Chaos Rift Devotee
- Posts: 632
- Joined: Wed Oct 29, 2008 7:31 am
- Current Project: some crazy stuff, i'll tell soon :-)
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++!
- Location: The UK
- Contact:
Re: How to ... in Allegro or SDL?
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
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
---------------------------------------------------------------------------------------
I think I can program pretty well, it's my compiler that needs convincing!
---------------------------------------------------------------------------------------
And now a joke to lighten to mood :D
I wander what programming language anakin skywalker used to program C3-PO's AI back on tatooine? my guess is Jawa :P
I think I can program pretty well, it's my compiler that needs convincing!
---------------------------------------------------------------------------------------
And now a joke to lighten to mood :D
I wander what programming language anakin skywalker used to program C3-PO's AI back on tatooine? my guess is Jawa :P