diff options
-rw-r--r-- | src/main.odin | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/main.odin b/src/main.odin index 6c7753d..e7559ea 100644 --- a/src/main.odin +++ b/src/main.odin @@ -29,19 +29,27 @@ main :: proc() { using rl width: i32 = 500 height: i32 = 400 + InitWindow(width, height, "satscalc") + defer CloseWindow() + SetTargetFPS(60) SetWindowState({.WINDOW_RESIZABLE}) SetWindowMinSize(width, height) + // Loading fonts - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - font_size :: 18 font: Font = LoadFontEx("res/UbuntuMono-Regular.ttf", font_size, nil, 0) + defer UnloadFont(font) small_font_size :: 14 small_font: Font = LoadFontEx("res/UbuntuMono-Regular.ttf", small_font_size, nil, 0) + defer UnloadFont(small_font) big_font_size :: 24 big_font: Font = LoadFontEx("res/UbuntuMono-Regular.ttf", big_font_size, nil, 0) + defer UnloadFont(big_font) + for !WindowShouldClose() { @@ -95,15 +103,11 @@ main :: proc() { DrawRectangle(0, height-50, width+10, 60, PBGCOLOR) - DrawTextEx(small_font, total_sum, {f32(width)-120, f32(height)-42}, small_font_size, 0, RAYWHITE); - DrawTextEx(big_font, inc_soc, {f32(width)-120, f32(height)-28}, big_font_size, 0, RAYWHITE); + DrawTextEx(small_font, total_sum, {f32(width)-120, f32(height)-43}, small_font_size, 0, RAYWHITE); + DrawTextEx(big_font, inc_soc, {f32(width)-120, f32(height)-29}, big_font_size, 0, RAYWHITE); EndDrawing() } - UnloadFont(font) - UnloadFont(small_font) - UnloadFont(big_font) - CloseWindow() } BGCOLOR : rl.Color : {30, 30, 30, 255} |