misc changes, hot reload is broken

This commit is contained in:
2024-03-20 00:44:43 -04:00
parent 737e8596f3
commit 2d5e308046
10 changed files with 40 additions and 29 deletions

View File

@ -106,13 +106,7 @@ ui_compute_layout :: proc()
}
text_size : Vec2
// If the computed matches, we already have the size, don't bother.
if current.first_frame || ! size_to_text || computed.text_size.y != size_range2(computed.bounds).y {
text_size = cast(Vec2) measure_text_size( current.text.str, style.font, style.font_size, 0 )
}
else {
text_size = computed.text_size
}
text_size = cast(Vec2) measure_text_size( current.text.str, style.font, style.font_size, 0 )
if size_to_text {
adjusted_size = text_size