Skip to content

Commit

Permalink
UObjectHook: Display objects in subwindow for easier navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Oct 28, 2023
1 parent 6bd648c commit cf3a8fb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/mods/UObjectHook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <utility/Logging.hpp>
#include <utility/String.hpp>
#include <utility/ScopeGuard.hpp>

#include <sdk/UObjectBase.hpp>
#include <sdk/UObjectArray.hpp>
Expand Down Expand Up @@ -806,6 +807,14 @@ void UObjectHook::on_draw_ui() {

const auto wide_filter = utility::widen(filter);

bool made_child = ImGui::BeginChild("Objects by class entries", ImVec2(0, 0), true, ImGuiWindowFlags_::ImGuiWindowFlags_HorizontalScrollbar);

utility::ScopeGuard sg{[made_child]() {
if (made_child) {
ImGui::EndChild();
}
}};

for (auto uclass : m_sorted_classes) {
const auto& objects_ref = m_objects_by_class[uclass];

Expand Down

0 comments on commit cf3a8fb

Please sign in to comment.