Add automatic profile switching #1

Merged
Jordonbc merged 22 commits from Feature/GraphicsProfiles into Dev 2024-07-08 22:22:09 +01:00
2 changed files with 13 additions and 0 deletions
Showing only changes of commit 3f43bdb16b - Show all commits

View file

@ -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()

View file

@ -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: