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
34
typedef
struct
Checkbox
{
35
Rectangle
rect
;
36
bool
state
;
37
bool
hovered
;
38
Color
baseColor
;
39
Color
checkedColor
;
40
}
Checkbox
;
41
42
Checkbox
checkboxCreate
(
int
x,
int
y);
43
void
checkboxDraw
(
Checkbox
* b);
44
bool
checkboxPressed
(
Checkbox
* b);
45
46
#endif
// CHECKBOX_H
checkboxCreate
Checkbox checkboxCreate(int x, int y)
Creates a new Checkbox.
Definition
checkbox.c:39
checkboxPressed
bool checkboxPressed(Checkbox *b)
Check if a Checkbox is pressed.
Definition
checkbox.c:64
checkboxDraw
void checkboxDraw(Checkbox *b)
Draws a Checkbox.
Definition
checkbox.c:54
Checkbox
Definition
checkbox.h:34
Checkbox::state
bool state
Checkbox state.
Definition
checkbox.h:36
Checkbox::rect
Rectangle rect
Checkbox size.
Definition
checkbox.h:35
Checkbox::checkedColor
Color checkedColor
Button color (checked)
Definition
checkbox.h:39
Checkbox::hovered
bool hovered
Is mouse over Button?
Definition
checkbox.h:37
Checkbox::baseColor
Color baseColor
Button color.
Definition
checkbox.h:38
include
checkbox.h
Generated by
1.13.2