d_textbox_proc(3alleg4)

πŸ’– d_textbox_proc πŸ’–

okay so bestie, welcome to the d_textbox_proc page from the Allegro manual (that's section 3alleg4, iykyk) πŸŽ€ β€” and yes it's the Allegro game programming library, the whole vibe. Let's get into it, no cap.


✨ NAME ✨

d_textbox_proc β€” a dialog procedure that implements a text box object πŸ’…. Straight from the Allegro game programming library, periodt.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro.h>

int d_textbox_proc(int msg, DIALOG *d, int c);

🌸 DESCRIPTION 🌸

So this right here is a text box object, and honestly? Iconic. Here's the tea β˜•:

  • The dp field points to the text that's gonna be displayed in the box. That's the whole main character right there.
  • If the text is long, a vertical scrollbar shows up on the right hand side of the object, and you can use it to scroll through the text. Very demure, very mindful scrolling behavior 🫢.
  • By default the text gets printed with word wrapping. But β€” plot twist β€” if the D_SELECTED flag is set, the text gets printed with character wrapping instead. Two different wrapping vibes, pick your fighter πŸ’€.
  • The d1 field is used internally to store the number of lines of text. Not your business, it's her business πŸ™ˆ.
  • The d2 field is used to store how far it has scrolled through the text. Also internal. Also not your business.
lowkey reminder: d1 and d2 are internal bookkeeping fields here β€” the manpage says so, so don't go messing with them like they're yours, bestie 😭

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, bestie! ✨ This was d_textbox_proc from the Allegro manual, version 4.4.3 β€” slay, ate, no crumbs left πŸ’…πŸ’–πŸ¦‹πŸŒΈπŸŽ€