Added getter and delegate for automatic profile switching
This commit is contained in:
parent
16061e077b
commit
3f43bdb16b
2 changed files with 13 additions and 0 deletions
|
@ -260,6 +260,12 @@ EProfile UHarmonyLinkGraphics::GetActiveProfile() const
|
|||
void UHarmonyLinkGraphics::SetAutomaticSwitching(const bool bAutomaticSwitch)
|
||||
{
|
||||
_bAutomaticSwitch = bAutomaticSwitch;
|
||||
OnAutomaticSwitchChanged.Broadcast(_bAutomaticSwitch);
|
||||
}
|
||||
|
||||
bool UHarmonyLinkGraphics::GetAutomaticSwitching() const
|
||||
{
|
||||
return _bAutomaticSwitch;
|
||||
}
|
||||
|
||||
void UHarmonyLinkGraphics::DestroySettings()
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "HarmonyLinkGraphics.generated.h"
|
||||
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnProfileChanged, EProfile, Profile);
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnAutomaticSwitchChanged, bool, bAutomaticSwich);
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -25,6 +26,9 @@ public:
|
|||
|
||||
UPROPERTY(BlueprintAssignable)
|
||||
FOnProfileChanged OnProfileChanged;
|
||||
|
||||
UPROPERTY(BlueprintAssignable)
|
||||
FOnAutomaticSwitchChanged OnAutomaticSwitchChanged;
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category="HarmonyLink Settings")
|
||||
void LoadConfig(const bool bForceReload = false);
|
||||
|
@ -51,6 +55,9 @@ public:
|
|||
UFUNCTION(BlueprintCallable, Category="HarmonyLink Settings")
|
||||
void SetAutomaticSwitching(const bool bAutomaticSwitch);
|
||||
|
||||
UFUNCTION(BlueprintCallable, BlueprintPure, Category="HarmonyLink Settings")
|
||||
bool GetAutomaticSwitching() const;
|
||||
|
||||
static void DestroySettings();
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue