mirror of
https://github.com/nicbarker/clay.git
synced 2025-04-30 08:08:02 +00:00
reverse order of root traversal
This commit is contained in:
parent
418579e376
commit
a1b5cde928
2
clay.h
2
clay.h
@ -3520,7 +3520,7 @@ void Clay_SetPointerState(Clay_Vector2 position, bool isPointerDown) {
|
||||
Clay__pointerInfo.position = position;
|
||||
Clay__pointerOverIds.length = 0;
|
||||
Clay__int32_tArray dfsBuffer = Clay__layoutElementChildrenBuffer;
|
||||
for (int rootIndex = 0; rootIndex < Clay__layoutElementTreeRoots.length; ++rootIndex) {
|
||||
for (int rootIndex = Clay__layoutElementTreeRoots.length - 1; rootIndex >= 0; --rootIndex) {
|
||||
dfsBuffer.length = 0;
|
||||
Clay__LayoutElementTreeRoot *root = Clay__LayoutElementTreeRootArray_Get(&Clay__layoutElementTreeRoots, rootIndex);
|
||||
Clay__int32_tArray_Add(&dfsBuffer, (int32_t)root->layoutElementIndex);
|
||||
|
Loading…
Reference in New Issue
Block a user