Moved settings menu to its own file, got min_size based on content working (only for the settings menu)

This commit is contained in:
2024-12-30 12:22:41 -05:00
parent 57d51fc7b1
commit 8905105d40
6 changed files with 616 additions and 555 deletions

View File

@ -135,8 +135,15 @@ equal_range2 :: #force_inline proc "contextless" ( a, b : Range2 ) -> b32 {
return b32(result)
}
// Will resolve the largest range possible given a & b.
join_range2 :: proc "contextless" ( a, b : Range2 ) -> (joined : Range2) {
joined.min = min( a.min, b.min )
joined.max = max( a.max, b.max )
return
}
size_range2 :: #force_inline proc "contextless" ( value : Range2 ) -> Vec2 {
return { value.p1.x - value.p0.x, value.p0.y - value.p1.y }
return { abs( value.p1.x - value.p0.x ), abs( value.p0.y - value.p1.y ) }
}
#endregion("Range2")