• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ FText函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中FText函数的典型用法代码示例。如果您正苦于以下问题:C++ FText函数的具体用法?C++ FText怎么用?C++ FText使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: LOCTEXT

void FThumbnailSection::BuildSectionContextMenu(FMenuBuilder& MenuBuilder, const FGuid& ObjectBinding)
{
	MenuBuilder.BeginSection(NAME_None, LOCTEXT("ViewMenuText", "View"));
	{
		MenuBuilder.AddSubMenu(
			LOCTEXT("ThumbnailsMenu", "Thumbnails"),
			FText(),
			FNewMenuDelegate::CreateLambda([=](FMenuBuilder& InMenuBuilder){

				TSharedPtr<ISequencer> Sequencer = SequencerPtr.Pin();

				FText CurrentTime = FText::FromString(Sequencer->GetZeroPadNumericTypeInterface()->ToString(Sequencer->GetGlobalTime()));

				InMenuBuilder.BeginSection(NAME_None, LOCTEXT("ThisSectionText", "This Section"));
				{
					InMenuBuilder.AddMenuEntry(
						LOCTEXT("RefreshText", "Refresh"),
						LOCTEXT("RefreshTooltip", "Refresh this section's thumbnails"),
						FSlateIcon(),
						FUIAction(FExecuteAction::CreateRaw(this, &FThumbnailSection::RedrawThumbnails))
					);
					InMenuBuilder.AddMenuEntry(
						FText::Format(LOCTEXT("SetSingleTime", "Set Thumbnail Time To {0}"), CurrentTime),
						LOCTEXT("SetSingleTimeTooltip", "Defines the time at which this section should draw its single thumbnail to the current cursor position"),
						FSlateIcon(),
						FUIAction(
							FExecuteAction::CreateLambda([=]{
								SetSingleTime(Sequencer->GetGlobalTime());
								GetMutableDefault<UMovieSceneUserThumbnailSettings>()->bDrawSingleThumbnails = true;
								GetMutableDefault<UMovieSceneUserThumbnailSettings>()->SaveConfig();
							})
						)
					);
				}
				InMenuBuilder.EndSection();

				InMenuBuilder.BeginSection(NAME_None, LOCTEXT("GlobalSettingsText", "Global Settings"));
				{
					InMenuBuilder.AddMenuEntry(
						LOCTEXT("RefreshAllText", "Refresh All"),
						LOCTEXT("RefreshAllTooltip", "Refresh all sections' thumbnails"),
						FSlateIcon(),
						FUIAction(FExecuteAction::CreateLambda([]{
							GetDefault<UMovieSceneUserThumbnailSettings>()->BroadcastRedrawThumbnails();
						}))
					);

					FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor");

					FDetailsViewArgs Args(false, false, false, FDetailsViewArgs::HideNameArea);
					TSharedRef<IDetailsView> DetailView = PropertyModule.CreateDetailView(Args);
					DetailView->SetObject(GetMutableDefault<UMovieSceneUserThumbnailSettings>());
					InMenuBuilder.AddWidget(DetailView, FText(), true);
				}
				InMenuBuilder.EndSection();
			})
		);
	}
	MenuBuilder.EndSection();
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:60,代码来源:ThumbnailSection.cpp


示例2: FText

void HLODOutliner::FLODActorItem::GenerateContextMenu(FMenuBuilder& MenuBuilder, SHLODOutliner& Outliner)
{
	auto SharedOutliner = StaticCastSharedRef<SHLODOutliner>(Outliner.AsShared());

	MenuBuilder.AddMenuEntry(LOCTEXT("SelectLODActor", "Select LOD Actor"), FText(), FSlateIcon(), FUIAction(FExecuteAction::CreateSP(&Outliner, &SHLODOutliner::SelectLODActor, AsShared())));

	MenuBuilder.AddMenuEntry(LOCTEXT("SelectContainedActors", "Select Contained Actors"), FText(), FSlateIcon(), FUIAction(FExecuteAction::CreateSP(&Outliner, &SHLODOutliner::SelectContainedActors, AsShared())));

	if (LODActor->IsDirty())
	{
		MenuBuilder.AddMenuEntry(LOCTEXT("BuildLODActorMesh", "Build LOD Mesh"), FText(), FSlateIcon(), FUIAction(FExecuteAction::CreateSP(&Outliner, &SHLODOutliner::BuildLODActor, AsShared())));
	}
	else
	{		
		MenuBuilder.AddMenuEntry(LOCTEXT("ForceView", "ForceView"), FText(), FSlateIcon(), FUIAction(FExecuteAction::CreateSP(&Outliner, &SHLODOutliner::ForceViewLODActor, AsShared())));
	}

	AActor* Actor = LODActor.Get();
	ALODActor* ParentActor = HierarchicalLODUtils::GetParentLODActor(Actor);
	if (ParentActor && Parent.Pin()->GetTreeItemType() == TreeItemType::HierarchicalLODActor)
	{		
		MenuBuilder.AddMenuEntry(LOCTEXT("RemoveChildFromCluster", "Remove from cluster"), FText(), FSlateIcon(), FUIAction(FExecuteAction::CreateSP(&Outliner, &SHLODOutliner::RemoveLODActorFromCluster, AsShared())));
	}
	else
	{
		MenuBuilder.AddMenuEntry(LOCTEXT("DeleteCluster", "Delete Cluster"), FText(), FSlateIcon(), FUIAction(FExecuteAction::CreateSP(&Outliner, &SHLODOutliner::DeleteCluster, AsShared())));
	}
}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:28,代码来源:LODActorItem.cpp


示例3: GetTrafficLightAsText

static FText GetTrafficLightAsText(ETrafficLightState State)
{
  switch (State) {
    case ETrafficLightState::Green:  return FText(LOCTEXT("GreenTrafficLight",   "Green"));
    case ETrafficLightState::Yellow: return FText(LOCTEXT("YellowTrafficLight",  "Yellow"));
    case ETrafficLightState::Red:    return FText(LOCTEXT("RedTrafficLight",     "Red"));
    default:                         return FText(LOCTEXT("InvalidTrafficLight", "INVALID"));
  }
}
开发者ID:cyy1991,项目名称:carla,代码行数:9,代码来源:CarlaHUD.cpp


示例4: FText

END_SLATE_FUNCTION_BUILD_OPTIMIZATION

FText SBlendProfilePicker::GetSelectedProfileName() const
{
	if(SelectedProfile)
	{
		return FText::Format(FText(LOCTEXT("SelectedNameEntry", "{0}")), FText::FromString(SelectedProfile->GetName()));
	}
	return FText(LOCTEXT("NoSelectionEntry", "None"));
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:10,代码来源:SBlendProfilePicker.cpp


示例5: WorldSettingsIcon

void FWorldTreeItem::GenerateContextMenu(FMenuBuilder& MenuBuilder, SSceneOutliner& Outliner)
{
	auto SharedOutliner = StaticCastSharedRef<SSceneOutliner>(Outliner.AsShared());
	
	const FSlateIcon WorldSettingsIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.WorldProperties.Tab");
	const FSlateIcon NewFolderIcon(FEditorStyle::GetStyleSetName(), "SceneOutliner.NewFolderIcon");

	MenuBuilder.AddMenuEntry(LOCTEXT("CreateFolder", "Create Folder"), FText(), NewFolderIcon, FUIAction(FExecuteAction::CreateSP(this, &FWorldTreeItem::CreateFolder, TWeakPtr<SSceneOutliner>(SharedOutliner))));
	MenuBuilder.AddMenuEntry(LOCTEXT("OpenWorldSettings", "World Settings"), FText(), WorldSettingsIcon, FExecuteAction::CreateSP(this, &FWorldTreeItem::OpenWorldSettings));
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:10,代码来源:WorldTreeItem.cpp


示例6: if

FText FBehaviorTreeDebugger::FindValueForKey(const FName& InKeyName, bool bUseCurrentState) const
{
#if USE_BEHAVIORTREE_DEBUGGER
	if (IsDebuggerRunning() &&
		TreeInstance.IsValid())
	{
		const TMap<FName, FString>* MapToQuery = nullptr;
		if(bUseCurrentState)
		{
			MapToQuery = &CurrentValues;
		}
		else if(TreeInstance->DebuggerSteps.IsValidIndex(ActiveStepIndex))
		{
			MapToQuery = &TreeInstance->DebuggerSteps[ActiveStepIndex].BlackboardValues;
		}

		if(MapToQuery != nullptr)
		{
			const FString* FindValue = MapToQuery->Find(InKeyName);
			if(FindValue != nullptr)
			{
				return FText::FromString(*FindValue);
			}	
		}
	}

	return FText();
#endif
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:29,代码来源:BehaviorTreeDebugger.cpp


示例7: SNew

TSharedRef<ITableRow> SLargeAssetTypeTreeWidget::TreeView_OnGenerateRow(
	FLargeAssetTypeTreeItemPtr Item, const TSharedRef<STableViewBase>& OwnerTable
)
{
	return 
		SNew(STableRow<FLargeAssetTypeTreeItemPtr>, OwnerTable)
		[
			SNew(SHorizontalBox)
			+ SHorizontalBox::Slot()
			.AutoWidth()
			[
				SNew(SCheckBox)
				.IsChecked(
					this, &SLargeAssetTypeTreeWidget::TreeView_IsChecked,
					FLargeAssetTypeTreeItemWeakPtr(Item)
				)
				.OnCheckStateChanged(
					this, &SLargeAssetTypeTreeWidget::TreeView_OnCheckStateChanged,
					FLargeAssetTypeTreeItemWeakPtr(Item)
				)
			]
			+ SHorizontalBox::Slot()
			[
				SNew(STextBlock)
				.Text(Item->Title)
				.ToolTipText(
					!Item->AssetTypeClassName.IsEmpty() ?
						FText::Format(LOCTEXT("SLargeAssetTypeTreeWidget_ToolTip", "Class: {0}"), 
							FText::FromString(Item->AssetTypeClassName)
						) : FText()
				)
			]
		];
}
开发者ID:barold,项目名称:ue4-hg-plugin,代码行数:34,代码来源:SLargeAssetTypeTreeWidget.cpp


示例8: LOCTEXT

FText SSessionLauncherCookPage::HandleCookModeComboButtonContentText( ) const
{
	ILauncherProfilePtr SelectedProfile = Model->GetSelectedProfile();

	if (SelectedProfile.IsValid())
	{
		ELauncherProfileCookModes::Type CookMode = SelectedProfile->GetCookMode();

		if (CookMode == ELauncherProfileCookModes::ByTheBook)
		{
			return LOCTEXT("CookModeComboButton_ByTheBook", "By the book");
		}

		if (CookMode == ELauncherProfileCookModes::DoNotCook)
		{
			return LOCTEXT("CookModeComboButton_DoNotCook", "Do not cook");
		}

		if (CookMode == ELauncherProfileCookModes::OnTheFly)
		{
			return LOCTEXT("CookModeComboButton_OnTheFly", "On the fly");
		}

		return LOCTEXT("CookModeComboButtonDefaultText", "Select...");
	}

	return FText();
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:28,代码来源:SSessionLauncherCookPage.cpp


示例9: switch

FText FGitSourceControlState::GetDisplayTooltip() const
{
	switch(WorkingCopyState) //-V719
	{
	case EWorkingCopyState::Unknown:
		return LOCTEXT("Unknown_Tooltip", "Unknown source control state");
	case EWorkingCopyState::Unchanged:
		return LOCTEXT("Pristine_Tooltip", "There are no modifications");
	case EWorkingCopyState::Added:
		return LOCTEXT("Added_Tooltip", "Item is scheduled for addition");
	case EWorkingCopyState::Deleted:
		return LOCTEXT("Deleted_Tooltip", "Item is scheduled for deletion");
	case EWorkingCopyState::Modified:
		return LOCTEXT("Modified_Tooltip", "Item has been modified");
	case EWorkingCopyState::Conflicted:
		return LOCTEXT("ContentsConflict_Tooltip", "The contents (as opposed to the properties) of the item conflict with updates received from the repository.");
	case EWorkingCopyState::Ignored:
		return LOCTEXT("Ignored_Tooltip", "Item is being ignored.");
	case EWorkingCopyState::Merged:
		return LOCTEXT("Merged_Tooltip", "Item has been merged.");
	case EWorkingCopyState::NotControlled:
		return LOCTEXT("NotControlled_Tooltip", "Item is not under version control.");
	case EWorkingCopyState::Missing:
		return LOCTEXT("Missing_Tooltip", "Item is missing (e.g., you moved or deleted it without using Git). This also indicates that a directory is incomplete (a checkout or update was interrupted).");
	}

	return FText();
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:28,代码来源:GitSourceControlState.cpp


示例10: GetProductionCost

FText UFlareFactory::GetFactoryCycleCost(const FFlareProductionData* Data)
{
	FText ProductionCostText;
	FText CommaTextReference = UFlareGameTools::AddLeadingSpace(LOCTEXT("Comma", "+"));

	// Cycle cost in credits
	uint32 CycleProductionCost = GetProductionCost(Data);
	if (CycleProductionCost > 0)
	{
		ProductionCostText = FText::Format(LOCTEXT("ProductionCostFormat", "{0} credits"), FText::AsNumber(UFlareGameTools::DisplayMoney(CycleProductionCost)));
	}

	// Cycle cost in resources
	for (int ResourceIndex = 0; ResourceIndex < Data->InputResources.Num(); ResourceIndex++)
	{
		FText CommaText = ProductionCostText.IsEmpty() ? FText() : CommaTextReference;
		const FFlareFactoryResource* FactoryResource = &Data->InputResources[ResourceIndex];
		FCHECK(FactoryResource);

		ProductionCostText = FText::Format(LOCTEXT("ProductionResourcesFormat", "{0}{1} {2} {3}"),
			ProductionCostText, CommaText, FText::AsNumber(FactoryResource->Quantity), FactoryResource->Resource->Data.Acronym);
	}

	return ProductionCostText;
}
开发者ID:niavok,项目名称:HeliumRain,代码行数:25,代码来源:FlareFactory.cpp


示例11: LOCTEXT

FText FWindowsErrorReport::DiagnoseReport() const
{
	// Mark the callstack as invalid.
	bValidCallstack = false;

	// Should check if there are local PDBs before doing anything
	auto CrashDebugHelper = CrashHelperModule ? CrashHelperModule->Get() : nullptr;
	if (!CrashDebugHelper)
	{
		// Not localized: should never be seen
		return FText::FromString(TEXT("Failed to load CrashDebugHelper."));
	}

	FString DumpFilename;
	if (!FindFirstReportFileWithExtension(DumpFilename, TEXT(".dmp")))
	{
		if (!FindFirstReportFileWithExtension(DumpFilename, TEXT(".mdmp")))
		{
			return LOCTEXT("MinidumpNotFound", "No minidump found for this crash.");
		}
	}

	if (!CrashDebugHelper->CreateMinidumpDiagnosticReport(ReportDirectory / DumpFilename))
	{
		return LOCTEXT("NoDebuggingSymbols", "You do not have any debugging symbols required to display the callstack for this crash.");
	}

	// No longer required, only for backward compatibility, mark the callstack as valid.
	bValidCallstack = true;
	return FText();
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:31,代码来源:WindowsErrorReport.cpp


示例12: checkf

FText FTextFormatter::Format(FTextFormat&& InFmt, FFormatOrderedArguments&& InArguments, const bool bInRebuildText, const bool bInRebuildAsSource)
{
	checkf(FInternationalization::Get().IsInitialized() == true, TEXT("FInternationalization is not initialized. An FText formatting method was likely used in static object initialization - this is not supported."));

	int32 EstimatedArgumentValuesLength = 0;
	for (const auto& Arg : InArguments)
	{
		EstimatedArgumentValuesLength += EstimateArgumentValueLength(Arg);
	}

	const FString& FmtPattern = InFmt.GetSourceString();
	auto GetArgumentValue = [&InArguments, &FmtPattern](const TextFormatTokens::FArgumentTokenSpecifier& ArgumentToken, int32 ArgumentNumber) -> const FFormatArgumentValue*
	{
		int32 ArgumentIndex = ArgumentToken.ArgumentIndex;
		if (ArgumentIndex == INDEX_NONE)
		{
			// We failed to parse the argument name into a number...
			// We have existing code that is incorrectly using names in the format string when providing ordered arguments
			// ICU used to fallback to treating the index of the argument within the string as if it were the index specified 
			// by the argument name, so we need to emulate that behavior to avoid breaking some format operations
			UE_LOG(LogTextFormatter, Warning, TEXT("Failed to parse argument \"%s\" as a number (using \"%d\" as a fallback). Please check your format string for errors: \"%s\"."), *FString(ArgumentToken.ArgumentNameLen, ArgumentToken.ArgumentNameStartPos), ArgumentNumber, *FmtPattern);
			ArgumentIndex = ArgumentNumber;
		}
		return InArguments.IsValidIndex(ArgumentIndex) ? &(InArguments[ArgumentIndex]) : nullptr;
	};

	FString ResultString = Format(InFmt, FPrivateTextFormatArguments(FPrivateTextFormatArguments::FGetArgumentValue(GetArgumentValue), EstimatedArgumentValuesLength, bInRebuildText, bInRebuildAsSource));

	FText Result = FText(MakeShareable(new TGeneratedTextData<FTextHistory_OrderedFormat>(MoveTemp(ResultString), FTextHistory_OrderedFormat(MoveTemp(InFmt), MoveTemp(InArguments)))));
	if (!GIsEditor)
	{
		Result.Flags |= ETextFlag::Transient;
	}
	return Result;
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:35,代码来源:TextFormatter.cpp


示例13: LOCTEXT

//@todo this is deprecated and shouldn't be used anymore [6/4/2014 justin.sargent]
FText FBuildPatchInstaller::GetDownloadSpeedText()
{
    static const FText DownloadSpeedFormat = LOCTEXT("BuildPatchInstaller_DownloadSpeedFormat", "{Current} / {Total} ({Speed}/sec)");

    FScopeLock Lock(&ThreadLock);
    FText SpeedDisplayedText;
    if (DownloadSpeedValue >= 0)
    {
        FNumberFormattingOptions SpeedFormattingOptions;
        SpeedFormattingOptions.MaximumFractionalDigits = 1;
        SpeedFormattingOptions.MinimumFractionalDigits = 0;

        FNumberFormattingOptions SizeFormattingOptions;
        SizeFormattingOptions.MaximumFractionalDigits = 1;
        SizeFormattingOptions.MinimumFractionalDigits = 1;

        FFormatNamedArguments Args;
        Args.Add(TEXT("Speed"), FText::AsMemory(DownloadSpeedValue, &SpeedFormattingOptions));
        Args.Add(TEXT("Total"), FText::AsMemory(TotalInitialDownloadSize, &SizeFormattingOptions));
        Args.Add(TEXT("Current"), FText::AsMemory(TotalInitialDownloadSize - DownloadBytesLeft, &SizeFormattingOptions));
        return FText::Format(DownloadSpeedFormat, Args);
    }

    return FText();
}
开发者ID:Art1stical,项目名称:AHRUnrealEngine,代码行数:26,代码来源:BuildPatchInstaller.cpp


示例14: ConstructReportWidget

TSharedRef<SWidget> FReportWidgetGenerator::GetWidget()
{
    auto progress = Generator->GetProgress();

    if (progress == FAsyncReportGenerator::EProgress::COMPILATION_COMPLETE)
    {
        if (!CachedReportWidget.IsValid())
        {
            // Make the widget once then cache it
            CachedReportWidget = ConstructReportWidget(Generator.Get());
        }

        return CachedReportWidget.ToSharedRef();
    }
    else
    {
        // Set the throbber text depending on how far through compilation we are
        if (progress == FAsyncReportGenerator::EProgress::CROSS_COMPILATION_IN_PROGRESS)
        {
            ThrobberTextLine1->SetText(FText::FromString(TEXT("Compiling HLSL to GLSL")));
            ThrobberTextLine2->SetText(FText());
        }
        else
        {
            check(progress == FAsyncReportGenerator::EProgress::MALIOC_COMPILATION_IN_PROGRESS);

            const auto oscProgress = Generator->GetMaliOCCompilationProgress();
            ThrobberTextLine1->SetText(FText::FromString(TEXT("Compiling Shaders")));
            ThrobberTextLine2->SetText(FText::FromString(FString::Printf(TEXT("%u / %u"), oscProgress.NumCompiledShaders, oscProgress.NumTotalShaders)));
        }

        return ThrobberWidget.ToSharedRef();
    }
}
开发者ID:ARM-software,项目名称:malioc-ue4,代码行数:34,代码来源:MaliOCReportWidgetGenerator.cpp


示例15: switch

FText FFlareTransactionLogEntry::GetCategoryDescription(EFlareTransactionLogEntry::Type Type)
{
	switch (Type)
	{		
	case EFlareTransactionLogEntry::ManualResourcePurchase:     return LOCTEXT("CategoryManualResourcePurchase",     "Resources purchases");        break;
	case EFlareTransactionLogEntry::ManualResourceSell:         return LOCTEXT("CategoryManualResourceSell",         "Resources sales");            break;
	case EFlareTransactionLogEntry::TradeRouteResourcePurchase: return LOCTEXT("CategoryTradeRouteResourcePurchase", "Trade route purchases");      break;
	case EFlareTransactionLogEntry::TradeRouteResourceSell:     return LOCTEXT("CategoryTradeRouteResourceSell",     "Trade route sales");          break;
	case EFlareTransactionLogEntry::FactoryWages:               return LOCTEXT("CategoryFactoryWages",               "Factory wages");              break;
	case EFlareTransactionLogEntry::CancelFactoryWages:         return LOCTEXT("CategoryCancelFactoryWages",         "Factory wages cancelled");    break;
	case EFlareTransactionLogEntry::StationConstructionFees:    return LOCTEXT("CategoryStationConstructionFees",    "Station construction");       break;
	case EFlareTransactionLogEntry::StationUpgradeFees:         return LOCTEXT("CategoryStationUpgradeFees",         "Station upgrades");           break;
	case EFlareTransactionLogEntry::CancelStationUpgradeFees:   return LOCTEXT("CategoryCancelStationUpgradeFees",   "Station upgrades refunds");   break;
	case EFlareTransactionLogEntry::UpgradeShipPart:            return LOCTEXT("CategoryUpgradeShipPart",            "Ship upgrades");              break;
	case EFlareTransactionLogEntry::OrderShip:                  return LOCTEXT("CategoryOrderShip",                  "Ship construction");          break;
	case EFlareTransactionLogEntry::CancelOrderShip:            return LOCTEXT("CategoryCancelOrderShip",            "Ship construction refunds");  break;
	case EFlareTransactionLogEntry::OrderShipAdvance:           return LOCTEXT("CategoryOrderShipAdvance",           "Ship construction advances"); break;
	case EFlareTransactionLogEntry::PeoplePurchase:             return LOCTEXT("CategoryPeoplePurchase",             "Population purchases");       break;
	case EFlareTransactionLogEntry::InitialMoney:               return LOCTEXT("CategoryInitialMoney",               "Initial capital");            break;
	case EFlareTransactionLogEntry::PayRepair:                  return LOCTEXT("CategoryPayRepair",                  "Ship repairs");               break;
	case EFlareTransactionLogEntry::PayRefill:                  return LOCTEXT("CategoryPayRefill",                  "Ship refilling");             break;
	case EFlareTransactionLogEntry::PaidForRepair:              return LOCTEXT("CategoryPaidForRepair",              "Ship repair services");       break;
	case EFlareTransactionLogEntry::PaidForRefill:              return LOCTEXT("CategoryPaidForRefill",              "Ship refilling services");    break;
	case EFlareTransactionLogEntry::SendTribute:                return LOCTEXT("CategorySendTribute",                "Tributes paid");              break;
	case EFlareTransactionLogEntry::ReceiveTribute:             return LOCTEXT("CategoryReceiveTribute",             "Tributes received");          break;
	case EFlareTransactionLogEntry::RecoveryFees:               return LOCTEXT("CategoryRecoveryFees",               "Ship recovery");              break;
	case EFlareTransactionLogEntry::ScrapGain:                  return LOCTEXT("CategoryScrapGain",                  "Ship scrapping");             break;
	case EFlareTransactionLogEntry::Cheat:                      return LOCTEXT("CategoryCheat",                      "Unlawful transactions");      break;
	case EFlareTransactionLogEntry::QuestReward:                return LOCTEXT("CategoryQuestReward",                "Contracts");                  break;
	case EFlareTransactionLogEntry::MutualAssistance:           return LOCTEXT("CategoryMutualAssistance",           "Mutual assistance");          break;
	case EFlareTransactionLogEntry::ScrapCost:                  return LOCTEXT("CategoryScrapCost",                  "Ship scrapping costs");       break;
	}

	return FText();
}
开发者ID:niavok,项目名称:HeliumRain,代码行数:35,代码来源:FlareGameTypes.cpp


示例16: switch

FText FTextHistory_AsCurrency::ToText(bool bInAsSource) const
{
	TSharedPtr< FCulture, ESPMode::ThreadSafe > CurrentCulture = bInAsSource? FInternationalization::Get().GetInvariantCulture() : TargetCulture;

	switch(SourceValue.Type)
	{
	case EFormatArgumentType::UInt:
		{
			return FText::AsCurrency(SourceValue.UIntValue, CurrencyCode, FormatOptions, CurrentCulture);
		}
	case EFormatArgumentType::Int:
		{
			return FText::AsCurrency(SourceValue.IntValue, CurrencyCode, FormatOptions, CurrentCulture);
		}
	case EFormatArgumentType::Float:
		{
			return FText::AsCurrency(SourceValue.FloatValue, CurrencyCode, FormatOptions, CurrentCulture);
		}
	case EFormatArgumentType::Double:
		{
			return FText::AsCurrency(SourceValue.DoubleValue, CurrencyCode, FormatOptions, CurrentCulture);
		}
	default:
		{
			// Should never reach this point
			check(0);
		}
	}
	return FText();
}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:30,代码来源:TextHistory.cpp


示例17: GetGearAsText

static FText GetGearAsText(int32 Gear)
{
  if (Gear < 0) {
    return FText(LOCTEXT("ReverseGear", "R"));
  } else {
    return (Gear == 0 ? LOCTEXT("NeutralGear", "N") : FText::AsNumber(Gear));
  }
}
开发者ID:cyy1991,项目名称:carla,代码行数:8,代码来源:CarlaHUD.cpp


示例18: FText

FText FActorInfoColumn::GetSelectedMode() const
{
	if (CurrentMode == ECustomColumnMode::None)
	{
		return FText();
	}

	return MakeComboText(CurrentMode);
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:9,代码来源:SceneOutlinerActorInfoColumn.cpp


示例19: SNew

void UEnvironmentQueryGraphNode_Option::CreateAddTestSubMenu(class FMenuBuilder& MenuBuilder, UEdGraph* Graph) const
{
	TSharedRef<SGraphEditorActionMenuAI> Menu =	
		SNew(SGraphEditorActionMenuAI)
		.GraphObj( Graph )
		.GraphNode((UEnvironmentQueryGraphNode_Option*)this)
		.AutoExpandActionMenu(true);

	MenuBuilder.AddWidget(Menu,FText(),true);
}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:10,代码来源:EnvironmentQueryGraphNode_Option.cpp


示例20: MenuBuilder

TSharedRef<SWidget> FSequencerTimeSliderController::OpenSetPlaybackRangeMenu(float MouseTime)
{
	const bool bShouldCloseWindowAfterMenuSelection = true;
	FMenuBuilder MenuBuilder(bShouldCloseWindowAfterMenuSelection, nullptr);

	FText NumericText;
	if (SequencerSnapValues::IsTimeSnapIntervalFrameRate(TimeSliderArgs.Settings->GetTimeSnapInterval()) && TimeSliderArgs.Settings->GetShowFrameNumbers())
	{
		NumericText = FText::Format(LOCTEXT("FrameTextFormat", "Playback Range (at frame {0}):"), FText::AsNumber(TimeToFrame(MouseTime)));
	}
	else
	{
		NumericText = FText::Format(LOCTEXT("TimeTextFormat", "Playback Range (at {0}s):"), FText::AsNumber(MouseTime));
	}

	TRange<float> PlaybackRange = TimeSliderArgs.PlaybackRange.Get();

	MenuBuilder.BeginSection("SequencerPlaybackRangeMenu", NumericText);
	{
		MenuBuilder.AddMenuEntry(
			FText::Format(LOCTEXT("SetPlaybackStart", "Set Start Time"), NumericText),
			FText(),
			FSlateIcon(),
			FUIAction(
				FExecuteAction::CreateLambda([=]{ return SetPlaybackRangeStart(MouseTime); }),
				FCanExecuteAction::CreateLambda([=]{ return MouseTime <= PlaybackRange.GetUpperBoundValue(); })
			)
		);

		MenuBuilder.AddMenuEntry(
			FText::Format(LOCTEXT("SetPlaybackEnd", "Set End Time"), NumericText),
			FText(),
			FSlateIcon(),
			FUIAction(
				FExecuteAction::CreateLambda([=]{ return SetPlaybackRangeEnd(MouseTime); }),
				FCanExecuteAction::CreateLambda([=]{ return MouseTime >= PlaybackRange.GetLowerBoundValue(); })
			)
		);
	}
	MenuBuilder.EndSection(); // SequencerPlaybackRangeMenu

	return MenuBuilder.MakeWidget();
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:43,代码来源:TimeSliderController.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ FTextureRHIRef函数代码示例发布时间:2022-05-30
下一篇:
C++ FT_ZERO函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap