From e4e471566f690d330be0c5cd67a5624c321c3b6a Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Sun, 16 Jun 2024 18:23:49 +0200 Subject: [PATCH] fix compilation --- Dependencies/GWCA | 2 +- GWToolboxdll/Widgets/EffectsMonitorWidget.cpp | 7 ------ GWToolboxdll/Windows/InfoWindow.cpp | 24 +++++++------------ 3 files changed, 9 insertions(+), 24 deletions(-) diff --git a/Dependencies/GWCA b/Dependencies/GWCA index bbc7526be..f0066d9d3 160000 --- a/Dependencies/GWCA +++ b/Dependencies/GWCA @@ -1 +1 @@ -Subproject commit bbc7526bedc1b5b56aea7b0340ed8d1b27d30217 +Subproject commit f0066d9d356312ac65b2f561abb2f57ab2f3774e diff --git a/GWToolboxdll/Widgets/EffectsMonitorWidget.cpp b/GWToolboxdll/Widgets/EffectsMonitorWidget.cpp index d60a280b0..fcc94c63e 100644 --- a/GWToolboxdll/Widgets/EffectsMonitorWidget.cpp +++ b/GWToolboxdll/Widgets/EffectsMonitorWidget.cpp @@ -4,19 +4,12 @@ #include -#include - #include -#include #include -#include #include #include -#include #include -#include -#include #include #include diff --git a/GWToolboxdll/Windows/InfoWindow.cpp b/GWToolboxdll/Windows/InfoWindow.cpp index 4474f9a09..a096e49d2 100644 --- a/GWToolboxdll/Windows/InfoWindow.cpp +++ b/GWToolboxdll/Windows/InfoWindow.cpp @@ -960,28 +960,20 @@ namespace { dialog_buttons_frame = GW::UI::GetChildFrame(dialog_buttons_frame, 0); dialog_buttons_frame = GW::UI::GetChildFrame(dialog_buttons_frame, 1); if (dialog_buttons_frame) { - auto relation = dialog_buttons_frame->relation; - auto& siblings = dialog_buttons_frame->relation.siblings; - siblings. - do { - const auto frame = sibling->Next(); - if (!frame) break; - if (frame == relation) break; - sibling = sibling->Next(); - - } - - for(auto button_frame : siblings){ - const auto button_frame = (*it)->GetFrame(); + for (auto& sibling : dialog_buttons_frame->relation.siblings) { + const auto button_frame = sibling.GetFrame(); + if (button_frame->child_offset_id != 0x1) + continue; // Not a button frame const auto top_left = button_frame->position.GetTopLeftOnScreen(frame); const auto bottom_right = button_frame->position.GetBottomRightOnScreen(frame); - ImGui::GetBackgroundDrawList()->AddRect({ top_left.x,top_left.y }, { bottom_right.x,bottom_right.y }, IM_COL32_WHITE); + const auto label = std::to_string(button_frame->field100_0x1a8); + const auto draw_list = ImGui::GetBackgroundDrawList(); + draw_list->AddRect({ top_left.x, top_left.y }, { bottom_right.x, bottom_right.y }, IM_COL32_WHITE); + draw_list->AddText({ top_left.x, top_left.y }, IM_COL32_WHITE, label.c_str()); } } } - - (frame); } }