Skip to content

Commit

Permalink
UObjectHook: Split ArrayProprety elements of StructProperty
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Oct 12, 2024
1 parent 93f8947 commit cdf99f7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/mods/UObjectHook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3531,7 +3531,15 @@ void UObjectHook::ui_handle_array_property(void* addr, sdk::FArrayProperty* prop

for (size_t i = 0; i < array_obj.count; ++i) try {
auto element = (void*)((uintptr_t)array_obj.data + (i * element_size));
ui_handle_struct(element, strukt);

if (element != nullptr) {
if (ImGui::TreeNode((void*)element, "Element %d", i)) {
// TODO: Figure out if this can be used with persistent states?
//auto scope = m_path.enter("Element " + std::to_string(i));
ui_handle_struct(element, strukt);
ImGui::TreePop();
}
}
} catch(...) {
ImGui::Text("Failed to display element %d", i);
}
Expand Down

0 comments on commit cdf99f7

Please sign in to comment.