Skip to content

Commit

Permalink
ObjectExplorer: Display array count next to array entries
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Apr 3, 2024
1 parent 8cd96e8 commit 5f95146
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/mods/tools/ObjectExplorer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2408,8 +2408,14 @@ void ObjectExplorer::handle_address(Address address, int32_t offset, Address par
handle_type(object, utility::re_managed_object::get_type(object));

if (utility::re_managed_object::get_vm_type(object) == via::clr::VMObjType::Array) {
if (ImGui::TreeNode(real_address.get(sizeof(REArrayBase)), "Array Entries")) {
auto arr = (REArrayBase*)object;
auto arr = (REArrayBase*)object;

const auto made_array_entries = ImGui::TreeNode(real_address.get(sizeof(REArrayBase)), "Array Entries");

ImGui::SameLine();
ImGui::Text("[%d]", arr->numElements);

if (made_array_entries) {
const bool entry_is_val = utility::re_array::get_contained_type(arr)->get_vm_obj_type() == via::clr::VMObjType::ValType;

if (entry_is_val) {
Expand Down

0 comments on commit 5f95146

Please sign in to comment.