oops needed a lil extra
This commit is contained in:
@@ -56,6 +56,10 @@ impl GraphicsBuf {
|
|||||||
.draw_string(x, y, string, &mut self.buffer);
|
.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) {
|
pub fn draw_textfield(&mut self, x: u8, y: u8, width: u8, height: u8, string: &str) {
|
||||||
self.sprite_atlas
|
self.sprite_atlas
|
||||||
.draw_textfield(x, y, width, height, string, &mut self.buffer);
|
.draw_textfield(x, y, width, height, string, &mut self.buffer);
|
||||||
|
|||||||
Reference in New Issue
Block a user