move FPS
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user