Tuxánci 2
Successor to Tuxánci
 
Loading...
Searching...
No Matches
button.c File Reference

Button system. More...

#include "button.h"
#include "files.h"
#include "raylib.h"
#include <stdbool.h>

Functions

Button buttonCreate (const char *text, int x, int y, int w, int h)
 Creates a new Button.
 
void buttonDraw (Button *b)
 Draws a Button.
 
bool buttonPressed (Button *b)
 Check if a Button is pressed.
 

Detailed Description

Button system.

This file contains functions for creating, drawing, and checking if a button has been pressed.

Function Documentation

◆ buttonCreate()

Button buttonCreate ( const char * text,
int x,
int y,
int w,
int h )

Creates a new Button.

Parameters
textLabel on the Button
xHorizontal screen position of the Button
yVertical screen position of the Button
wWidth of the Button
hHeight of the Button
Returns
A Button struct

◆ buttonDraw()

void buttonDraw ( Button * b)

Draws a Button.

Parameters
bThe Button you want to draw

◆ buttonPressed()

bool buttonPressed ( Button * b)

Check if a Button is pressed.

Parameters
bThe Button you want to check if pressed
Returns
A boolen, true if the Button was pressed, false if the Button was not pressed