S3DW_BUTTON_NEW(3)

πŸ’– s3dw_button_new β€” bestie, let's make a button πŸ’–

okay so this is S3DW_BUTTON_NEW(3), from the s3d manual, and it's genuinely one of my faves because it's SO straightforward. no cap. you want a button? boom. button. πŸ’…


✨ NAME ✨

s3dw_button_new β€” create a new button in the surface πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <s3dw.h>

s3dw_button *s3dw_button_new(const s3dw_surface *surface,
                             const char *text, float posx, float posy);

like. look at it. four args. iconic. 🌸


πŸ’œ DESCRIPTION πŸ’œ

So the way this works is: it creates a new button on the surface. that's the whole vibe.

The button gets "text" written on it β€” yes, literally that text, that's your label bestie β€” and its upper left corner sits at (posx,posy) on the surface. upper left. not center, not lower right, upper left. keep that in mind or your layout will be giving chaos. 😭

fr fr, if you wanna know about the callbacks you can define on this thing, go read s3dw_button. that's where the callback tea is. 🫢

πŸ‘‘ AUTHOR πŸ‘‘

Simon Wunderlich β€” Author of s3d ⭐


and that's the whole page, bestie!! πŸ’– go forth and make buttons, you're gonna eat. no notes.

sign-off time πŸŽ€ β€” this little masterpiece lives in the s3d manual, and its page name is S3DW_BUTTON_NEW(3), mwah. πŸ’…βœ¨