Optimize some UI

This commit is contained in:
martinluckyrobots
2025-04-17 23:30:37 +08:00
parent 6198dc374e
commit 3f5bc9e1b1
15 changed files with 210 additions and 11 deletions

View File

@ -6,6 +6,8 @@
#include "Blueprint/UserWidget.h"
#include "AllRandomUserWidget.generated.h"
class UWrapBox;
class UObjectsListUserWidget;
/**
*
*/
@ -13,8 +15,25 @@ UCLASS()
class LUCKYWORLDV2_API UAllRandomUserWidget : public UUserWidget
{
GENERATED_BODY()
protected:
virtual void NativeConstruct() override;
public:
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
TSubclassOf<UObjectsListUserWidget> ObjectsListUserWidgetClass;
public:
UFUNCTION(BlueprintCallable)
void DoAllRandomMenuStateChanged(bool open);
UFUNCTION(BlueprintCallable)
void DoUpdateItemList(EItemCategory ItemCategory);
UFUNCTION(BlueprintCallable)
void DoOpen();
public:
UFUNCTION(BlueprintPure, BlueprintImplementableEvent)
UWrapBox* GetWrapBox();
};

View File

@ -0,0 +1,21 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "SharedDef.h"
#include "ObjectsListUserWidget.generated.h"
/**
*
*/
UCLASS()
class LUCKYWORLDV2_API UObjectsListUserWidget : public UUserWidget
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite)
FSelectableItemData SelectableItemData;
};

View File

@ -6,6 +6,8 @@
#include "Blueprint/UserWidget.h"
#include "PathfindingSelectorUserWidget.generated.h"
class ATargetSelector;
class USelectGoalUserWidget;
/**
*
*/
@ -15,6 +17,16 @@ class LUCKYWORLDV2_API UPathfindingSelectorUserWidget : public UUserWidget
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
void BPClickSelectObjectBtn();
UPROPERTY(EditAnywhere, BlueprintReadWrite)
ATargetSelector* CreatedTargetSelector;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
USelectGoalUserWidget* OwnerSelectGoalUserWidget;
public:
UFUNCTION(BlueprintCallable)
void ClickSelectObjectBtn();
UFUNCTION(BlueprintCallable)
void AddGoal();
};