-
Notifications
You must be signed in to change notification settings - Fork 536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there some kind of multicombobox? #571
Comments
Nuklear seems to have many tools for combo boxes, but what do you mean by selecting multiple options ?
|
Well, I think my example was pretty clear. Normally with a combobox you select an option, and it changes the value of the char* opts[] = {
"opt0",
"opt1",
"opt2", /* If you click this, the value of the pointer is set to 2 */
"opt3",
}; However, what I want is being able to select more than one option, so in the above example I might want to select "opt2" and "opt3". Storing multiple selections with just a Maybe this image can help you understand what I mean, although I have no idea where this is from: In that example I would want to select more than one option. Obviously, ignore the typing part and the visual checkbox. |
Hello @8dcc I am unaware whether Nuklear has such a widget.. But, how about using multiple nk_checkbox_label() widgets nested in a nk_tree_push()? From my pov it'll kinda have the same effect.. |
IMO for this kind of thing you're going to want the checkboxes like in @8dcc's comment, as they very clearly convey that the user can make multiple selections. Without them, it is not made clear to the user that multiple selections are possible. |
Well, showing which selections are enabled to the user should be pretty easy, just change the background color of the selected options just like it's done currently with a combobox. Although I do understand what you mean, initially there would be no obvious visual difference between a normal and a multiple option combobox. In my case that does not matter since the context would make that obvious, but I get that the changes need to be more general. |
just wrap ordinary calls to if(nk_combo_begin_label(ctx, "Dropdown", nk_vec2(200, 200)))
{
nk_layout_row_dynamic(ctx, 0, 1);
nk_checkbox_label(ctx, "Option A", &a);
nk_checkbox_label(ctx, "Option B", &b);
nk_combo_end(ctx);
} beware, you can't stack multiple comboboxes inside of eachother because of the way 'nuklear windows' work. |
I guess this will have to do. |
Instead of |
I looked in the wiki and in the header itself and I couldn't find anything. Maybe it has another name, but is there some kind of multicombobox implemented? Meaning a combobox where you can select multiple options.
This project is big, and I don't really know how user-friendly/practical it is meant to be, but I thought you could just implement something like this. Pseudocode:
PD: Some part of me really wishes that there is already a multicombobox with a different name and I wrote all this for nothing.
The text was updated successfully, but these errors were encountered: