From 69229f4c17be4e1d2725a2da0508a0b70526801d Mon Sep 17 00:00:00 2001 From: korenkonder Date: Sun, 26 Nov 2023 17:13:45 +0300 Subject: [PATCH] Restored Object Set view in Data View --- src/ReDIVA/classes/data_view/object.cpp | 31 ++++++++++++++++++------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/src/ReDIVA/classes/data_view/object.cpp b/src/ReDIVA/classes/data_view/object.cpp index fe4a097f..6e25e491 100644 --- a/src/ReDIVA/classes/data_view/object.cpp +++ b/src/ReDIVA/classes/data_view/object.cpp @@ -47,21 +47,36 @@ void data_view_object_imgui(class_data* data) { return; } - /*size_t count = object_storage_get_obj_set_count(); - for (size_t i = 0; i < count; i++) { - obj_set_handler* handler = object_storage_get_obj_set_handler_by_index(i); - if (!handler || !handler->obj_set) + extern std::map object_storage_data; + for (auto& i : object_storage_data) { + obj_set_handler* handler = &i.second; + if (!handler->obj_set) continue; - int32_t load_count = object_storage_get_obj_storage_load_count_by_index(i); - ImGui::PushID(handler->set_id); char buf[0x1000]; sprintf_s(buf, sizeof(buf), "ID: 0x%08X; Load Count: %3d; Name: %s", - handler->set_id, load_count, handler->name.c_str()); + handler->set_id, handler->load_count, handler->name.c_str()); ImGui::Selectable(buf); ImGui::PopID(); - }*/ + } + + extern std::map object_storage_data_modern; + if (object_storage_data_modern.size()) + ImGui::Selectable("Modern:", false, ImGuiSelectableFlags_Disabled); + + for (auto& i : object_storage_data_modern) { + obj_set_handler* handler = &i.second; + if (!handler->obj_set) + continue; + + ImGui::PushID(handler->set_id); + char buf[0x1000]; + sprintf_s(buf, sizeof(buf), "ID: 0x%08X; Load Count: %3d; Name: %s", + handler->set_id, handler->load_count, handler->name.c_str()); + ImGui::Selectable(buf); + ImGui::PopID(); + } data->imgui_focus |= ImGui::IsWindowFocused(); ImGui::End();