第一次提交
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
// Copyright 2025 https://yuewu.dev/en All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "UObject/Object.h"
|
||||
#include "Layout/Visibility.h"
|
||||
#include "IPropertyTypeCustomization.h"
|
||||
|
||||
class FDetailWidgetRow;
|
||||
class IDetailChildrenBuilder;
|
||||
class IPropertyHandle;
|
||||
|
||||
/** Details customization for FAttributeBasedFloat */
|
||||
class GENERICGAMEPLAYABILITIESEDITOR_API FGGA_AttributeGroupNameCustomization : public IPropertyTypeCustomization
|
||||
{
|
||||
public:
|
||||
static TSharedRef<IPropertyTypeCustomization> MakeInstance();
|
||||
|
||||
/** Overridden to provide the property name or hide, if necessary */
|
||||
virtual void CustomizeHeader(TSharedRef<IPropertyHandle> StructPropertyHandle, FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override;
|
||||
|
||||
static void GeneratePrimaryComboboxStrings(TArray<TSharedPtr<FString>>& OutComboBoxStrings, TArray<TSharedPtr<SToolTip>>& OutToolTips, TArray<bool>& OutRestrictedItems, bool bAllowClear, bool bAllowAll,
|
||||
TMap<FName, TArray<FName>>* InItems);
|
||||
FString GenerateMainString();
|
||||
void OnMainValueSelected(const FString& String);
|
||||
static void GenerateSubComboboxStrings(TArray<TSharedPtr<FString>>& OutComboBoxStrings, TArray<TSharedPtr<SToolTip>>& OutToolTips, TArray<bool>& OutRestrictedItems, bool bAllowClear, bool bAllowAll,
|
||||
TMap<FName, TArray<FName>>* InItems, TSharedPtr<IPropertyHandle> PrimaryKey);
|
||||
FString GenerateSubString();
|
||||
void OnSubValueSelected(const FString& String);
|
||||
/** Overridden to allow for possibly being hidden */
|
||||
virtual void CustomizeChildren(TSharedRef<IPropertyHandle> StructPropertyHandle, IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override;
|
||||
|
||||
private:
|
||||
TMap<FName, TArray<FName>> FNameMap;
|
||||
|
||||
TSharedPtr<IPropertyHandle> MainNamePropertyHandle;
|
||||
TSharedPtr<IPropertyHandle> SubNamePropertyHandle;
|
||||
TWeakPtr<IPropertyUtilities> PropertyUtilities;
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
// Copyright 2025 https://yuewu.dev/en All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "K2Node_CallFunction.h"
|
||||
#include "GGA_K2Node_ContextPayload.generated.h"
|
||||
|
||||
class UEdGraphPin;
|
||||
class FBlueprintActionDatabaseRegistrar;
|
||||
|
||||
/**
|
||||
* Node customization for MakeInstancedStruct(), SetContextPayload(), and GetContextPayload().
|
||||
*/
|
||||
UCLASS()
|
||||
class GENERICGAMEPLAYABILITIESEDITOR_API UGGA_K2Node_ContextPayload : public UK2Node_CallFunction
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
|
||||
//~ Begin UEdGraphNode Interface
|
||||
virtual void GetMenuActions(FBlueprintActionDatabaseRegistrar& ActionRegistrar) const override;
|
||||
//~ End UEdGraphNode Interface
|
||||
|
||||
//~ Begin K2Node Interface
|
||||
virtual bool IsConnectionDisallowed(const UEdGraphPin* MyPin, const UEdGraphPin* OtherPin, FString& OutReason) const override;
|
||||
//~ End K2Node Interface
|
||||
|
||||
protected:
|
||||
//~ UK2Node_CallFunction interface
|
||||
virtual bool CanToggleNodePurity() const override { return false; }
|
||||
//~ End UK2Node_CallFunction interface
|
||||
};
|
||||
@@ -0,0 +1,73 @@
|
||||
// Copyright 2025 https://yuewu.dev/en All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "K2Node.h"
|
||||
#include "GGA_K2Node_EffectContextPayload.generated.h"
|
||||
|
||||
namespace K2Node_ContextPayload_PinNames
|
||||
{
|
||||
static FName EffectContextPinName = "EffectContext";
|
||||
static FName InstancedStructPinName = "InstancedStruct";
|
||||
static FName KeyPinName = "Key";
|
||||
static FName PayloadTypePinName = "PayloadType";
|
||||
static FName OutStructPinName = "ReturnValue";
|
||||
static FName ValidExecPinName = "Valid";
|
||||
static FName InvalidExecPinName = "Invalid";
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class GENERICGAMEPLAYABILITIESEDITOR_API UGGA_K2Node_EffectContextPayload : public UK2Node
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
protected:
|
||||
//~ UEdGraphNode Interface.
|
||||
virtual void PinConnectionListChanged(UEdGraphPin* Pin) override;
|
||||
virtual void PostPlacedNewNode() override;
|
||||
virtual void PinDefaultValueChanged(UEdGraphPin* Pin) override;
|
||||
virtual FString GetPinMetaData(FName InPinName, FName InKey) override;
|
||||
virtual FSlateIcon GetIconAndTint(FLinearColor& OutColor) const override;
|
||||
virtual FLinearColor GetNodeTitleColor() const override;
|
||||
|
||||
|
||||
//~ UK2Node Interface
|
||||
virtual FText GetMenuCategory() const override;
|
||||
virtual void ReallocatePinsDuringReconstruction(TArray<UEdGraphPin*>& OldPins) override;
|
||||
virtual bool IsNodeSafeToIgnore() const override { return true; }
|
||||
virtual bool IsNodePure() const override { return false; }
|
||||
virtual void PostReconstructNode() override;
|
||||
|
||||
//~ Getters
|
||||
UEdGraphPin* GetEffectContextPin() const;
|
||||
UEdGraphPin* GetInstancedStructPin() const;
|
||||
UEdGraphPin* GetKeyPin() const;
|
||||
UEdGraphPin* GetPayloadTypePin() const;
|
||||
UEdGraphPin* GetOutStructPin() const;
|
||||
UEdGraphPin* GetValidPin() const;
|
||||
UEdGraphPin* GetInvalidPin() const;
|
||||
|
||||
//~ Helper Functions
|
||||
void RefreshOutputType();
|
||||
};
|
||||
|
||||
UCLASS(BlueprintType, Blueprintable)
|
||||
class GENERICGAMEPLAYABILITIESEDITOR_API UGGA_K2Node_GetEffectContextPayload : public UGGA_K2Node_EffectContextPayload
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
//~ UEdGraphNode Interface.
|
||||
virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
|
||||
virtual FText GetTooltipText() const override;
|
||||
virtual FText GetKeywords() const override;
|
||||
virtual void AllocateDefaultPins() override;
|
||||
|
||||
//~ UK2Node Interface
|
||||
virtual void GetMenuActions(FBlueprintActionDatabaseRegistrar& ActionRegistrar) const override;
|
||||
virtual void ExpandNode(class FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph) override;
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Modules/ModuleManager.h"
|
||||
|
||||
class FGenericGameplayAbilitiesEditorModule : public IModuleInterface
|
||||
{
|
||||
public:
|
||||
virtual void StartupModule() override;
|
||||
virtual void ShutdownModule() override;
|
||||
};
|
||||
Reference in New Issue
Block a user