[AD] allegro5 gui

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I got wondering about the status of the allegro5 GUI code yesterday so I decided to compile exgui.c. It constantly segfaulted. So I got looking at the gui.c and guiproc.c looking to fix it and modernize it. It didn't look hopeful.

So I decided to get started writing an addon from scratch but this time keeping things simple and visually appealing. I'm hoping to make something people would actually use in a game or even just a main-menu. I just want to keep this as a small set of independant widgets and not a complete gui framework.

Right now I have a fully functional button and integrated it into exnew_events.c. Pretty buttons are made by adding a bitmap for each of the button states. I discovered animated transitions could be done for free by using blending (ie: draw over itself every frame and it will converge to the correct bitmap). Buttons can also be done by draw_rectangle with a background colour and a border colour for each of the button states.

The gui does not add events or use callbacks because that would complicate things too much. State can be handled more flexibly by the user checking al_check_button(&button1) whenever the mouse is moved or clicked using existing events.

So.. I'm looking for other possible widgets to add. Right now I'm considering a text-input, checkbox, and a drop-down list.

Comments are much appreciated.

--ryan


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/