OCRudoku
v1.0
Resolve word grid with ease
|
Functions | |
void | EZ_process_text_input (SDL_Window *window, SDL_Renderer *renderer, SDL_Event *event, EZ_INTERACTIBLE *inter, void *data) |
Processes textinput events for an EZ_text_input. | |
EZ_text_input * | EZ_create_text_input (char *back_img, TTF_Font *font, SDL_Color color, size_t max_length, input_type type, SDL_Renderer *renderer, anchore_point dst_anchore) |
Creates an EZ_text_input with the specified background image and anchoring point. | |
EZ_text_input * EZ_create_text_input | ( | char * | back_img, |
TTF_Font * | font, | ||
SDL_Color | color, | ||
size_t | max_length, | ||
input_type | type, | ||
SDL_Renderer * | renderer, | ||
anchore_point | dst_anchore ) |
Creates an EZ_text_input with the specified background image and anchoring point.
This function loads an image from the specified file path, creates an SDL texture from it, and initializes an EZ_text_input structure with the given renderer and anchoring point.
back_img | The file path to the background image for the textinput. |
renderer | The SDL_Renderer used for rendering the textinput. |
dst_anchore | The anchoring point for the textinput. |
void EZ_process_text_input | ( | SDL_Window * | window, |
SDL_Renderer * | renderer, | ||
SDL_Event * | event, | ||
EZ_INTERACTIBLE * | inter, | ||
void * | data ) |
Processes textinput events for an EZ_text_input.
This function handles SDL mouse textinput events for an EZ_text_input. It checks if the left mouse textinput is pressed down or released while over the textinput, and triggers the appropriate callbacks if set.
window | The SDL_Window where the textinput is rendered. |
renderer | The SDL_Renderer used for rendering. |
event | The SDL_Event containing the event data. |
inter | The EZ_INTERACTIBLE associated with the textinput. |
data | A pointer to the EZ_text_input data. |