Tuxánci 2
Successor to Tuxánci
 
Loading...
Searching...
No Matches
checkbox.h
1/*
2 * Tuxánci 2 - Successor to Tuxánci
3 * Copyright (C) 2026 Connor Thomson
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18
27
28#ifndef CHECKBOX_H
29#define CHECKBOX_H
30
31#include "raylib.h"
32#include <stdbool.h>
33
34typedef struct Checkbox {
35 Rectangle rect;
36 bool state;
37 bool hovered;
38 Color baseColor;
40} Checkbox;
41
42Checkbox checkboxCreate(int x, int y);
43void checkboxDraw(Checkbox* b);
45
46#endif // CHECKBOX_H
Checkbox checkboxCreate(int x, int y)
Creates a new Checkbox.
Definition checkbox.c:39
bool checkboxPressed(Checkbox *b)
Check if a Checkbox is pressed.
Definition checkbox.c:64
void checkboxDraw(Checkbox *b)
Draws a Checkbox.
Definition checkbox.c:54
Definition checkbox.h:34
bool state
Checkbox state.
Definition checkbox.h:36
Rectangle rect
Checkbox size.
Definition checkbox.h:35
Color checkedColor
Button color (checked)
Definition checkbox.h:39
bool hovered
Is mouse over Button?
Definition checkbox.h:37
Color baseColor
Button color.
Definition checkbox.h:38