From 71dd7fcccb45a54d85ae23a95a8a8905ed21fe15 Mon Sep 17 00:00:00 2001 From: aura Date: Sun, 1 Mar 2026 20:16:45 +0100 Subject: wip on dropdowns --- src/gui/base.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/gui/base.h') diff --git a/src/gui/base.h b/src/gui/base.h index 230a63e..73816a7 100644 --- a/src/gui/base.h +++ b/src/gui/base.h @@ -69,6 +69,7 @@ extern struct GUI_LABEL* gui_label( I32 x, I32 y, const char* title, ... ); extern struct GUI_BUTTON* gui_button( I32 x, I32 y, I32 w, I32 h, const char* title, GUI_CALLBACK cb ); extern struct GUI_TEXTBOX* gui_textbox( I32 x, I32 y, I32 w, I32 h, const char* title, U32 maxlen, U8 allow_newl = 0 ); extern struct GUI_CHECKBOX* gui_checkbox( I32 x, I32 y, const char* title, U8* pval ); +extern struct GUI_DROPDOWN* gui_dropdown( I32 x, I32 y, I32 w, I32 h, const char* title, LIST* list, I32* pval ); extern struct GUI_LIST* gui_list( I32 x, I32 y, I32 w, I32 h, const char* title, LIST* list, I32* pval ); extern struct GUI_LIST_ENTRY* gui_list_get_selected( struct GUI_LIST* list ); @@ -181,6 +182,16 @@ struct GUI_CHECKBOX : GUI_BASE { GUI_CALLBACK cb; }; +struct GUI_DROPDOWN : GUI_BASE { + LIST* plist; + I32* pval; + U8 held; + + GUI_CALLBACK cb; + GUI_WINDOW* listwnd; + GUI_VIEW* listview; +}; + struct GUI_TEXTBOX : GUI_BASE { char value[GUI_TEXTBOX_MAX]; -- cgit v1.2.3