- if( ui_button_text( box, options[ value->index ].alias, 1 ) ){
- vg_ui.focused_control_type = k_ui_control_dropdown;
- vg_ui.ptr_dropdown = value;
- vg_ui.dropdown.option_count = len;
- vg_ui.dropdown.options = options;
- rect_copy( box, vg_ui.dropdown.rect );
+ const char *display = "OUT OF RANGE";
+ for( u32 i=0; i<len; i ++ ){
+ if( *value == options[i].value ){
+ display = options[i].alias;
+ break;
+ }
+ }
+
+ if( ui_button_text( box, display, 1 ) == 1 ){
+ vg_ui.focused_control_type = k_ui_control_enum;
+ vg_ui.ptr_enum = value;
+ vg_ui._enum.option_count = len;
+ vg_ui._enum.options = options;
+ rect_copy( box, vg_ui._enum.rect );