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 --- src/main.odin | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'src/main.odin') 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..