mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +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]);
|
||||
}
|
||||
|
||||
auto text = View_New (ctx->vsys, view);
|
||||
set_control (ctx, text, false);
|
||||
add_text (ctx, text, state, mode);
|
||||
if (state->label_len) {
|
||||
auto text = View_New (ctx->vsys, view);
|
||||
set_control (ctx, text, false);
|
||||
add_text (ctx, text, state, mode);
|
||||
}
|
||||
|
||||
if (check_button_state (ctx, state->entity)) {
|
||||
*curvalue = value;
|
||||
|
|
Loading…
Reference in a new issue