You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Added icons and icon colors for ST nodes - Implemented icons for some common ST nodes - Small update to ST logic icons - Added icons to the task list in State treeview row, adjusted task list BG color to make icons visible - Fixed ST editor tabs icons and names (e.g. there were two tabs that had the same label) - Moved ST node picker to separate class - Moved category array customization to common helper function - Added node icons to the ST node picker - Add node button is not node selector too (simila to Niagara) - Consolidated the add button style across all lists - Cleaned up the node customization - Moved type selector, debug, and property controls into one menu at right - The combined menu can be also summoned using right click - Renaming now has to be triggered via the menu - Replacing node happens via menu - Most of the row was left "clickable" to later use it for selection - Improved the visualization and controls for the expression indentation - Cleaned up state customization - Moved parameters to own category (similar to the tree params) - Moved event to the enter conditions category - Cleaned up transition customization - Improved the transition display - Consolidated add button styles #jira UE-180608 #rb Juan.Portillo, Mieszko.Zielinski [CL 33030431 by mikko mononen in ue5-main branch]
64 lines
2.0 KiB
C
64 lines
2.0 KiB
C
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "StateTreeTaskBase.h"
|
|
#include "StateTreeDebugTextTask.generated.h"
|
|
|
|
enum class EStateTreeRunStatus : uint8;
|
|
struct FStateTreeTransitionResult;
|
|
|
|
USTRUCT()
|
|
struct STATETREEMODULE_API FStateTreeDebugTextTaskInstanceData
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
/** Optional actor where to draw the text at. */
|
|
UPROPERTY(EditAnywhere, Category = "Input", meta=(Optional))
|
|
TObjectPtr<AActor> ReferenceActor = nullptr;
|
|
};
|
|
|
|
/**
|
|
* Draws debug text on the HUD associated to the player controller.
|
|
*/
|
|
USTRUCT(meta = (DisplayName = "Debug Text Task"))
|
|
struct STATETREEMODULE_API FStateTreeDebugTextTask : public FStateTreeTaskCommonBase
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
using FInstanceDataType = FStateTreeDebugTextTaskInstanceData;
|
|
|
|
FStateTreeDebugTextTask() = default;
|
|
|
|
virtual const UStruct* GetInstanceDataType() const override { return FInstanceDataType::StaticStruct(); }
|
|
|
|
virtual EStateTreeRunStatus EnterState(FStateTreeExecutionContext& Context, const FStateTreeTransitionResult& Transition) const override;
|
|
virtual void ExitState(FStateTreeExecutionContext& Context, const FStateTreeTransitionResult& Transition) const override;
|
|
#if WITH_EDITOR
|
|
virtual FText GetDescription(const FGuid& ID, FStateTreeDataView InstanceDataView, const IStateTreeBindingLookup& BindingLookup, EStateTreeNodeFormatting Formatting = EStateTreeNodeFormatting::Text) const override;
|
|
virtual FName GetIconName() const override
|
|
{
|
|
return FName("StateTreeEditorStyle|Node.Text");
|
|
}
|
|
virtual FColor GetIconColor() const override
|
|
{
|
|
return UE::StateTree::Colors::Grey;
|
|
}
|
|
#endif
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Parameter")
|
|
FString Text;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Parameter")
|
|
FColor TextColor = FColor::White;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Parameter", meta=(ClampMin = 0, UIMin = 0))
|
|
float FontScale = 1.0f;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Parameter")
|
|
FVector Offset = FVector::ZeroVector;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Parameter")
|
|
bool bEnabled = true;
|
|
};
|