LuckyWorldV2/Source/Luckyrobots/Public/Menus/MainScreenUserWidget.h

77 lines
1.6 KiB
C
Raw Normal View History

2025-03-28 14:45:12 +08:00
#pragma once
#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
2025-03-28 16:13:47 +08:00
#include "SharedDef.h"
2025-03-28 14:45:12 +08:00
#include "MainScreenUserWidget.generated.h"
UCLASS()
class LUCKYROBOTS_API UMainScreenUserWidget : public UUserWidget
{
GENERATED_BODY()
2025-03-29 22:43:51 +08:00
protected:
2025-04-07 11:32:45 +08:00
virtual void NativeConstruct() override;
2025-03-29 22:43:51 +08:00
2025-03-28 14:45:12 +08:00
public:
2025-03-28 16:13:47 +08:00
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray<FRobotData> RobotDataList;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray<FLevelData> LevelDataList;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
2025-04-07 11:32:45 +08:00
int32 CurrentRobotIndex;
2025-03-28 16:13:47 +08:00
UPROPERTY(EditAnywhere, BlueprintReadWrite)
2025-04-07 11:32:45 +08:00
int32 CurrentLevelIndex;
2025-03-29 22:43:51 +08:00
UPROPERTY(EditAnywhere, BlueprintReadWrite)
2025-04-07 11:32:45 +08:00
int32 CurrentQualityIndex;
2025-03-29 22:43:51 +08:00
2025-03-28 16:13:47 +08:00
public:
UFUNCTION(BlueprintCallable)
2025-03-28 14:45:12 +08:00
void InitData();
2025-04-07 11:32:45 +08:00
2025-03-28 16:13:47 +08:00
UFUNCTION(BlueprintCallable)
void InitRobotData();
2025-04-07 11:32:45 +08:00
2025-03-28 16:13:47 +08:00
UFUNCTION(BlueprintCallable)
void InitLevelData();
2025-04-07 11:32:45 +08:00
2025-03-28 16:13:47 +08:00
UFUNCTION(BlueprintCallable)
2025-04-07 11:32:45 +08:00
FRobotData GetCurrentRobotData() const;
2025-03-28 16:13:47 +08:00
UFUNCTION(BlueprintCallable)
2025-04-07 11:32:45 +08:00
FLevelData GetCurrentLevelData() const;
2025-03-29 22:43:51 +08:00
UFUNCTION(BlueprintCallable)
void SelectNextRobot();
UFUNCTION(BlueprintCallable)
void SelectPreviousRobot();
UFUNCTION(BlueprintCallable)
void SelectNextLevel();
UFUNCTION(BlueprintCallable)
void SelectPreviousLevel();
UFUNCTION(BlueprintCallable)
void SelectNextQuality();
UFUNCTION(BlueprintCallable)
void SelectPreviousQuality();
void UpdateSelectRobot();
void UpdateSelectLevel();
void UpdateSelectQuality();
2025-03-28 16:13:47 +08:00
public:
UFUNCTION(BlueprintImplementableEvent)
void BPUpdateSelectRobot();
UFUNCTION(BlueprintImplementableEvent)
void BPUpdateSelectLevel();
2025-03-29 22:43:51 +08:00
UFUNCTION(BlueprintImplementableEvent)
void BPUpdateSelectQuality();
2025-03-28 14:45:12 +08:00
};