initial commit; cv 0.0.3
This commit is contained in:
29
Api/HorizontalBox.hpp
Normal file
29
Api/HorizontalBox.hpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#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<HorizontalBox>(), 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{};
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user