coordinate space math fixes, got resize handles working in settings menu prototype

will eventually lift to its own generic widget

I still need to implement the corner resize..
This commit is contained in:
2024-05-09 04:02:33 -04:00
parent b8e8e7c88a
commit a2b6325b5b
15 changed files with 857 additions and 554 deletions

View File

@ -5,12 +5,12 @@ import "core:math/linalg"
// Note(Ed): This is naturally pretty expensive
ui_compute_layout :: proc()
ui_compute_layout :: proc( ui : ^UI_State )
{
profile(#procedure)
state := get_state()
root := state.project.workspace.ui.root
root := ui.root
{
computed := & root.computed
style := root.style
@ -172,7 +172,7 @@ ui_compute_layout :: proc()
text_pos.y += ( content_size.y - text_size.y ) * layout.text_alignment.y
computed.text_size = text_size
computed.text_pos = { text_pos.x, -text_pos.y }
computed.text_pos = { text_pos.x, text_pos.y }
}
current = ui_box_tranverse_next( current )