diff --git a/edit.jai b/edit.jai index 4ee8517..c8d4af8 100644 --- a/edit.jai +++ b/edit.jai @@ -38,6 +38,21 @@ main :: () { Input.update_window_events(); + for Input.get_window_resizes() { + Simp.update_window(it.window); + if it.window == window { + should_reinit := (it.width != window_width) || (it.height != window_height); + + window_width = it.width; + window_height = it.height; + + if should_reinit { + my_init_fonts(); + } + } + } + + for event : Input.events_this_frame { if event.type == .QUIT { should_quit = true; @@ -129,7 +144,6 @@ read_file_lines :: (file_path: string) -> bool { my_init_fonts :: () { line_height = 16; base_path := path_strip_filename(get_path_of_running_executable()); - print("base_path: %\n", base_path); my_font = Simp.get_font_at_size("/home/grant/.local/share/fonts/otf/BerkeleyMono/", "BerkeleyMono-Regular.otf", line_height); // my_font = Simp.get_font_at_size(base_path, "Anonymous Pro.ttf", line_height);