Optimizing the code
This commit is contained in:
parent
3df02a451f
commit
f8eebc934d
BIN
Content/GameBP/UI/Common/WB_LuckyTextFieldLayout.uasset
Normal file
BIN
Content/GameBP/UI/Common/WB_LuckyTextFieldLayout.uasset
Normal file
Binary file not shown.
BIN
Content/GameBP/UI/Common/WB_MenuTitle.uasset
Normal file
BIN
Content/GameBP/UI/Common/WB_MenuTitle.uasset
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,5 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "UI/Common/MenuTitleUserWidget.h"
|
||||
|
@ -0,0 +1,11 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "UI/Common/TextFieldUserWidget.h"
|
||||
|
||||
void UTextFieldUserWidget::NativeConstruct()
|
||||
{
|
||||
Super::NativeConstruct();
|
||||
|
||||
UpdateDisplay();
|
||||
}
|
27
Source/LuckyWorldV2/Public/UI/Common/MenuTitleUserWidget.h
Normal file
27
Source/LuckyWorldV2/Public/UI/Common/MenuTitleUserWidget.h
Normal file
@ -0,0 +1,27 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Blueprint/UserWidget.h"
|
||||
#include "MenuTitleUserWidget.generated.h"
|
||||
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnClickCloseButton);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class LUCKYWORLDV2_API UMenuTitleUserWidget : public UUserWidget
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
|
||||
FString MenuTitle;
|
||||
|
||||
public:
|
||||
UPROPERTY(BlueprintCallable, BlueprintAssignable)
|
||||
FOnClickCloseButton OnClickCloseButton;
|
||||
|
||||
};
|
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();
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user