Gooey GUI Library
Loading...
Searching...
No Matches
gooey_label.h File Reference

Header file for the GooeyLabel module. More...

#include "common/gooey_common.h"

Go to the source code of this file.

Functions

GooeyLabel * GooeyLabel_Create (const char *text, float font_size, int x, int y)
 Creates a Label.
 
void GooeyLabel_SetText (GooeyLabel *label, const char *text)
 Sets the text of an existing label.
 
void GooeyLabel_SetColor (GooeyLabel *label, unsigned long color)
 Sets the text color of a label.
 

Detailed Description

Header file for the GooeyLabel module.

Provides functions for creating, modifying, and rendering text labels within a GooeyWindow.

Author
Yassine Ahmed Ali @license GPL-3.0

Function Documentation

◆ GooeyLabel_Create()

GooeyLabel * GooeyLabel_Create ( const char *  text,
float  font_size,
int  x,
int  y 
)

Creates a Label.

Creates a new GooeyLabel with the given text, font size, and position.

Parameters
textThe text to display on the label.
font_sizeThe font size of the label's text.
xThe x-coordinate of the label's position.
yThe y-coordinate of the label's position.
Returns
A pointer to the newly created GooeyLabel object.

◆ GooeyLabel_SetColor()

void GooeyLabel_SetColor ( GooeyLabel *  label,
unsigned long  color 
)

Sets the text color of a label.

Changes the text color of a label to the specified color.

Parameters
labelA pointer to the label whose color is to be changed.
colorA string representing the color (e.g., "red", "#FF0000").

◆ GooeyLabel_SetText()

void GooeyLabel_SetText ( GooeyLabel *  label,
const char *  text 
)

Sets the text of an existing label.

Updates the text displayed by a given GooeyLabel.

Parameters
labelThe label to update.
textThe new text to display on the label.