From 257d1d020216b025c95fb71bf397a38fb931ec13 Mon Sep 17 00:00:00 2001 From: JP Stringham Date: Wed, 25 Mar 2026 09:18:59 -0400 Subject: [PATCH] oops needed a lil extra --- src/graphics.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/graphics.rs b/src/graphics.rs index 25358c3..25904c2 100644 --- a/src/graphics.rs +++ b/src/graphics.rs @@ -56,6 +56,10 @@ impl GraphicsBuf { .draw_string(x, y, string, &mut self.buffer); } + pub fn get_string_px_length(&self, string: &str) -> usize { + self.sprite_atlas.get_str_pixel_width(string) + } + pub fn draw_textfield(&mut self, x: u8, y: u8, width: u8, height: u8, string: &str) { self.sprite_atlas .draw_textfield(x, y, width, height, string, &mut self.buffer);