DeskSim v2 0.1
Train simulator prototype created for Lokførerskolen
PopUpWidget.h
1// Copyright 2022 Thomas Arinesalingam, John Ole Bjerke, Endre Heksum & Henrik Markengbakken Karlsen . All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Blueprint/UserWidget.h"
7#include "Components/Image.h"
8#include "PopUpWidget.generated.h"
9
10
11UENUM()
12enum EPopupType {
13 Message = 1,
14 Warning = 2,
15 Critical = 3,
16};
17
21UCLASS()
22class DESKSIMV2_API UPopUpWidget : public UUserWidget
23{
24 GENERATED_BODY()
25
26public:
27
28 UPopUpWidget(const FObjectInitializer& ObjectInitializer);
29
30 UFUNCTION()
31 void SetPopUpType(EPopupType Type, FString Description);
32
33 UPROPERTY(EditAnywhere, BluePrintReadWrite, meta = (BindWidget))
34 class UImage* PopupIcon;
35 UPROPERTY(EditAnywhere, BluePrintReadWrite, meta = (BindWidget))
36 class UTextBlock* PopupTitle;
37 UPROPERTY(EditAnywhere, BluePrintReadWrite, meta = (BindWidget))
38 class UTextBlock* PopupDescription;
39 UPROPERTY(EditAnyWhere, BlueprintReadWrite, meta = (BindWidget))
40 class UButton* PopupOkButton;
41
42protected:
43 TMap<EPopupType, UTexture2D*> Images;
44
45};
Popup message class.
Definition: PopUpWidget.h:23