diff options
-rw-r--r-- | makefile | 2 | ||||
-rw-r--r-- | src/main.odin | 20 |
2 files changed, 9 insertions, 13 deletions
@@ -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..<day.total_timeblocks { + child := oui.item_insert(a_timeline, button("b", 10)) + oui.set_range(child, day.fractions[i].start, day.fractions[i].end, .Horizontal) } oui.item_insert(line, a_timeline) @@ -309,7 +304,7 @@ when true { if oui.is_clicked(c0, new_workday) do fmt.println("NEW WORKDAY!") - +when false { // Theme and sizings editors // - - - - SIZINGS EDITOR - - - - { oui.item_insert(middle_section, label("Sizings Editor", big_font, 100, .Center)) @@ -367,6 +362,7 @@ when true { oui.item_insert(middle_section, output_theme_button) if oui.is_clicked(c0, output_theme_button) do fmt.printf("%#v", theme) } +} } |