RoveSoSimulator
Loading...
Searching...
No Matches
UIWidget.h
1#pragma once
2
3#include "Core/RoveSoSimulatorUIManager.h"
4#include "UObject/ObjectMacros.h"
5#include "Blueprint/UserWidget.h"
6#include "UIWidget.generated.h"
7
8class UEnhancedInputComponent;
9class URoveSoSimulatorInputManager;
10class URoveSoSimulatorUIManager;
11
12/**
13 * @brief Abstract class which represents a UI Screen
14 */
15UCLASS(Abstract)
16class UUIWidget : public UUserWidget
17{
18 GENERATED_BODY()
19
20public:
21 UFUNCTION()
22 void BindUIManager(URoveSoSimulatorUIManager* UIm) { UIManager = UIm; }
23 UFUNCTION()
24 // Called once at startup to allow attachment of custom bindings
25 virtual void SetupInputBindings(URoveSoSimulatorInputManager* inputManager) {} // NOP if no custom bindings are needed, this is normal as ESC / Navigation is already handled
26 // Called before the UIWidget is added to the viewport
27 virtual void BeforeAddition() {}
28 // Called after the UIWidget is added to the viewport
29 virtual void AfterAddition() {}
30 // Called before the UIWidget is removed from the viewport
31 virtual void BeforeRemoval() {}
32 // Called after the UIWidget is removed from the viewport
33 virtual void AfterRemoval() {}
34
35protected:
36 UPROPERTY()
37 URoveSoSimulatorUIManager* UIManager;
38 UPROPERTY()
39 EUIWidget SelfID;
40};