Skip to content
Snippets Groups Projects
Commit 594f3b0f authored by Jonathan Ehret's avatar Jonathan Ehret
Browse files

add the possibility to hide the HUD at runtime, e.g., when yu want to navigate...

add the possibility to hide the HUD at runtime, e.g., when yu want to navigate to a specific condition nd then record a video in full screen
parent 94c57942
Branches
Tags
No related merge requests found
...@@ -273,3 +273,13 @@ void ASFMasterHUD::OnShowConditionsButtonPressed() ...@@ -273,3 +273,13 @@ void ASFMasterHUD::OnShowConditionsButtonPressed()
const ASFHMDSpectatorHUDHelp* ASFMasterHUD::GetHUDHelper() { const ASFHMDSpectatorHUDHelp* ASFMasterHUD::GetHUDHelper() {
return HMDHUDHelper; return HMDHUDHelper;
} }
void ASFMasterHUD::SetHUDVisible(bool bVisible)
{
if (bVisible) {
HUDWidget->SetVisibility(ESlateVisibility::Visible);
}
else {
HUDWidget->SetVisibility(ESlateVisibility::Hidden);
}
}
...@@ -719,6 +719,13 @@ USFExperimenterWindow* USFGameInstance::GetExperimenterWindow() const ...@@ -719,6 +719,13 @@ USFExperimenterWindow* USFGameInstance::GetExperimenterWindow() const
return ExperimenterWindow; return ExperimenterWindow;
} }
void USFGameInstance::SetHUDVisible(bool bVisible)
{
if (GetHUD()) {
GetHUD()->SetHUDVisible(bVisible);
}
}
USFFadeHandler* USFGameInstance::GetFadeHandler() USFFadeHandler* USFGameInstance::GetFadeHandler()
{ {
return FadeHandler; return FadeHandler;
......
...@@ -63,6 +63,9 @@ public: ...@@ -63,6 +63,9 @@ public:
const ASFHMDSpectatorHUDHelp* GetHUDHelper(); const ASFHMDSpectatorHUDHelp* GetHUDHelper();
//setting HUD in-/visibile at runtime
void SetHUDVisible(bool bVisible);
protected: protected:
UPROPERTY(VisibleAnywhere) UPROPERTY(VisibleAnywhere)
USFHUDWidget* HUDWidget; USFHUDWidget* HUDWidget;
......
...@@ -144,6 +144,10 @@ public: ...@@ -144,6 +144,10 @@ public:
UFUNCTION(BlueprintCallable) UFUNCTION(BlueprintCallable)
USFExperimenterWindow* GetExperimenterWindow() const; USFExperimenterWindow* GetExperimenterWindow() const;
//setting HUD in-/visibile at runtime
UFUNCTION(BlueprintCallable)
void SetHUDVisible(bool bVisible);
//this is used by the SFMasterHUD to store content between levels //this is used by the SFMasterHUD to store content between levels
FHUDSavedData HUDSavedData; FHUDSavedData HUDSavedData;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment