aboutsummaryrefslogtreecommitdiff
path: root/src/main.odin
diff options
context:
space:
mode:
authorSan Jacobs2023-05-21 02:58:13 +0200
committerSan Jacobs2023-05-21 02:58:13 +0200
commit50cbd81c340f53dfbefb6cd7df1afa2d55e15cb9 (patch)
tree31b8bd85314bed569530c24bc36a5b8f36657d07 /src/main.odin
parent552c805955200e0efcb4ad67f6275e5a45e8cd94 (diff)
downloadsatscalc-50cbd81c340f53dfbefb6cd7df1afa2d55e15cb9.tar.gz
satscalc-50cbd81c340f53dfbefb6cd7df1afa2d55e15cb9.tar.bz2
satscalc-50cbd81c340f53dfbefb6cd7df1afa2d55e15cb9.zip
Little tweaks and cleanup
Diffstat (limited to 'src/main.odin')
-rw-r--r--src/main.odin16
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}