Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Item for UMG in C++


     // Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
     #pragma once
     #include "TextBlock.generated.h"
      * A simple static text widget.
      * * No Children
      * * Text
     class UMG_API UTextBlock : public UTextLayoutWidget
          * Sets the color and opacity of the text in this text block
          * @param InColorAndOpacity        The new text color and opacity
         UFUNCTION(BlueprintCallable, Category="Appearance")
         void SetColorAndOpacity(FSlateColor InColorAndOpacity);
         * Sets the opacity of the text in this text block
         * @param InOpacity        The new text opacity
         UFUNCTION(BlueprintCallable, Category = "Appearance")
         void SetOpacity(float InOpacity);
          * Sets the color and opacity of the text drop shadow
          * Note: if opacity is zero no shadow will be drawn
          * @param InShadowColorAndOpacity        The new drop shadow color and opacity
         UFUNCTION(BlueprintCallable, Category="Appearance")
         void SetShadowColorAndOpacity(FLinearColor InShadowColorAndOpacity);
          * Sets the offset that the text drop shadow should be drawn at
          * @param InShadowOffset        The new offset
         UFUNCTION(BlueprintCallable, Category="Appearance")
         void SetShadowOffset(FVector2D InShadowOffset);
          * Dynamically set the font info for this text block
          * @param InFontInfo THe new font info
         UFUNCTION(BlueprintCallable, Category = "Appearance")
         void SetFont(FSlateFontInfo InFontInfo);
          *  Set the text justification for this text block
          *  @param Justification new justification
         UFUNCTION( BlueprintCallable, Category = "Appearance" )
         void SetJustification( ETextJustify::Type InJustification );
         /** The text to display */
         UPROPERTY(EditAnywhere, Category=Content, meta=( MultiLine="true" ))
         FText Text;
         /** A bindable delegate to allow logic to drive the text of the widget */
         FGetText TextDelegate;
         /** The color of the text */
         UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Appearance)
         FSlateColor ColorAndOpacity;
         /** A bindable delegate for the ColorAndOpacity. */
         FGetSlateColor ColorAndOpacityDelegate;
         /** The font to render the text with */
         UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Appearance)
         FSlateFontInfo Font;
         /** The direction the shadow is cast */
         UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Appearance)
         FVector2D ShadowOffset;
         /** The color of the shadow */
         UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Appearance, meta=( DisplayName="Shadow Color" ))
         FLinearColor ShadowColorAndOpacity;
         /** A bindable delegate for the ShadowColorAndOpacity. */
         FGetLinearColor ShadowColorAndOpacityDelegate;
         /** The minimum desired size for the text */
         UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Appearance)
         float MinDesiredWidth;
         /** If true, it will automatically wrap this text widget with an invalidation panel */
         UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Performance, AdvancedDisplay)
         bool bWrapWithInvalidationPanel;
         ///** Called when this text is double clicked */
         //SLATE_EVENT(FOnClicked, OnDoubleClicked)
          * Gets the widget text
          * @return The widget text
         UFUNCTION(BlueprintCallable, Category="Widget", meta=(DisplayName="GetText (Text)"))
         FText GetText() const;
          * Directly sets the widget text.
          * Warning: This will wipe any binding created for the Text property!
          * @param InText The text to assign to the widget
         UFUNCTION(BlueprintCallable, Category = "Widget", meta = (DisplayName = "SetText (Text)"))
             void SetText(FText InText);
             //~ Begin UWidget Interface
             virtual void SynchronizeProperties() override;
             //~ End UWidget Interface
             //~ Begin UVisual Interface
             virtual void ReleaseSlateResources(bool bReleaseChildren) override;
             //~ End UVisual Interface
     #if WITH_EDITOR
         //~ Begin UWidget Interface
         virtual const FText GetPaletteCategory() override;
         virtual void OnCreationFromPalette() override;
         //~ End UWidget Interface
         virtual FString GetLabelMetadata() const override;
         // Получить структуру таблицы.
         static ConstructorHelpers::FObjectFinder<UStructure>LS(TEXT("Localization'/Game/Structure.Localization'"));
         struct FLanguage = LS.Object;
         // Получить данные таблицы перед установкой значений. Get data table before assigning values.
         static ConstructorHelpers::FObjectFinder<UDataTable>LT(TEXT("Localization'/Game/Table.Localization'"));
         DataLookupTable = LT.Object;
         // Присвоение текста визуально.
         void HandleTextCommitted(const FText& InText,
         if (DataLookupTable) {
             // Колонка вывода.
             static const FString Column(TEXT("Language"));
             // Имя индекса.
             FName IndexName = FName(ETextCommit::Type CommitteType);
             // Возврат текста.
             return DataLookupTable->FindRow<FLanguage(IndexName, Column);
         }else{return ETextCommit::Type CommitteType;});
         //~ Begin UWidget Interface
         virtual TSharedRef<SWidget> RebuildWidget() override;
         virtual void OnBindingChanged(const FName& Property) override;
         //~ End UWidget Interface
         TSharedPtr<STextBlock> MyTextBlock;

Attempt to create a reference to a table element. Replaced the standard TextBlock to check, but when you edit the text in this element Desinger text is not taken by the index and columns of the table. Ideally, you would assign a text element table and grapch interference from entered values.

Product Version: UE 4.14
more ▼

asked Nov 26 '16 at 05:29 AM in C++ Programming

avatar image

16 2 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question