Commit: bc11f49e246f4e64e536cc304c2dd888ebafb50a Parent: 21f505a9556eb08be2e047f8bd2853143eefba5f Author: Randy Palamar Date: Fri, 10 Jan 2025 10:11:32 -0700 ui: don't draw ruler when start point is out of view Diffstat:
M | ui.c | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ui.c b/ui.c @@ -282,7 +282,8 @@ draw_display_overlay(BeamformerCtx *ctx, Arena a, v2 mouse, Rect display_rect) is->hot.scroll_scale = 1; } - if (ui->ruler_state != RS_NONE) { + /* TODO(rnp): store converted ruler points instead of screen points */ + if (ui->ruler_state != RS_NONE && CheckCollisionPointRec(ui->ruler_start_p.rl, vr.rl)) { v2 end_p; if (ui->ruler_state == RS_START) end_p = mouse; else end_p = ui->ruler_stop_p;