OCRudoku
v1.0
Resolve word grid with ease
|
Functions | |
void | EZ_process_drag_select (SDL_Window *window, SDL_Renderer *renderer, SDL_Event *event, EZ_INTERACTIBLE *inter, void *data) |
Processes the drag selection events for an interactible element. | |
EZ_drag_select * | EZ_create_drag_select (char *select_img, SDL_Renderer *renderer, anchore_point dst_anchore) |
Creates a new EZ_drag_select structure. | |
EZ_drag_select * EZ_create_drag_select | ( | char * | select_img, |
SDL_Renderer * | renderer, | ||
anchore_point | dst_anchore ) |
Creates a new EZ_drag_select structure.
This function initializes a new EZ_drag_select structure, which is used to handle drag selection within an SDL window. It loads the specified image, creates a texture from it, and sets up the drawable and interactible components of the drag selection.
select_img | The path to the image file used for the drag selection. |
renderer | The SDL_Renderer used for rendering the selection. |
dst_anchore | The anchore_point defining the destination anchore for the drawable. |
void EZ_process_drag_select | ( | SDL_Window * | window, |
SDL_Renderer * | renderer, | ||
SDL_Event * | event, | ||
EZ_INTERACTIBLE * | inter, | ||
void * | data ) |
Processes the drag selection events for an interactible element.
This function handles the drag selection logic for an interactible element within an SDL window. It processes mouse button down, mouse motion, and mouse button up events to manage the selection rectangle and its visibility.
window | The SDL_Window where the drag selection is taking place. |
renderer | The SDL_Renderer used for rendering the selection. |
event | The SDL_Event containing the event data. |
inter | The interactible element being processed. |
data | A pointer to the EZ_drag_select structure containing drag selection data. |