diff options
author | San Jacobs | 2023-07-20 22:31:42 +0200 |
---|---|---|
committer | San Jacobs | 2023-07-20 22:31:42 +0200 |
commit | f4d20d1ff418f79388f252ba32dfca2ae1e6dbd1 (patch) | |
tree | 1538765b6b7d76a00035fd6e89004d809de01088 /src | |
parent | db68d93f970a9c32a29b5efd57f53ea47d2add4e (diff) | |
download | satscalc-f4d20d1ff418f79388f252ba32dfca2ae1e6dbd1.tar.gz satscalc-f4d20d1ff418f79388f252ba32dfca2ae1e6dbd1.tar.bz2 satscalc-f4d20d1ff418f79388f252ba32dfca2ae1e6dbd1.zip |
Clarified plans for adding fraction-pairs
Diffstat (limited to 'src')
-rw-r--r-- | src/main.odin | 22 | ||||
-rw-r--r-- | src/time.odin | 10 |
2 files changed, 23 insertions, 9 deletions
diff --git a/src/main.odin b/src/main.odin index dc8576d..b6af03d 100644 --- a/src/main.odin +++ b/src/main.odin @@ -114,10 +114,10 @@ main :: proc() { // after, all the other days should scale down to keep // the vertical alignment of time accurate // - // TODO: Hovering over a timeblock should put a white border - // around the timeblock's timeline square, and display - // information about the block in the bottom left of - // the screen. + // TODO: Hovering over a timeblock should make it pulse softly + // clicking will put a white border around the timeblock, + // and display information about the block in the + // bottom left of the screen. // DRAW @@ -131,11 +131,15 @@ main :: proc() { for day, i in workdays { - // TODO: The factions held inside Workday-s needs to come in pairs, - // just like moments come in pairs of timeblocks. - // Because that's a simple way to take care of reading out-of-bounds - // and a way to make this section of code a bit more readable. - + // TODO: The fractions held inside Workday-s needs to come in pairs, + // just like moments come as pairs in timeblocks. + // Because that will let us store both the beginning and ending + // of timeblocks, which is a simple way to take care of reading + // out-of-bounds and will make it possible to render lunch breaks + // + // (At least, given how lunch breaks are currently implemented, + // as holes in the workday) + DrawRectangle(10, DAY_HEIGHT*i32(i+1)-4, width-20, DAY_HEIGHT-1, PBGCOLOR) for block, j in day.blocks { if j == day.total_timeblocks do break diff --git a/src/time.odin b/src/time.odin index 3bd4721..080096b 100644 --- a/src/time.odin +++ b/src/time.odin @@ -51,6 +51,16 @@ Workday :: struct { // because lunch breaks // cause more blocks blocks : [16]Timeblock, + + // Fractions store how far + // through the day each + // timesplit occurs. + // They should probably be + // changed to come in pairs, + // as moments do in timeblocks, + // because then we can store + // both the start and end + // of timeblocks in fractions fractions : [16]f32, total_timeblocks : int, } |