pushing what I have rn, decided not to go this route

Instead going with ![img](https://i.imgur.com/S3tjZUu.png)
This commit is contained in:
2024-05-13 10:40:29 -04:00
parent e8c3312b69
commit 0744069b0d
9 changed files with 71 additions and 70 deletions

View File

@ -6,14 +6,15 @@ import "core:math/linalg"
// The UI_Box's actual positioning and sizing
// There is an excess of rectangles here for debug puproses.
UI_Computed :: struct {
fresh : b32, // If the auto-layout has been computed for the current frame
// anchors : Range2, // Bounds for anchors within parent
// margins : Range2, // Bounds for margins within parent
padding : Range2, // Bounds for padding's starting bounds (will be offset by border if there is one), only here for debug vis
bounds : Range2, // Bounds for box itself
padding : Range2, // Bounds for padding's starting bounds (will be offset by border if there is one)
content : Range2, // Bounds for content (text or children)
text_pos : Vec2, // Position of text within content
text_size : Vec2, // Size of text within content
fresh : b32, // If the auto-layout has been computed for the current frame
}
UI_LayoutDirectionX :: enum(i32) {
@ -73,6 +74,7 @@ UI_LayoutFlag :: enum u32 {
Size_To_Text,
// TODO(Ed): Implement this!
// Wrap text around the box, text_alignment specifies the justification for its compostion when wrapping.
Text_Wrap,
Count,