From b86b2d4cca76201592bfd5f6ccc1ef5e68f83c14 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 3 Oct 2022 14:18:23 -0600 Subject: [PATCH] Fix bounding box for highlight --- examples/text/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/text/src/main.rs b/examples/text/src/main.rs index 06c24722..7b15cb73 100644 --- a/examples/text/src/main.rs +++ b/examples/text/src/main.rs @@ -143,8 +143,9 @@ fn main() { if mouse_x >= glyph_x && mouse_x < glyph_x + advance_x && mouse_y >= line_y - font_size - && mouse_y < line_y + && mouse_y < line_y - font_size + line_height { + //TODO: this highlights only one character of combinations window.rect(glyph_x, line_y - font_size, *advance_x as u32, line_height as u32, hover_color); }