Gooey GUI Library
|
Header file for the GooeyDropdown module. More...
#include "common/gooey_common.h"
Go to the source code of this file.
Functions | |
GooeyDropdown * | GooeyDropdown_Create (int x, int y, int width, int height, const char **options, int num_options, void(*callback)(int selected_index)) |
Adds a dropdown menu to the specified window. | |
Header file for the GooeyDropdown module.
Provides functions to create, handle, and render dropdown menus within a GooeyWindow.
GooeyDropdown * GooeyDropdown_Create | ( | int | x, |
int | y, | ||
int | width, | ||
int | height, | ||
const char ** | options, | ||
int | num_options, | ||
void(*)(int selected_index) | callback | ||
) |
Adds a dropdown menu to the specified window.
This function creates a new dropdown menu with the given list of options
x | The x-coordinate of the dropdown's position. |
y | The y-coordinate of the dropdown's position. |
width | The width of the dropdown menu. |
height | The height of the dropdown menu. |
options | The array of strings representing the dropdown menu options. |
num_options | The total number of options in the dropdown. |
callback | The function to call when an option is selected. It receives the index of the selected option. |