diff options
| author | aura <nw@moneybot.cc> | 2026-03-01 20:16:45 +0100 |
|---|---|---|
| committer | aura <nw@moneybot.cc> | 2026-03-01 20:16:45 +0100 |
| commit | 71dd7fcccb45a54d85ae23a95a8a8905ed21fe15 (patch) | |
| tree | d431c36ae02149a10717c751e1f9bb70bb191b8c /src/gui/base.h | |
| parent | ed8c3cee0a9e6e1efbf8e0b0dc9ba0eaafac0f29 (diff) | |
wip on dropdowns
Diffstat (limited to 'src/gui/base.h')
| -rw-r--r-- | src/gui/base.h | 11 |
1 files changed, 11 insertions, 0 deletions
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<GUI_LIST_ENTRY>* list, I32* pval ); extern struct GUI_LIST* gui_list( I32 x, I32 y, I32 w, I32 h, const char* title, LIST<GUI_LIST_ENTRY>* 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<GUI_LIST_ENTRY>* plist; + I32* pval; + U8 held; + + GUI_CALLBACK cb; + GUI_WINDOW* listwnd; + GUI_VIEW* listview; +}; + struct GUI_TEXTBOX : GUI_BASE { char value[GUI_TEXTBOX_MAX]; |
