コード例 #1
0
void FWidgetDesignerApplicationMode::RegisterTabFactories(TSharedPtr<FTabManager> InTabManager)
{
	TSharedPtr<FWidgetBlueprintEditor> BP = GetBlueprintEditor();
	
	BP->RegisterToolbarTab(InTabManager.ToSharedRef());
	BP->PushTabFactories(TabFactories);
}
コード例 #2
0
ファイル: LiveEditor.cpp プロジェクト: Codermay/Unreal4
    static TSharedRef<FApplicationMode> OnModeCreated(const FName ModeName, TSharedRef<FApplicationMode> InMode)
    {
        if (ModeName == FBlueprintEditorApplicationModes::BlueprintComponentsMode)
        {
            //@TODO: Bit of a lie - push GetBlueprint up, or pass in editor!
            auto LieMode = StaticCastSharedRef<FComponentsEditorModeOverride>(InMode);

            UBlueprint* BP = LieMode->GetBlueprint();
            if(	BP )
            {
                FLiveEditorManager::Get().InjectNewBlueprintEditor( LieMode->GetBlueprintEditor() );
            }
        }

        return InMode;
    }
コード例 #3
0
void FWidgetGraphApplicationMode::PostActivateMode()
{
	FWidgetBlueprintApplicationMode::PostActivateMode();
	TSharedPtr<FWidgetBlueprintEditor> BP = GetBlueprintEditor();
	
	// Select associated widget variable in 'My Blueprint'.
	const TSet<FWidgetReference>& Selected = BP->GetSelectedWidgets();
	if (Selected.Num() == 1)
	{
		for (const FWidgetReference& WidgetRef : Selected)
		{
			if (WidgetRef.IsValid())
			{
				BP->SelectGraphActionItemByName(WidgetRef.GetPreview()->GetFName());
			}
		}
	}
}