From e77dec086f94da480af8c42bec6cac8e873a6931 Mon Sep 17 00:00:00 2001 From: San Jacobs Date: Fri, 13 Oct 2023 12:00:49 +0200 Subject: Progressed ability to write text using new oui system --- src/main.odin | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/main.odin') 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) -- cgit v1.2.1