当前位置: 首页>>代码示例>>C++>>正文


C++ TSharedRef::FocusDefaultWidget方法代码示例

本文整理汇总了C++中TSharedRef::FocusDefaultWidget方法的典型用法代码示例。如果您正苦于以下问题:C++ TSharedRef::FocusDefaultWidget方法的具体用法?C++ TSharedRef::FocusDefaultWidget怎么用?C++ TSharedRef::FocusDefaultWidget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TSharedRef的用法示例。


在下文中一共展示了TSharedRef::FocusDefaultWidget方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: PreCreateKeyframe

bool UMatineeTrackEventHelper::PreCreateKeyframe( UInterpTrack *Track, float KeyTime ) const
{
	KeyframeAddDataName = NAME_None;

	// Prompt user for name of new event.
	FEdModeInterpEdit* Mode = (FEdModeInterpEdit*)GEditorModeTools().GetActiveMode( FBuiltinEditorModes::EM_InterpEdit );
	check(Mode != NULL);
	check(Mode->InterpEd != NULL);
	TSharedRef<STextEntryPopup> TextEntryPopup = 
		SNew(STextEntryPopup)
		.Label(NSLOCTEXT("Matinee.Popups", "NewEventName", "New Event Name").ToString())
		.DefaultText(FText::FromString(TEXT("Event")))
		.OnTextCommitted_UObject(this, &UMatineeTrackEventHelper::OnAddKeyTextEntry, (IMatineeBase*)Mode->InterpEd, Track)
		.SelectAllTextWhenFocused(true)
		.ClearKeyboardFocusOnCommit(false)
		.MaxWidth(1024.0f)
		;

	TSharedPtr< SWindow > Parent = FSlateApplication::Get().GetActiveTopLevelWindow();
	if ( Parent.IsValid() )
	{
		EntryPopupWindow = FSlateApplication::Get().PushMenu(
			Parent.ToSharedRef(),
			TextEntryPopup,
			FSlateApplication::Get().GetCursorPos(),
			FPopupTransitionEffect(FPopupTransitionEffect::TypeInPopup)
			);
	}

	TextEntryPopup->FocusDefaultWidget();

	return false;
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:33,代码来源:MatineeTrackHelpers.cpp

示例2: GetUserSetStaticLightmapResolution

void FStaticMeshLightingInfoStatsPage::GetUserSetStaticLightmapResolution(TWeakPtr<IStatsViewer> InParentStatsViewer, bool bSwap) const
{
	if(InParentStatsViewer.IsValid())
	{
		int32 DefaultRes = 0;
		verify(GConfig->GetInt(TEXT("DevOptions.StaticLighting"), TEXT("DefaultStaticMeshLightingRes"), DefaultRes, GLightmassIni));

		TSharedRef<STextEntryPopup> TextEntry = 
			SNew(STextEntryPopup)
			.Label(LOCTEXT("StaticMeshLightingInfo_GetResolutionTitle", "Enter Lightmap Resolution"))
			.HintText(LOCTEXT("StaticMeshLightingInfo_GetResolutionToolTip", "Will round to power of two"))
			.DefaultText(FText::AsNumber(DefaultRes))
			.OnTextCommitted( FOnTextCommitted::CreateSP( this, &FStaticMeshLightingInfoStatsPage::OnResolutionCommitted, InParentStatsViewer, bSwap ) )
			.ClearKeyboardFocusOnCommit( false );

		ResolutionEntryPopupWindow = FSlateApplication::Get().PushMenu(
			InParentStatsViewer.Pin().ToSharedRef(),
			TextEntry,
			FSlateApplication::Get().GetCursorPos(),
			FPopupTransitionEffect( FPopupTransitionEffect::TypeInPopup )
			);

		TextEntry->FocusDefaultWidget();
	}
}
开发者ID:kidaa,项目名称:UnrealEngineVR,代码行数:25,代码来源:StaticMeshLightingInfoStatsPage.cpp


注:本文中的TSharedRef::FocusDefaultWidget方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。