Space Plunder
Loading...
Searching...
No Matches
ReplayViewer.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"
6#include "Blueprint/UserWidget.h"
7#include "ReplayViewer.generated.h"
8
10class UComboBoxString;
11class UComboBox;
12class USlider;
13class UButton;
14class UTextBlock;
21UCLASS()
22class MENUSYSTEM_API UReplayViewer : public UUserWidget
23{
24 GENERATED_BODY()
25
26public:
27
28 virtual void NativeConstruct() override;
29 virtual bool Initialize() override;
30
31 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta=(BindWidget))
32 UTextBlock* CurrentTimeText;
33 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta=(BindWidget))
34 UTextBlock* TotalTimeText;
35
36 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta=(BindWidget))
37 USlider* TimeSlider;
38
39 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta=(BindWidget))
40 UButton* PauseButton;
41 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta=(BindWidget))
42 UTextBlock* PauseButtonText;
43 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta=(BindWidget))
44 UComboBoxString* PlayRateComboBox;
45
46 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta=(BindWidget))
47 UButton* RestartButton;
48 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta=(BindWidget))
49 UButton* RewindButton;
50
51 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta=(BindWidget))
52 UButton* MenuButton;
53
54 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta=(BindWidget))
55 UButton* BackButton;
56
57
58 UFUNCTION(BlueprintCallable, Category="Replay")
59 void SetReplayController(AReplaySpectatorController* Controller){ReplayController = Controller;};
60
61protected:
62
63 UFUNCTION()
64 void PauseButtonClicked();
65 UFUNCTION()
66 void RestartButtonClicked();
67 UFUNCTION()
68 void RewindButtonClicked();
69
70 UFUNCTION()
71 void BackButtonClicked();
72 UFUNCTION()
73 void MenuButtonClicked();
74
75 //- Combo Box //
76 UFUNCTION()
77 void PlaybackSelectionChanged(FString Item, ESelectInfo::Type SelectionType);
78
79 //- Slider controls //
80 UFUNCTION()
81 void OnMouseCaptureSlider();
82 UFUNCTION()
83 void OnMouseCaptureEndSlider();
84 UFUNCTION()
85 void OnValueChanged(float Value);
86
87
88
89 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Replay")
90 int32 TotalTimeInSeconds = 0;
91 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Replay")
92 int32 CurrentTimeInSeconds = 0;
93
94 virtual void NativeTick(const FGeometry& MyGeometry, float InDeltaTime) override;
95
96 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Replay")
97 class AReplaySpectatorController* ReplayController;
98
99 UFUNCTION(BlueprintCallable, Category="Replay")
100 FText GetCurrentTimeText() const;
101
102 UFUNCTION(BlueprintCallable, Category="Replay")
103 FText GetTotalTimeText() const;
104
105 UFUNCTION(BlueprintCallable, Category="Replay")
106 FText GetPauseButtonText() const;
107
108 UFUNCTION(BlueprintCallable, Category="Replay")
109 float GetSliderValue() const;
110
111 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Replay")
112 bool bSliderPickedByUser = false;
113 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Replay")
114 bool bCurrentlyPaused = false;
115
116 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Replay")
117 float SliderReleasedAtValue = 0.0f;
118
119private:
120
121
122 void GetReplaySpectatorController();
123
124};
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
Definition ReplaySpectatorController.h:14
The UI widget for controlling the Replay Clips.
Definition ReplayViewer.h:23