157 lines
3.3 KiB
C++
157 lines
3.3 KiB
C++
|
|
#pragma once
|
||
|
|
|
||
|
|
#include <Unreal/UObject.hpp>
|
||
|
|
|
||
|
|
namespace PalUIExtension::Api
|
||
|
|
{
|
||
|
|
using namespace RC;
|
||
|
|
using namespace RC::Unreal;
|
||
|
|
|
||
|
|
template <typename T>
|
||
|
|
struct TArrayRead_
|
||
|
|
{
|
||
|
|
T* Data{};
|
||
|
|
int32 Num{};
|
||
|
|
int32 Max{};
|
||
|
|
|
||
|
|
auto IsPlausible(int32 SanityLimit) const -> bool
|
||
|
|
{
|
||
|
|
if (Num < 0 || Max < 0 || Num > Max) return false;
|
||
|
|
if (Num > SanityLimit) return false;
|
||
|
|
return Num == 0 || Data != nullptr;
|
||
|
|
}
|
||
|
|
};
|
||
|
|
struct FVector2D_ { double X{}; double Y{}; };
|
||
|
|
struct FVector_ { double X{}; double Y{}; double Z{}; };
|
||
|
|
struct FMargin_ { float Left{}; float Top{}; float Right{}; float Bottom{}; };
|
||
|
|
struct FAnchors_ { FVector2D_ Minimum{}; FVector2D_ Maximum{}; };
|
||
|
|
|
||
|
|
// GUESS (field order).
|
||
|
|
struct FAnchorData_ { FMargin_ Offsets{}; FAnchors_ Anchors{}; FVector2D_ Alignment{}; };
|
||
|
|
|
||
|
|
// GUESS (field order). Engine source order is Translation, Scale, Shear, Angle.
|
||
|
|
struct FWidgetTransform_
|
||
|
|
{
|
||
|
|
FVector2D_ Translation{};
|
||
|
|
FVector2D_ Scale{ 1.0, 1.0 };
|
||
|
|
FVector2D_ Shear{};
|
||
|
|
float Angle{};
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
enum class ESlateVisibility_ : uint8
|
||
|
|
{
|
||
|
|
Visible = 0,
|
||
|
|
Collapsed = 1,
|
||
|
|
Hidden = 2,
|
||
|
|
HitTestInvisible = 3,
|
||
|
|
SelfHitTestInvisible = 4,
|
||
|
|
};
|
||
|
|
|
||
|
|
enum class EWidgetClipping_ : uint8
|
||
|
|
{
|
||
|
|
Inherit = 0,
|
||
|
|
ClipToBounds = 1,
|
||
|
|
ClipToBoundsWithoutIntersecting = 2,
|
||
|
|
ClipToBoundsAlways = 3,
|
||
|
|
OnDemand = 4,
|
||
|
|
};
|
||
|
|
|
||
|
|
enum class EUINavigation_ : uint8
|
||
|
|
{
|
||
|
|
Left = 0,
|
||
|
|
Right = 1,
|
||
|
|
Up = 2,
|
||
|
|
Down = 3,
|
||
|
|
Next = 4,
|
||
|
|
Previous = 5,
|
||
|
|
Num = 6,
|
||
|
|
Invalid = 7,
|
||
|
|
};
|
||
|
|
|
||
|
|
enum class EUINavigationRule_ : uint8
|
||
|
|
{
|
||
|
|
Escape = 0,
|
||
|
|
Explicit = 1,
|
||
|
|
Wrap = 2,
|
||
|
|
Stop = 3,
|
||
|
|
Custom = 4,
|
||
|
|
CustomBoundary = 5,
|
||
|
|
Invalid = 6,
|
||
|
|
};
|
||
|
|
|
||
|
|
using EMouseCursorByte_ = uint8;
|
||
|
|
|
||
|
|
enum class EHorizontalAlignment_ : uint8
|
||
|
|
{
|
||
|
|
Fill = 0,
|
||
|
|
Left = 1,
|
||
|
|
Center = 2,
|
||
|
|
Right = 3,
|
||
|
|
};
|
||
|
|
|
||
|
|
enum class EVerticalAlignment_ : uint8
|
||
|
|
{
|
||
|
|
Fill = 0,
|
||
|
|
Top = 1,
|
||
|
|
Center = 2,
|
||
|
|
Bottom = 3,
|
||
|
|
};
|
||
|
|
|
||
|
|
struct FLinearColor_ { float R{}; float G{}; float B{}; float A{ 1.0f }; };
|
||
|
|
|
||
|
|
struct FSlateColor_
|
||
|
|
{
|
||
|
|
FLinearColor_ SpecifiedColor{};
|
||
|
|
uint8 ColorUseRule{ 0 }; // UseColor_Specified
|
||
|
|
};
|
||
|
|
|
||
|
|
enum class ESlateColorStylingMode_ : uint8
|
||
|
|
{
|
||
|
|
UseColor_Specified = 0,
|
||
|
|
UseColor_Specified_Link = 1,
|
||
|
|
UseColor_Foreground = 2,
|
||
|
|
UseColor_Foreground_Subdued = 3,
|
||
|
|
};
|
||
|
|
|
||
|
|
enum class ETextTransformPolicy_ : uint8
|
||
|
|
{
|
||
|
|
None = 0,
|
||
|
|
ToLower = 1,
|
||
|
|
ToUpper = 2,
|
||
|
|
};
|
||
|
|
|
||
|
|
enum class ETextOverflowPolicy_ : uint8
|
||
|
|
{
|
||
|
|
Clip = 0,
|
||
|
|
Ellipsis = 1,
|
||
|
|
};
|
||
|
|
|
||
|
|
enum class ETextWrappingPolicy_ : uint8
|
||
|
|
{
|
||
|
|
DefaultWrapping = 0,
|
||
|
|
AllowPerCharacterWrapping = 1,
|
||
|
|
};
|
||
|
|
|
||
|
|
// TEnumAsByte<ETextJustify::Type>
|
||
|
|
enum class ETextJustify_ : uint8
|
||
|
|
{
|
||
|
|
Left = 0,
|
||
|
|
Center = 1,
|
||
|
|
Right = 2,
|
||
|
|
};
|
||
|
|
|
||
|
|
enum class ESlateSizeRule_ : uint8
|
||
|
|
{
|
||
|
|
Automatic = 0,
|
||
|
|
Fill = 1,
|
||
|
|
};
|
||
|
|
|
||
|
|
struct FSlateChildSize_
|
||
|
|
{
|
||
|
|
float Value{};
|
||
|
|
ESlateSizeRule_ SizeRule{ ESlateSizeRule_::Automatic };
|
||
|
|
};
|
||
|
|
}
|