2022-05-23 18:41:30 +00:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
#include "Widgets/GameSettingDetailExtension.h"
|
2022-09-13 07:18:28 +00:00
|
|
|
|
|
|
|
#include "Delegates/Delegate.h"
|
2022-05-23 18:41:30 +00:00
|
|
|
#include "GameSetting.h"
|
|
|
|
|
|
|
|
void UGameSettingDetailExtension::SetSetting(UGameSetting* InSetting)
|
|
|
|
{
|
|
|
|
NativeSettingAssigned(InSetting);
|
|
|
|
}
|
|
|
|
|
|
|
|
void UGameSettingDetailExtension::NativeSettingAssigned(UGameSetting* InSetting)
|
|
|
|
{
|
|
|
|
if (Setting)
|
|
|
|
{
|
|
|
|
Setting->OnSettingChangedEvent.RemoveAll(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
Setting = InSetting;
|
|
|
|
Setting->OnSettingChangedEvent.AddUObject(this, &ThisClass::NativeSettingValueChanged);
|
|
|
|
|
|
|
|
OnSettingAssigned(InSetting);
|
|
|
|
}
|
|
|
|
|
|
|
|
void UGameSettingDetailExtension::NativeSettingValueChanged(UGameSetting* InSetting, EGameSettingChangeReason Reason)
|
|
|
|
{
|
|
|
|
OnSettingValueChanged(InSetting);
|
|
|
|
}
|