From 5aabff7ee38a7236de45db885447f8c49546b892 Mon Sep 17 00:00:00 2001 From: Emmanuel AYME Date: Fri, 6 Mar 2026 01:45:43 +0100 Subject: [PATCH] Add new methods declarations --- libs/UEngine/UETools.hpp | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/libs/UEngine/UETools.hpp b/libs/UEngine/UETools.hpp index b26778d..a952d00 100644 --- a/libs/UEngine/UETools.hpp +++ b/libs/UEngine/UETools.hpp @@ -46,13 +46,19 @@ SDK::APawn* GetPawnFromWorld(SDK::UWorld* world = nullptr); */ void ReactivateDevConsole(std::shared_ptr logger); +void ApplyOffsetsSmart(SDK::UWidget* Widget, float Left, float Right, int MaxDepth); + /** * @brief Apply offsets recursively to UVCanvasPanelSlot. * @param widget UUserWidget* pointer. * @param left offset. * @param right offset. + * @param ExcludeObjects excluded objects in depth check + * @param ExcludeClass excluded class widgets in depth check */ -void ApplyOffsetsRecursive(SDK::UWidget* widget, float left, float right = 0, int MaxDepth = INT_MAX); +void ApplyOffsetsRecursive(SDK::UWidget* widget, float left, float right = 0, + const std::vector& ExcludeObjects = {}, + const std::vector& ExcludeClass = {}, int MaxDepth = INT_MAX); /** * @brief Apply offsets recursively to Overlay. @@ -62,7 +68,7 @@ void ApplyOffsetsRecursive(SDK::UWidget* widget, float left, float right = 0, in * @param ExcludeNames excluded class widgets in depth check * @param MaxDepth Max depth to go through root component */ -void ApplyOverlayOffsetRecursive(SDK::UWidget* Widget, float Offset, SDK::EHorizontalAlignment alignment, +void ApplyOverlayOffsetRecursive(SDK::UWidget* Widget, float left, float right, SDK::EHorizontalAlignment alignment, const std::vector& ExcludeNames = {}, int MaxDepth = INT_MAX); void FindAndApplyCanvasRecursive(SDK::UWidget* widget, float offset, int MaxDepth = INT_MAX, int currentDepth = 0); @@ -84,4 +90,16 @@ void TrackWidgetDestruct(SDK::UUserWidget* widget); * @param logger the log object. */ void DumpUIAnalysis(std::shared_ptr logger); -void ClearWidgetTracking(); \ No newline at end of file + +/** + * @brief Clear previously tracked widgets + */ +void ClearWidgetTracking(); + +/** + * @brief Dump all widgets + * @param Widget a UWidget instance to browse + * @param Depth the depth to start from + * @param MaxDepth the maximal depth to reach + */ +void DumpWidgetRecursive(SDK::UWidget* Widget, int Depth = 0, int MaxDepth = 2); \ No newline at end of file