Announcement

Collapse
No announcement yet.

Expose ShowHUD event and getter

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [FEATURE REQUEST] Expose ShowHUD event and getter

    Hey guys,

    We have nice console command ShowHUD, however it is useless for custom HUD because we often needs to do some special things before hiding/showing HUD. Can you please expose getter and event to blueprint ? Implementation is simple:

    .h
    Code:
    DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnShowHUDUpdatedDelegate, bool, bShowHUD);
    ...
    UFUNCTION(BlueprintCallable, Category = "HUD")
    	bool GetShowHUD() const;
    
    	UPROPERTY(BlueprintAssignable, Category = "HUD")
    	FOnShowHUDUpdatedDelegate OnShowHUDUpdated;
    
    	virtual void ShowHUD() override;
    .cpp
    Code:
    bool ACOMHUD::GetShowHUD() const
    {
    	return bShowHUD;
    }
    
    void ACOMHUD::ShowHUD()
    {
    	Super::ShowHUD();
    
    	OnShowHUDUpdated.Broadcast(GetShowHUD());
    }
    I think this should be available out of box.
Working...
X