-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmaud_modaldef.h
More file actions
58 lines (52 loc) · 1.71 KB
/
maud_modaldef.h
File metadata and controls
58 lines (52 loc) · 1.71 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef _MAUD_MODALDEF_H
#define _MAUD_MODALDEF_H
#include "maud_textinfodef.h"
#include "maud_inputboxesdef.h"
typedef struct maud_modal_header {
int padding_x, padding_y,
padding_height;
SDL_Rect canvas; // canvas for the header canvas
bool show_bgcolor; // a flag to determine wether to render the background color
SDL_Color color; // background color for the header
text_info_t title; // the title information for the header
} maud_modal_header_t;
typedef struct maud_modal_image {
int padding_y;
SDL_Rect canvas; // The canvas for the modal image
bool show_bgcolor; // whether to render the background color for the image
SDL_Color color; // background color for the image
char* path;
SDL_Texture* texture; // texture of the image
} maud_modal_image_t;
typedef struct maud_modal_button {
int padding_x, padding_y,
padding_width, padding_height;
SDL_Rect canvas;
SDL_Color color;
text_info_t text;
bool clicked;
} maud_modal_button_t;
typedef struct maud_modal_buttoncontainer {
int padding_y,
padding_height;
SDL_Rect canvas;
SDL_Color color;
} maud_modal_buttoncontainer_t;
typedef struct maud_modal_inputbox {
int padding_y;
maud_inputbox_t inputbox;
} maud_modal_input_t;
typedef struct maud_modal {
TTF_Font* font;
SDL_Rect canvas;
SDL_Color color;
maud_modal_header_t header;
maud_modal_image_t image;
int inputbox_padding;
maud_modal_input_t input;
maud_modal_button_t confirm_button;
maud_modal_button_t cancel_button;
maud_modal_buttoncontainer_t button_container;
bool enable_buttoncontainer, leave;
} maud_modal_t;
#endif