From dd4179ca1e395b793b1934b98dc85890ba83b899 Mon Sep 17 00:00:00 2001 From: San Jacobs Date: Mon, 16 Sep 2024 01:31:30 +0200 Subject: Figuring out custom layout things in oui --- makefile | 2 +- src/main.odin | 20 ++++++++------------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/makefile b/makefile index d011748..ec24455 100644 --- a/makefile +++ b/makefile @@ -1,2 +1,2 @@ main: - odin run src/ -debug -o:speed -out:main.out + odin run src/ -debug -out:main.out diff --git a/src/main.odin b/src/main.odin index f0e174a..3d91a27 100644 --- a/src/main.odin +++ b/src/main.odin @@ -279,18 +279,13 @@ when true { line.layout_cut_children = .Fill { - a_timeline := timeline(line, &day) + a_timeline := oui.item_make(c0) + a_timeline.layout = .Cut + a_timeline.layout_cut_self = .Fill - x_offset := int(f32(width) * day.fractions[0].start) - for &block, i in day.blocks { - // TODO: Why isn't this rendering?? - block_ui := timeline_block(&block) - block_width := int(f32(width) * (day.fractions[i].end - day.fractions[i].start)) - block_ui.layout_size.x = block_width - block_ui.layout_offset.x = x_offset - oui.item_insert(a_timeline, block_ui) - x_offset += block_width - //fmt.printf("%#v\n", block_ui) + for i in 0..