You've already forked LuckyWorld
Optimizing the code
This commit is contained in:
42
Source/LuckyWorldV2/Public/UI/Common/TextFieldUserWidget.h
Normal file
42
Source/LuckyWorldV2/Public/UI/Common/TextFieldUserWidget.h
Normal file
@ -0,0 +1,42 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Blueprint/UserWidget.h"
|
||||
#include "TextFieldUserWidget.generated.h"
|
||||
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnEditText, FString, editstr);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class LUCKYWORLDV2_API UTextFieldUserWidget : public UUserWidget
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
protected:
|
||||
virtual void NativeConstruct() override;
|
||||
|
||||
public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
|
||||
FString SettingFieldLabel;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
|
||||
UTexture2D* SettingIcon;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
|
||||
FString SettingString;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
|
||||
FLinearColor SettingColor;
|
||||
|
||||
public:
|
||||
UPROPERTY(BlueprintCallable, BlueprintAssignable)
|
||||
FOnEditText OnEditText;
|
||||
|
||||
public:
|
||||
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
||||
void UpdateDisplay();
|
||||
};
|
Reference in New Issue
Block a user