gui_textout_ex(3alleg4)

✨ NAME ✨

gui_textout_ex β€” draws a text string onto the screen with keyboard shortcut underbars. Allegro game programming library. (yep, straight from the 3alleg4 manual, bestie πŸ’…)


🌸 SYNOPSIS 🌸

#include <allegro.h>

int gui_textout_ex(BITMAP *bmp, const char *s, int x, y, color, bg,
centre);

πŸ’– DESCRIPTION πŸ’–

okay so gui_textout_ex is literally the helper function the GUI routines use, and it's giving main character energy for real. It draws a text string onto the screen, and the way it does it? It interprets the '&' character as an underbar β€” you know, for displaying keyboard shortcuts. iconic.

And bestie, it returns the width of the output string in pixels. So you know exactly how much space your text took. no cap. πŸ’―

quick vibe check: this is a helper for the GUI routines, so it's not out here doing the most β€” it's just doing its little job and doing it well. 🫢

πŸ¦‹ SEE ALSO πŸ¦‹

  • gui_strlen(3alleg4)

and that's the tea, bestie! β˜• this page came from Allegro version 4.4.3 and the 3alleg4 manual. slay. πŸ’…βœ¨