// 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 "MainScreenUserWidget.generated.h" class UDataTable; /** * */ UCLASS() class LUCKYROBOTS_API UMainScreenUserWidget : public UUserWidget { GENERATED_BODY() public: UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config") UDataTable* RobotDataDataTable; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config") UDataTable* LevelDataTable; public: UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray RobotDataList; UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray LevelDataList; UPROPERTY(EditAnywhere, BlueprintReadWrite) int iCurrentSelectRobot; UPROPERTY(EditAnywhere, BlueprintReadWrite) int iCurrentSelectLevel; public: UFUNCTION(BlueprintCallable) void InitData(); UFUNCTION(BlueprintCallable) void InitRobotData(); UFUNCTION(BlueprintCallable) void InitLevelData(); UFUNCTION(BlueprintCallable) FRobotData GetCurrentRobotData(); UFUNCTION(BlueprintCallable) FLevelData GetCurrentLevelData(); public: UFUNCTION(BlueprintImplementableEvent) void BPUpdateSelectRobot(); UFUNCTION(BlueprintImplementableEvent) void BPUpdateSelectLevel(); };