Allow buffer text to be reset

This commit is contained in:
Jeremy Soller 2022-10-19 13:15:07 -06:00
parent b32c64e892
commit 0cbc3c3cfa
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE
4 changed files with 58 additions and 21 deletions

View file

@ -84,13 +84,13 @@ fn main() {
let line_x = 8 * display_scale;
let mut buffer = TextBuffer::new(
&font_matches,
&text,
font_sizes[font_size_i]
);
buffer.set_size(
window.width() as i32 - line_x * 2,
window.height() as i32
);
buffer.set_text(&text);
let mut ctrl_pressed = false;
let mut mouse_x = -1;