-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLocGUI.h
41 lines (30 loc) · 967 Bytes
/
LocGUI.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef LOCALITY_GUI_H
#define LOCALITY_GUI_H
#include <inttypes.h>
#include "SDL2-Utility/graphicsutils.h"
struct SysData;
typedef struct pressable_l{
struct Blitable normal;
struct Blitable hover;
struct Blitable press;
struct Blitable* active;
void (*action)(void*);
uint32_t w;
uint32_t h;
}pressable_l;
void pressable_l_init(pressable_l* pres, void act(void*), const char* normal, const char* hover, const char* press, uint32_t w, uint32_t h);
void pressable_hovered(uint32_t entity, pressable_l* press);
void pressable_su(struct SysData* sys);
void pressable_sr(struct SysData* sys);
void pressable_f(struct SysData* sys);
typedef struct text_l{
const char* content;
uint8_t r;
uint8_t g;
uint8_t b;
uint8_t a;
}text_l;
void text_l_init(text_l* txt, const char* message, uint8_t r, uint8_t g, uint8_t b, uint8_t a);
void text_l_setColor(text_l* txt, uint8_t r, uint8_t g, uint8_t b, uint8_t a);
void text_sr(struct SysData* sys);
#endif