本文整理汇总了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;
}
示例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();
}
}