RealtimeStyleTransferRuntime/Source/LyraGame/UI/Foundation/LyraButtonBase.h

49 lines
1.3 KiB
C
Raw Permalink Normal View History

2022-05-23 18:41:30 +00:00
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CommonButtonBase.h"
2022-09-13 07:18:28 +00:00
#include "CommonInputBaseTypes.h"
#include "HAL/Platform.h"
#include "Internationalization/Text.h"
#include "UObject/UObjectGlobals.h"
2022-05-23 18:41:30 +00:00
#include "LyraButtonBase.generated.h"
2022-09-13 07:18:28 +00:00
class UObject;
struct FFrame;
2022-05-23 18:41:30 +00:00
UCLASS(Abstract, BlueprintType, Blueprintable)
class ULyraButtonBase : public UCommonButtonBase
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable)
void SetButtonText(const FText& InText);
protected:
// UUserWidget interface
virtual void NativePreConstruct() override;
// End of UUserWidget interface
// UCommonButtonBase interface
virtual void UpdateInputActionWidget() override;
virtual void OnInputMethodChanged(ECommonInputType CurrentInputType) override;
// End of UCommonButtonBase interface
void RefreshButtonText();
UFUNCTION(BlueprintImplementableEvent)
void UpdateButtonText(const FText& InText);
UFUNCTION(BlueprintImplementableEvent)
void UpdateButtonStyle();
private:
UPROPERTY(EditAnywhere, Category="Button", meta=(InlineEditConditionToggle))
uint8 bOverride_ButtonText : 1;
UPROPERTY(EditAnywhere, Category="Button", meta=( editcondition="bOverride_ButtonText" ))
FText ButtonText;
};