feat: cluster implemented
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
lulcaaaa
2024-12-06 20:03:12 +01:00
parent ef4938542c
commit 4642cd68a2
3 changed files with 13 additions and 2 deletions

View File

@ -18,7 +18,7 @@
#include <SDL2/SDL_image.h>
#include <stdio.h>
#include <string.h>
#include "selection_menu.h"
#define MAX_PATH_LEN 256
EZ_DRAWABLE* main_menu_drawables[12];
@ -74,8 +74,10 @@ void button_action_switch(EZ_button* tmp)
{
(void)tmp;
loaded_image= rotate_pixels(loaded_image, rotation);
on_selection_menu_load();
EZ_select_menu(1);
selection_menu_enter();
}
void load_image(EZ_text_input* tmp)

View File

@ -21,6 +21,11 @@ EZ_INTERACTIBLE* selection_menu_interactibles[6];
void* selection_menu_objects[14];
pixel_cluster** cluster_splitting;
size_t linkage_length;
size_t* array_length;
EZ_MENU selection_menu;
void unload_selection_menu(void)
@ -30,7 +35,10 @@ void unload_selection_menu(void)
free(selection_menu_objects[i]);
}
}
void on_selection_menu_load()
{
cluster_splitting= get_main_linkages(loaded_image, &linkage_length, &array_length);
}
void selection_menu_process_events(SDL_Window* window, SDL_Renderer* renderer, SDL_Event* event, EZ_MENU* current_menu) //exectuted each frame with all avaliable events
{

View File

@ -9,4 +9,5 @@ void load_selection_menu(SDL_Renderer* renderer);
void selection_menu_enter(void);
void on_selection_menu_load();
#endif