You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#jira UE-117887 #rb Vincent.Gauthier #preflight 6148f759315f54000134958f [CL 17576768 by daren cheng in ue5-main branch]
57 lines
1.6 KiB
C++
57 lines
1.6 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
/**
|
|
* Widget for editor utilities
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/ObjectMacros.h"
|
|
#include "UObject/Object.h"
|
|
#include "UObject/ScriptMacros.h"
|
|
#include "Blueprint/UserWidget.h"
|
|
#include "EditorUtilityWidget.generated.h"
|
|
|
|
class AActor;
|
|
class UEditorPerProjectUserSettings;
|
|
|
|
UCLASS(Abstract, meta = (ShowWorldContextPin), config = Editor)
|
|
class BLUTILITY_API UEditorUtilityWidget : public UUserWidget
|
|
{
|
|
GENERATED_UCLASS_BODY()
|
|
|
|
public:
|
|
// The default action called when the widget is invoked if bAutoRunDefaultAction=true (it is never called otherwise)
|
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, Category = "Editor")
|
|
void Run();
|
|
|
|
// Run the default action
|
|
void ExecuteDefaultAction();
|
|
|
|
bool ShouldAlwaysReregisterWithWindowsMenu() const
|
|
{
|
|
return bAlwaysReregisterWithWindowsMenu;
|
|
}
|
|
|
|
bool ShouldAutoRunDefaultAction() const
|
|
{
|
|
return bAutoRunDefaultAction;
|
|
}
|
|
|
|
virtual bool IsEditorUtility() const override { return true; }
|
|
|
|
protected:
|
|
UPROPERTY(Category = Config, EditDefaultsOnly, BlueprintReadWrite, AssetRegistrySearchable)
|
|
FString HelpText;
|
|
|
|
// Should this widget always be re-added to the windows menu once it's opened
|
|
UPROPERTY(Config, Category = Settings, EditDefaultsOnly)
|
|
bool bAlwaysReregisterWithWindowsMenu;
|
|
|
|
// Should this blueprint automatically run OnDefaultActionClicked, or should it open up a details panel to edit properties and/or offer multiple buttons
|
|
UPROPERTY(Category = Settings, EditDefaultsOnly, BlueprintReadOnly)
|
|
bool bAutoRunDefaultAction;
|
|
|
|
};
|