Optimize some UI

This commit is contained in:
martinluckyrobots
2025-04-18 22:59:13 +08:00
parent eb650a2afd
commit 532aab0664
12 changed files with 82 additions and 0 deletions

View File

@ -6,7 +6,13 @@
#include "Blueprint/UserWidget.h"
#include "TaskListViewUserWidget.generated.h"
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnAddButtonClick);
class UListView;
class UVerticalBox;
class UWidgetSwitcher;
class UObjectsListUserWidget;
class UStaticMesh;
/**
*
*/
@ -15,7 +21,46 @@ class LUCKYWORLDV2_API UTaskListViewUserWidget : public UUserWidget
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
FString TaskListLabel;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
bool bIsEnableSetting;
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")
bool bIsEnableAddButton;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
FString AddButtonLabel;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
TSubclassOf<UObjectsListUserWidget> ObjectsListUserWidgetClass;
public:
UPROPERTY(BlueprintCallable, BlueprintAssignable)
FOnAddButtonClick OnAddButtonClick;
public:
UFUNCTION(BlueprintCallable)
void DoUpdateObject(TArray<TSoftObjectPtr<UStaticMesh>> StaticMeshList);
public:
UFUNCTION(BlueprintPure, BlueprintImplementableEvent)
UListView* GetTaskListView();
UFUNCTION(BlueprintPure, BlueprintImplementableEvent)
UVerticalBox* GetObjectListView();
UFUNCTION(BlueprintPure, BlueprintImplementableEvent)
UWidgetSwitcher* GetWidgetSwitcher();
};