]> git.lizzy.rs Git - nothing.git/blob - src/game/edit_field.h
(#274) implement edit_field_delete
[nothing.git] / src / game / edit_field.h
1 #ifndef EDIT_FIELD_H_
2 #define EDIT_FIELD_H_
3
4 #include <SDL2/SDL.h>
5
6 #include "color.h"
7 #include "math/point.h"
8
9 typedef struct edit_field_t edit_field_t;
10 typedef struct sprite_font_t sprite_font_t;
11
12 edit_field_t *create_edit_field(const sprite_font_t *font,
13                                 vec_t font_size,
14                                 color_t font_color);
15 void destroy_edit_field(edit_field_t *edit_field);
16
17 int edit_field_render(const edit_field_t *edit_field,
18                       SDL_Renderer *renderer,
19                       point_t position);
20
21 int edit_field_handle_event(edit_field_t *edit_field,
22                             const SDL_Event *event);
23
24 const char *edit_field_as_text(const edit_field_t *edit_field);
25
26 #endif  // EDIT_FIELD_H_