@@ -173,7 +173,11 @@ void FHotPatcherEditorModule::PluginButtonClicked(const FSHotPatcherContext& Con
173
173
174
174
if (!DockTab.IsValid ())
175
175
{
176
+ #if UE_VERSION_OLDER_THAN(5,4,0)
176
177
FGlobalTabmanager::Get ()->RegisterNomadTabSpawner (HotPatcherTabName, FOnSpawnTab::CreateLambda ([=](const class FSpawnTabArgs & InSpawnTabArgs)
178
+ #else
179
+ FGlobalTabmanager::Get ()->RegisterNomadTabSpawner (HotPatcherTabName, FOnSpawnTab::CreateLambda ([=, this ](const class FSpawnTabArgs & InSpawnTabArgs)
180
+ #endif
177
181
{
178
182
return SpawnHotPatcherTab (Context);
179
183
}))
@@ -195,7 +199,11 @@ void FHotPatcherEditorModule::AddMenuExtension(FMenuBuilder& Builder)
195
199
Builder.AddSubMenu (
196
200
FText::FromString (TEXT (" HotPatcher" )),
197
201
FText::FromString (TEXT (" HotPatcher" )),
202
+ #if UE_VERSION_OLDER_THAN(5,4,0)
198
203
FNewMenuDelegate::CreateLambda ([=](FMenuBuilder& Menu)
204
+ #else
205
+ FNewMenuDelegate::CreateLambda ([=, this ](FMenuBuilder& Menu)
206
+ #endif
199
207
{
200
208
Menu.AddWidget (this ->HandlePickingModeContextMenu (),FText::FromString (TEXT (" " )),true );
201
209
}),
@@ -240,7 +248,11 @@ TSharedRef<SWidget> FHotPatcherEditorModule::HandlePickingModeContextMenu()
240
248
FText::FromString (TEXT (" MAIN" )),
241
249
FText::FromString (TEXT (" MAIN" )),
242
250
HotPatcherIcon,
251
+ #if UE_VERSION_OLDER_THAN(5,4,0)
243
252
FUIAction (FExecuteAction::CreateLambda ([=]()
253
+ #else
254
+ FUIAction (FExecuteAction::CreateLambda ([=, this ]()
255
+ #endif
244
256
{
245
257
this ->PluginButtonClicked (Context);
246
258
})));
@@ -272,7 +284,11 @@ TSharedRef<SWidget> FHotPatcherEditorModule::HandlePickingModeContextMenu()
272
284
FText::FromString (ActionName),
273
285
FText::FromString (ActionName),
274
286
FSlateIcon (),
287
+ #if UE_VERSION_OLDER_THAN(5,4,0)
275
288
FUIAction (FExecuteAction::CreateLambda ([=]()
289
+ #else
290
+ FUIAction (FExecuteAction::CreateLambda ([=, this ]()
291
+ #endif
276
292
{
277
293
this ->PluginButtonClicked (Context);
278
294
}))
@@ -437,7 +453,11 @@ void FHotPatcherEditorModule::MakeCookAndPakActionsSubMenu(UToolMenu* Menu)
437
453
FToolMenuEntry& PlatformEntry = Section.AddSubMenu (FName (*PlatformName),
438
454
FText::Format (LOCTEXT (" Platform" , " {0}" ), UKismetTextLibrary::Conv_StringToText (THotPatcherTemplateHelper::GetEnumNameByValue (Platform))),
439
455
FText (),
456
+ #if UE_VERSION_OLDER_THAN(5,4,0)
440
457
FNewMenuDelegate::CreateLambda ([=](FMenuBuilder& SubMenuBuilder){
458
+ #else
459
+ FNewMenuDelegate::CreateLambda ([=, this ](FMenuBuilder& SubMenuBuilder){
460
+ #endif
441
461
SubMenuBuilder.AddMenuEntry (
442
462
LOCTEXT (" AnalysisDependencies" , " AnalysisDependencies" ), FText (),
443
463
FSlateIcon (*StyleSetName,TEXT (" WorldBrowser.LevelsMenuBrush" )),
@@ -461,7 +481,11 @@ void FHotPatcherEditorModule::MakeHotPatcherPresetsActionsSubMenu(UToolMenu* Men
461
481
Section.AddSubMenu (FName (*PakConfig.VersionId ),
462
482
FText::Format (LOCTEXT (" PakExternal_VersionID" , " {0}" ), UKismetTextLibrary::Conv_StringToText (PakConfig.VersionId )),
463
483
FText (),
484
+ #if UE_VERSION_OLDER_THAN(5,4,0)
464
485
FNewMenuDelegate::CreateLambda ([=](FMenuBuilder& SubMenuBuilder)
486
+ #else
487
+ FNewMenuDelegate::CreateLambda ([=, this ](FMenuBuilder& SubMenuBuilder)
488
+ #endif
465
489
{
466
490
for (ETargetPlatform Platform : GetAllowCookPlatforms ())
467
491
{
0 commit comments