mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 14:20:59 +00:00
[ui] Avoid adding empty labels for radio buttons
More places will need it, but this fixes a problem with a large array of just buttons.
This commit is contained in:
parent
d4b11923b9
commit
d8eef0be34
1 changed files with 5 additions and 3 deletions
|
@ -877,9 +877,11 @@ IMUI_Radio (imui_ctx_t *ctx, int *curvalue, int value, const char *label)
|
||||||
set_fill (ctx, punch, ctx->style.background.color[mode]);
|
set_fill (ctx, punch, ctx->style.background.color[mode]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (state->label_len) {
|
||||||
auto text = View_New (ctx->vsys, view);
|
auto text = View_New (ctx->vsys, view);
|
||||||
set_control (ctx, text, false);
|
set_control (ctx, text, false);
|
||||||
add_text (ctx, text, state, mode);
|
add_text (ctx, text, state, mode);
|
||||||
|
}
|
||||||
|
|
||||||
if (check_button_state (ctx, state->entity)) {
|
if (check_button_state (ctx, state->entity)) {
|
||||||
*curvalue = value;
|
*curvalue = value;
|
||||||
|
|
Loading…
Reference in a new issue