got basic ui elmental interaction working, + alignment of anchor

This commit is contained in:
2024-03-02 10:24:09 -05:00
parent 1e5773e486
commit 035c726a71
24 changed files with 722 additions and 202 deletions

View File

@ -226,9 +226,13 @@ array_set_capacity :: proc( using self : ^ Array( $ Type ), new_capacity : u64 )
return AllocatorError.None
}
raw_data, result_code := alloc( cast(int) new_capacity * size_of(Type), allocator = allocator )
ensure( result_code == AllocatorError.None, "Failed to allocate for new array capacity" )
data = cast( [^] Type ) raw_data
new_data, result_code := alloc( cast(int) new_capacity * size_of(Type), allocator = allocator )
if result_code != AllocatorError.None {
ensure( false, "Failed to allocate for new array capacity" )
return result_code
}
free( raw_data(data) )
data = cast( [^] Type ) new_data
capacity = new_capacity
return result_code
}