From fca6955979f4791acb016ef5da86fed1013b524e Mon Sep 17 00:00:00 2001 From: San Jacobs Date: Sat, 14 Oct 2023 14:03:07 +0200 Subject: There are themes! There is button with text! There is increased comfy! --- src/main.odin | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'src/main.odin') diff --git a/src/main.odin b/src/main.odin index 79b1a1e..fcb425d 100644 --- a/src/main.odin +++ b/src/main.odin @@ -111,6 +111,8 @@ main :: proc() { for !WindowShouldClose() { // MAIN LOOP ---- MAIN LOOP ---- MAIN LOOP ---- MAIN LOOP + free_all(context.temp_allocator) + if IsWindowResized() { height = GetScreenHeight() width = GetScreenWidth() @@ -140,7 +142,7 @@ main :: proc() { // ------------------------------------------ BeginDrawing() - ClearBackground(BGCOLOR) + ClearBackground(rl.RED) when true { // hotloop @@ -153,7 +155,7 @@ when true { master_container.layout_size = {int(GetScreenWidth()), int(GetScreenHeight())} { - top_bar := panel_line(master_container, BGCOLOR, 30) + top_bar := panel_line(master_container, theme.background_top, 30) top_bar.id = oui.push_id(c0, "small_boie") defer oui.pop_id(c0) top_bar.layout_margin = 6 @@ -161,9 +163,9 @@ when true { date_label := label("Date", font, .Left) oui.item_insert(top_bar, date_label) } - + { - bottom_bar := panel(PBGCOLOR) + bottom_bar := panel(theme.background_bottom) bottom_bar.id = oui.push_id(c0, "not_small_boie") defer oui.pop_id(c0) bottom_bar.layout_cut_children = .Left @@ -173,11 +175,21 @@ when true { } { - middle_section := panel(WBGCOLOR) + middle_section := panel(theme.background) middle_section.id = oui.push_id(c0, "middle_section") defer oui.pop_id(c0) master_container.layout_cut_children = .Fill oui.item_insert(master_container, middle_section) + + { + line := panel_line(middle_section, theme.background, 40) + line.id = oui.push_id(c0, "a_line") + defer oui.pop_id(c0) + { + a_button := button("Testor", 100) + oui.item_insert(line, a_button) + } + } } -- cgit v1.2.1