#pragma once #include "PanelWidget.hpp" #include "HorizontalBoxSlot.hpp" namespace PalUIExtension::Api { // UHorizontalBox : public UPanelWidget directly -- same shape as // Overlay. Every generic panel operation is already on PanelWidget; // AddChildToHorizontalBox exists only to hand back the concrete slot // type instead of the generic UPanelSlot* AddChild() returns. class HorizontalBox : public PanelWidget { public: static auto ClassPath() -> const TCHAR* { return STR("/Script/UMG.HorizontalBox"); } static auto DebugTag() -> const TCHAR* { return STR("HorizontalBox"); } HorizontalBox() = default; explicit HorizontalBox(UObject* Obj) : PanelWidget(Obj, ClassOf(), DebugTag()) {} auto AddChildToHorizontalBox(UObject* Content) -> HorizontalBoxSlot { struct P { UObject* Content; UObject* ReturnValue; } p{ Content, nullptr }; auto Result = CallForReturn(STR("AddChildToHorizontalBox"), p, &P::ReturnValue); return (Result && *Result) ? HorizontalBoxSlot{ *Result } : HorizontalBoxSlot{}; } }; }