Files
UnrealEngineUWP/Engine/Source/Editor/VREditor/Private/VRModeSettings.cpp
christopher waters 27486505fc Moving loose files in VREditor into Private and Public.
#preflight 63fcd7e5437ce3e7f32c91e3

[CL 24428678 by christopher waters in ue5-main branch]
2023-02-27 14:05:38 -05:00

37 lines
1.4 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "VRModeSettings.h"
#include "Dialogs/Dialogs.h"
#include "UObject/UnrealType.h"
#include "HAL/IConsoleManager.h"
#define LOCTEXT_NAMESPACE "VREditor"
UVRModeSettings::UVRModeSettings()
: Super()
{
}
#if WITH_EDITOR
void UVRModeSettings::PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent)
{
Super::PostEditChangeProperty(PropertyChangedEvent);
if (PropertyChangedEvent.Property
&& PropertyChangedEvent.Property->GetFName() == GET_MEMBER_NAME_CHECKED(UVRModeSettings, bEnableAutoVREditMode)
&& bEnableAutoVREditMode == true)
{
FSuppressableWarningDialog::FSetupInfo SetupInfo(LOCTEXT("VRModeEntry_Message", "VR Mode enables you to work on your project in virtual reality using motion controllers. This feature is still under development, so you may experience bugs or crashes while using it."),
LOCTEXT("VRModeEntry_Title", "Entering VR Mode - Experimental"), "Warning_VRModeEntry", GEditorSettingsIni);
SetupInfo.ConfirmText = LOCTEXT("VRModeEntry_ConfirmText", "Continue");
SetupInfo.CancelText = LOCTEXT("VRModeEntry_CancelText", "Cancel");
SetupInfo.bDefaultToSuppressInTheFuture = true;
FSuppressableWarningDialog VRModeEntryWarning(SetupInfo);
bEnableAutoVREditMode = (VRModeEntryWarning.ShowModal() != FSuppressableWarningDialog::Cancel) ? true : false;
}
}
#endif
#undef LOCTEXT_NAMESPACE