S3DW_TEXTBOX_NEW(3)

✨ S3DW_TEXTBOX_NEW ✨

okay bestie, this is page S3DW_TEXTBOX_NEW(3) from the s3d manual, and it's literally the glow-up tutorial for making a textbox. section 3, library call, you know the vibe πŸ’…


🌸 NAME 🌸

s3dw_textbox_new β€” spawn a brand new textbox on the surface, no cap ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <s3dw.h>

s3dw_textbox *s3dw_textbox_new(const s3dw_surface *surface,
                               const char *text, float posx, float posy,
                               float width, float height);

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically? it creates a new textbox on the surface, with text written on it, and the upper left corner parked at (posx,posy) on that surface. that's the whole anchor point, bestie, top-left is the main character here πŸ‘‘

and width and height? those define the size of the textbox β€” and like, including the scrollbars, because the scrollbars are rendered around the textfield. so don't come for me later being like "why is my box bigger than I asked", because the scrollbars were always part of the package deal 🫢

heads up: go read s3dw_textbox for the info about the callbacks you can define. the lore is over there, fr fr πŸ“–

πŸ’– AUTHOR πŸ’–

Simon Wunderlich β€” Author of s3d 🌟


and that's the tea πŸ“ this was page S3DW_TEXTBOX_NEW(3) out of the s3d manual (section 3, the library-call girlies πŸ’…). go forth and make textboxes, you're gonna slay 🧚✨