UE_UMG_SlateBlueprintLibrary

SlateBlueprintLibrary位于…\Engine\Source\Runtime\UMG\Private下
提供蓝图UMG一些常用节点,放在这里,方便诸君查阅!~

SlateBlueprintLibrary.h

// Copyright Epic Games, Inc. All Rights Reserved.

#pragma once

#include "CoreMinimal.h"
#include "UObject/ObjectMacros.h"
#include "UObject/Script.h"
#include "Layout/Geometry.h"
#include "Styling/SlateBrush.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "SlateBlueprintLibrary.generated.h"

UCLASS(meta=(ScriptName="SlateLibrary"))
class UMG_API USlateBlueprintLibrary : public UBlueprintFunctionLibrary
{
   
   
	GENERATED_UCLASS_BODY()

public:

	/**
	 * Absolute coordinates could be either desktop or window space depending on what space the root of the widget hierarchy is in.
	 *
	 * @return true if the provided location in absolute coordinates is within the bounds of this geometry.
	 */
	 UFUNCTION(BlueprintPure, Category="User Interface|Geometry")
	static bool IsUnderLocation(const FGeometry& Geometry, const FVector2D& AbsoluteCoordinate);

	/**
	 * Absolute coordinates could be either desktop or window space depending on what space the root of the widget hierarchy is in.
	 *
	 * @return Transforms AbsoluteCoordinate into the local space of this Geometry.
	 */
	UFUNCTION(BlueprintPure, Category="User Interface|Geometry")
	static FVector2D AbsoluteToLocal(const FGeometry& Geometry, FVector2D AbsoluteCoordinate);

	/**
	 * Translates local coordinates into absolute coordinates
	 *
	 * Absolute coordinates could be either desktop or window space depending on what space the root of the widget hierarchy is in.
	 *
	 * @return  Absolute coordinates
	 */
	UFUNCTION(BlueprintPure, Category="User Interface|Geometry")
	static FVector2D LocalToAbsolute(const FGeometry& Geometry, FVector2D LocalCoordinate);

	/** Returns the local top/left of the geometry in local space. */
	UFUNCTION(BlueprintPure, Category = "User Interface|Geometry")
	static FVector2D GetLocalTopLeft(const FGeometry& Geometry);

	/** Returns the size of the geometry in local space. */
	UFUNCTION(BlueprintPure, Category="User Interface|Geometry")
	static FVector2D GetLocalSize(const FGeometry& Geometry);

	/** Returns the size of the geometry in absolute space. */
	UFUNCTION(BlueprintPure, Category="User Interface|Geometry")
	static FVector2D GetAbsoluteSize(const FGeometry& Geometry);

	/**  */
	UFUNCTION(BlueprintPure, Category = "User Interface|Geometry")
	static float TransformScalarAbsoluteToLocal(const FGeometry& Geometry, float AbsoluteScalar);

	/**  */
	UFUNCTION(BlueprintPure, Category = "User Interface|Geometry")
	static float TransformScalarLocalToAbsolute(const FGeometry& Geometry, float LocalScalar);

	/**  */
	UFUNCTION(BlueprintPure, Category = "User Interface|Geometry")
	static FVector2D TransformVectorAbsoluteToLocal(const FGeometry& Geometry, FVector2D AbsoluteVector);

	/**  */
	UFUNCTION(BlueprintPure, Category = "User Inter
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值