mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 06:10:56 +00:00
[ui] Skip checkbox label if zero length
I seem to remember doing this for radio buttons, I guess I forgot about checkboxes (really need to unify the code, though).
This commit is contained in:
parent
8ae150cb9e
commit
ef322b968a
1 changed files with 5 additions and 3 deletions
|
@ -1007,9 +1007,11 @@ IMUI_Checkbox (imui_ctx_t *ctx, bool *flag, 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)) {
|
||||
*flag = !*flag;
|
||||
|
|
Loading…
Reference in a new issue