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)
|
void UHarmonyLinkGraphics::SetAutomaticSwitching(const bool bAutomaticSwitch)
|
||||||
{
|
{
|
||||||
_bAutomaticSwitch = bAutomaticSwitch;
|
_bAutomaticSwitch = bAutomaticSwitch;
|
||||||
|
OnAutomaticSwitchChanged.Broadcast(_bAutomaticSwitch);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool UHarmonyLinkGraphics::GetAutomaticSwitching() const
|
||||||
|
{
|
||||||
|
return _bAutomaticSwitch;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UHarmonyLinkGraphics::DestroySettings()
|
void UHarmonyLinkGraphics::DestroySettings()
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include "HarmonyLinkGraphics.generated.h"
|
#include "HarmonyLinkGraphics.generated.h"
|
||||||
|
|
||||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnProfileChanged, EProfile, Profile);
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnProfileChanged, EProfile, Profile);
|
||||||
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnAutomaticSwitchChanged, bool, bAutomaticSwich);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -26,6 +27,9 @@ public:
|
||||||
UPROPERTY(BlueprintAssignable)
|
UPROPERTY(BlueprintAssignable)
|
||||||
FOnProfileChanged OnProfileChanged;
|
FOnProfileChanged OnProfileChanged;
|
||||||
|
|
||||||
|
UPROPERTY(BlueprintAssignable)
|
||||||
|
FOnAutomaticSwitchChanged OnAutomaticSwitchChanged;
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, Category="HarmonyLink Settings")
|
UFUNCTION(BlueprintCallable, Category="HarmonyLink Settings")
|
||||||
void LoadConfig(const bool bForceReload = false);
|
void LoadConfig(const bool bForceReload = false);
|
||||||
|
|
||||||
|
@ -51,6 +55,9 @@ public:
|
||||||
UFUNCTION(BlueprintCallable, Category="HarmonyLink Settings")
|
UFUNCTION(BlueprintCallable, Category="HarmonyLink Settings")
|
||||||
void SetAutomaticSwitching(const bool bAutomaticSwitch);
|
void SetAutomaticSwitching(const bool bAutomaticSwitch);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, BlueprintPure, Category="HarmonyLink Settings")
|
||||||
|
bool GetAutomaticSwitching() const;
|
||||||
|
|
||||||
static void DestroySettings();
|
static void DestroySettings();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue