aboutsummaryrefslogtreecommitdiff
path: root/src/main.odin
diff options
context:
space:
mode:
authorSan Jacobs2023-10-13 12:00:49 +0200
committerSan Jacobs2023-10-13 12:00:49 +0200
commite77dec086f94da480af8c42bec6cac8e873a6931 (patch)
tree79aca74dfb34a00658c1d23af11822a4e26b4682 /src/main.odin
parent40687c8c5624dda5bd6b9c6b0e281fb079755040 (diff)
downloadsatscalc-e77dec086f94da480af8c42bec6cac8e873a6931.tar.gz
satscalc-e77dec086f94da480af8c42bec6cac8e873a6931.tar.bz2
satscalc-e77dec086f94da480af8c42bec6cac8e873a6931.zip
Progressed ability to write text using new oui system
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 25cdf22..96a56d5 100644
--- a/src/main.odin
+++ b/src/main.odin
@@ -7,6 +7,8 @@ import "core:slice"
import "core:strings"
import rl "vendor:raylib"
+UBUNTU_MONO := #load("../res/UbuntuMono-Regular.ttf")
+
main :: proc() {
// TODO: Replace the dynamic array of Workday-pointers with
@@ -68,6 +70,7 @@ main :: proc() {
// Loading fonts - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
font_size :: 18
+ //font: Font = LoadFontFromMemory("ttf", &UBUNTU_MONO, i32(len(UBUNTU_MONO)), font_size, nil, 0)
font: Font = LoadFontEx("res/UbuntuMono-Regular.ttf", font_size, nil, 0)
defer UnloadFont(font)
@@ -139,20 +142,21 @@ when true {
master_container := panel()
- oui.set_layout(master_container, .Absolute)
- oui.set_size(master_container, int(GetScreenWidth()), int(GetScreenHeight()))
+ oui.set_layout(master_container, .Absolute)
+ oui.set_size(master_container, int(GetScreenWidth()), int(GetScreenHeight()))
top_bar := panel(BGCOLOR)
oui.set_cut(master_container, .Top)
oui.set_height(top_bar, 30)
oui.item_insert(master_container, top_bar)
- date_label := label("Date", font)
+ date_label := label("Date abcg", big_font)
+ oui.item_insert(top_bar, date_label)
bottom_bar := panel(PBGCOLOR)
- oui.set_cut(master_container, .Bottom)
- oui.set_height(bottom_bar, 50)
- oui.item_insert(master_container, bottom_bar)
+ oui.set_cut(master_container, .Bottom)
+ oui.set_height(bottom_bar, 50)
+ oui.item_insert(master_container, bottom_bar)