Space Plunder
Loading...
Searching...
No Matches
LevelSelectionWidget.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "Data/MenuData.h"
8#include "LevelSelectionWidget.generated.h"
9
10struct FGameLevel;
11
12
19UCLASS()
20class MENUSYSTEM_API ULevelSelectionWidget : public UMenuSystemWidget
21{
22 GENERATED_BODY()
23
24public:
25
26 ULevelSelectionWidget(const FObjectInitializer& ObjectInitializer);
27
28 virtual void NativePreConstruct() override;
29 virtual void NativeConstruct() override;
30
31 //- Called by Child //
32 void SelectIndex(const uint32 Index, const FGameLevel& GameLevel);
33
34 UFUNCTION(BlueprintCallable, Category="Menu System")
35 void SetMode(const EGameplayMode Mode, const bool bDebugLevels = false);
36 void SetLevelList(const TArray<FGameLevel>& GameLevels);
37
38 //- Check Game Instance for last Selected Level //
39 UFUNCTION(BlueprintCallable, Category="Menu System")
40 void GetLastSelectedLevel();
41
42 virtual UWidget* NativeGetDesiredFocusTarget() const override;
43
44 // virtual void SetFocusToFirstVisibleOption_Implementation() override;
45
46
47protected:
48 virtual bool Initialize() override;
49
50
51 TOptional<uint32> SelectedIndex;
53
54 UFUNCTION(BlueprintCallable, Category="Menu System")
55 void OnBackButtonClicked();
56
57 void UpdateLevelSelection();
58
59 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
60 class UPanelWidget* LevelList = nullptr;
61 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget))
62 class UButton* CloseButton = nullptr;
63
64private:
65
67
68 TSubclassOf<class UUserWidget> LevelSelectSingleClass;
69
70
71};
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
EGameplayMode
Definition MenuData.h:40
Definition LevelSelectionWidget.h:21
FGameLevel SelectedGameLevel
Definition LevelSelectionWidget.h:52
TOptional< uint32 > SelectedIndex
Definition LevelSelectionWidget.h:51
Definition MenuSystemWidget.h:19
Definition MenuData.h:115