You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Converted FUIAction to use ECheckBoxState when reporting its check state
There are now overloads to FUIAction that take a FGetActionCheckState delegate which is able to return any of the entries from ECheckBoxState. FIsActionChecked still exists for backwards compatibility, and converts the returned bool into a ECheckBoxState via a passthrough function. #codereview Matt.Kuhlenschmidt [CL 2570717 by Jamie Dale in Main branch]
This commit is contained in:
committed by
Jamie.Dale@epicgames.com
parent
1d51305305
commit
23592d149c
@@ -681,9 +681,11 @@ void SLevelViewportToolBar::GeneratePlacedCameraMenuEntries( FMenuBuilder& Build
|
||||
AActor* GenericActor = CameraActor;
|
||||
|
||||
FText ActorDisplayName = FText::FromString(CameraActor->GetActorLabel());
|
||||
FUIAction LookThroughCameraAction;
|
||||
LookThroughCameraAction.ExecuteAction.BindSP(Viewport.Pin().ToSharedRef(), &SLevelViewport::OnActorLockToggleFromMenu, GenericActor);
|
||||
LookThroughCameraAction.IsCheckedDelegate.BindSP(Viewport.Pin().ToSharedRef(), &SLevelViewport::IsActorLocked, TWeakObjectPtr<AActor>(GenericActor) );
|
||||
FUIAction LookThroughCameraAction(
|
||||
FExecuteAction::CreateSP(Viewport.Pin().ToSharedRef(), &SLevelViewport::OnActorLockToggleFromMenu, GenericActor),
|
||||
FCanExecuteAction(),
|
||||
FIsActionChecked::CreateSP(Viewport.Pin().ToSharedRef(), &SLevelViewport::IsActorLocked, TWeakObjectPtr<AActor>(GenericActor))
|
||||
);
|
||||
|
||||
Builder.AddMenuEntry( ActorDisplayName, FText::Format(LOCTEXT("LookThroughCameraActor_ToolTip", "Look through and pilot {0}"), ActorDisplayName), CameraIcon, LookThroughCameraAction, NAME_None, EUserInterfaceActionType::RadioButton );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user