textprintf_right_ex(3)
Allegro manual β textprintf_right_ex(3) π bestie we are SO doing right-aligned text today.
β¨ NAME β¨
textprintf_right_ex β formatted right aligned output of a string. It's part of the Allegro game programming library, periodt. π
π SYNOPSIS π
#include <allegro.h>
void textprintf_right_ex(BITMAP *bmp, const FONT *f, int x, y, color,
bg, const char *fmt, ...);
π DESCRIPTION π
Okay so it's like textprintf_ex() but β plot twist β the x coordinate is interpreted as the right edge of the string, not the left. So your text gets right-aligned, slay. π¦
Heads up bestie: this function shares the text length limitation of textprintf_ex(). So don't come for me if your string is too long, it's giving same limits. π
Example time, look at this:
textprintf_right_ex(screen, font, SCREEN_W - 10, 10,
makecol(200, 200, 20), -1,
"%d bullets left", player_ammo);
That's the whole vibe. The x is SCREEN_W - 10, so the right edge sits 10 pixels from the right. Cute.
π SEE ALSO π
mwah π Allegro, version 4.4.3, textprintf_right_ex(3) β that's the whole manual page, bestie. π«Ά
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms