mirror of
https://github.com/kevinporetti/UnrealImGui.git
synced 2025-01-18 08:20:32 +00:00
Removed old code moving data from depreciated SwitchInputModeKey to ToggleInput.
This commit is contained in:
parent
5b737e111e
commit
a18e2e8dfb
@ -53,32 +53,6 @@ void UImGuiSettings::PostInitProperties()
|
||||
{
|
||||
Super::PostInitProperties();
|
||||
|
||||
if (SwitchInputModeKey_DEPRECATED.Key.IsValid() && !ToggleInput.Key.IsValid())
|
||||
{
|
||||
const FString ConfigFileName = GetDefaultConfigFilename();
|
||||
|
||||
// Move value to the new property.
|
||||
ToggleInput = MoveTemp(SwitchInputModeKey_DEPRECATED);
|
||||
|
||||
// Remove from configuration file entry for obsolete property.
|
||||
if (FConfigFile* ConfigFile = GConfig->Find(ConfigFileName, false))
|
||||
{
|
||||
if (FConfigSection* Section = ConfigFile->Find(TEXT("/Script/ImGui.ImGuiSettings")))
|
||||
{
|
||||
if (Section->Remove(TEXT("SwitchInputModeKey")))
|
||||
{
|
||||
ConfigFile->Dirty = true;
|
||||
GConfig->Flush(false, ConfigFileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add to configuration file entry for new property.
|
||||
UpdateSinglePropertyInConfigFile(
|
||||
UImGuiSettings::StaticClass()->FindPropertyByName(GET_MEMBER_NAME_CHECKED(UImGuiSettings, ToggleInput)),
|
||||
ConfigFileName);
|
||||
}
|
||||
|
||||
if (IsTemplate())
|
||||
{
|
||||
DefaultInstance = this;
|
||||
|
@ -218,10 +218,6 @@ protected:
|
||||
UPROPERTY(EditAnywhere, config, Category = "DPI Scale", Meta = (ShowOnlyInnerProperties))
|
||||
FImGuiDPIScaleInfo DPIScale;
|
||||
|
||||
// Deprecated name for ToggleInput. Kept temporarily to automatically move old configuration.
|
||||
UPROPERTY(config)
|
||||
FImGuiKeyInfo SwitchInputModeKey_DEPRECATED;
|
||||
|
||||
static UImGuiSettings* DefaultInstance;
|
||||
|
||||
friend class FImGuiModuleSettings;
|
||||
|
Loading…
Reference in New Issue
Block a user