From 291171cb0d8db46acfc13215c5a5acaf4ae4f310 Mon Sep 17 00:00:00 2001 From: Grant Horner Date: Tue, 9 Dec 2025 11:29:53 -0500 Subject: [PATCH] move FPS --- src/main.odin | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main.odin b/src/main.odin index 65905e0..5597b1d 100644 --- a/src/main.odin +++ b/src/main.odin @@ -1,6 +1,6 @@ /* - DONE implement movement up and down by paragraph -- TODO implement scrolling/viewport +- DONE implement scrolling/viewport - TODO implement deletion by word - TODO implement selection - TODO implement duplicate selection/line @@ -49,6 +49,7 @@ viewport := Viewport{start = 0, end = viewport_size} main :: proc() { r.InitWindow(i32(window_width), i32(window_height), "odit") r.SetTargetFPS(60) + default_font := r.GetFontDefault() font := r.LoadFont("/Users/grant/Library/Fonts/BerkeleyMono-Regular.otf") r.GuiSetFont(font) two_lines_size := r.MeasureTextEx(font, "foo\nbar", font_size, 0.0) @@ -228,7 +229,9 @@ main :: proc() { render_cursor(&cursor) - r.DrawFPS(10, 10) + fps_width := r.MeasureText("60", default_font.baseSize) + + r.DrawFPS(i32(window_width) - (fps_width + 20), 10) r.EndDrawing()