|
OCRudoku
v1.0
Resolve word grid with ease
|
Functions | |
| void | EZ_process_button (SDL_Window *window, SDL_Renderer *renderer, SDL_Event *event, EZ_INTERACTIBLE *inter, void *data) |
| Processes button events for an EZ_button. | |
| EZ_button * | EZ_create_button (char *back_img, SDL_Renderer *renderer, anchore_point dst_anchore) |
| Creates an EZ_button with the specified background image and anchoring point. | |
| EZ_button * EZ_create_button | ( | char * | back_img, |
| SDL_Renderer * | renderer, | ||
| anchore_point | dst_anchore ) |
Creates an EZ_button 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_button structure with the given renderer and anchoring point.
| back_img | The file path to the background image for the button. |
| renderer | The SDL_Renderer used for rendering the button. |
| dst_anchore | The anchoring point for the button. |
| void EZ_process_button | ( | SDL_Window * | window, |
| SDL_Renderer * | renderer, | ||
| SDL_Event * | event, | ||
| EZ_INTERACTIBLE * | inter, | ||
| void * | data ) |
Processes button events for an EZ_button.
This function handles SDL mouse button events for an EZ_button. It checks if the left mouse button is pressed down or released while over the button, and triggers the appropriate callbacks if set.
| window | The SDL_Window where the button is rendered. |
| renderer | The SDL_Renderer used for rendering. |
| event | The SDL_Event containing the event data. |
| inter | The EZ_INTERACTIBLE associated with the button. |
| data | A pointer to the EZ_button data. |