Agrarsense
CameraWidgetBase.h
Go to the documentation of this file.
1// Copyright (c) 2023 FrostBit Software Lab at the Lapland University of Applied Sciences
2//
3// This work is licensed under the terms of the MIT license.
4// For a copy, see <https://opensource.org/licenses/MIT>.
5
6#pragma once
7
8#include "CoreMinimal.h"
9#include "Blueprint/UserWidget.h"
10#include "CameraWidgetBase.generated.h"
11
12class ACamera;
13
17UCLASS()
18class AGRARSENSE_API UCameraWidgetBase : public UUserWidget
19{
20 GENERATED_BODY()
21
22public:
23
28 UFUNCTION(BlueprintCallable, BlueprintPure)
29 virtual ACamera* GetCameraReference() { return CameraReference; }
30
35 UFUNCTION(BlueprintCallable)
36 virtual void SetCameraReference(ACamera* CameraRef) { CameraReference = CameraRef; }
37
38 UFUNCTION(BlueprintCallable)
39 virtual void Setup(ACamera* CameraRef, bool ShowOnStartup = true)
40 {
41 SetCameraReference(CameraRef);
42 ShowGuideOnStartup = ShowOnStartup;
43 }
44
45 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Camera Widget")
46 void UpdateUI();
47
48protected:
49
53 UPROPERTY(BlueprintReadWrite)
54 TObjectPtr<ACamera> CameraReference;
55
56 UPROPERTY(BlueprintReadWrite)
57 bool ShowGuideOnStartup = true;
58
59};
Definition: Camera.h:52