Gooey GUI Library
Loading...
Searching...
No Matches
gooey_label.h File Reference
#include "core/gooey_backend_internal.h"
#include "gooey_widgets_internal.h"

Go to the source code of this file.

Functions

GooeyLabel * GooeyLabel_Add (GooeyWindow *win, const char *text, float font_size, int x, int y)
 Adds a label to the window.
 
void GooeyLabel_SetText (GooeyLabel *label, const char *text)
 Sets the text of the label.
 
void GooeyLabel_Draw (GooeyWindow *win)
 Draws the label on the window.
 
void GooeyLabel_SetColor (GooeyLabel *label, const char *color)
 Sets the color of a label.
 

Function Documentation

◆ GooeyLabel_Add()

GooeyLabel * GooeyLabel_Add ( GooeyWindow *  win,
const char *  text,
float  font_size,
int  x,
int  y 
)

Adds a label to the window.

Parameters
winThe window to add the label to.
textThe text to display on the label.
xThe x-coordinate of the label's position.
yThe y-coordinate of the label's position.
Returns
A new GooeyLabel object.

◆ GooeyLabel_Draw()

void GooeyLabel_Draw ( GooeyWindow *  win)

Draws the label on the window.

Parameters
winThe window to draw the label on.

◆ GooeyLabel_SetColor()

void GooeyLabel_SetColor ( GooeyLabel *  label,
const char *  color 
)

Sets the color of a label.

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

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

◆ GooeyLabel_SetText()

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

Sets the text of the label.

Parameters
labelThe label to set the text for.
textThe new text to display on the label.