d_textbox_proc(3)
π d_textbox_proc β the Allegro manual, but make it cute π
okay bestie, welcome to the Allegro game programming library, and specifically to d_textbox_proc(3) β the manual page for the dialog procedure that literally IS a text box object. yes, that text box. the scroll-y one. the one you're gonna be obsessed with. π
β¨ SYNOPSIS β¨
#include <allegro.h>
int d_textbox_proc(int msg, DIALOG *d, int c);
like. look at it. three args. slay. π
πΈ DESCRIPTION πΈ
so here's the tea: this is a text box object. iconic behaviour, no notes.
the dp field points to the text that's gonna be displayed in the box. that's the whole vibe β dp = your words, your moment. β¨
now, if your text is long (and it's giving "I have so much to say"), there's gonna be a vertical scrollbar on the right hand side of the object, and you can use it to scroll through the text. main character energy, scrolling through your own lore fr fr. π¦
the default? it prints the text with word wrapping. cute, tidy, respects the words. but β and this is the plot twist β if the D_SELECTED flag is set, the text gets printed with character wrapping instead. different wrapping, different vibe. not me choosing based on a flag π
as for the fields doing quiet internal labour (we love a humble icon):
d1β used internally to store the number of lines of text. it's keeping count. it's keeping track. it's lowkey the accountant of this whole operation. πd2β used internally to store how far it has scrolled through the text. it's the one remembering where you left off. so real of it. π
heads up bestie:d1andd2are internal storage. that's their job. that's their whole thing. don't be weird about it. π
π₯ SEE ALSO π₯
go look at the example, it's literally right there, iykyk. β
and that's the page!! π«Ά brought to you by Allegro, version 4.4.3 β this specific text box manual page was living its life as part of that release. periodt. πβ¨πΈ
π¦ 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