-
Notifications
You must be signed in to change notification settings - Fork 570
Radio
MKrusch edited this page Aug 4, 2017
·
2 revisions
Radio is a special form of Checkbox. You can use it when you want the user to make an 'exclusive or' decision. Contrary to a simple Checkbox, which only outputs true or false, a Radio can Output more Options.
enum {EASY, HARD};
static int op = EASY;
nk_layout_row_dynamic(ctx, 30, 2);
if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;