My Allegro5 Menu System
kuraigu

What do you think of my system?
How good is the design?

https://www.youtube.com/watch?v=z8N2OgJN1bs

Michael Branin

Played around with this. its nice But out of the box It puts the tex off the button. to get it to draw the text correctly I had to modify the draw texts lines

al_draw_text(mainmenu.buttonFont, buttonTextColor[1], gameWidth / 2 , mainmenu.y[1] + buttonFontSize, ALLEGRO_ALIGN_CENTER, "START");

and remove the portion of code + buttonFontSize for each line that drew a button.

Also straight of of the box the background image is too small (your res art folder) But that was an easy fix.

jmasterx

Any reason for not using a GUI lib with layouts like https://github.com/garrynewman/GWEN GWEN or Agui https://github.com/jmasterx/Agui ?

Thread #616283. Printed from Allegro.cc