About how to add images or binding in rich text in the UE environment.
Hello!
I have read the tutorial on RichText and the localization example in UE. I found that I couldn't use BBCode in UE, and I'm not sure what standard is used for rich text in UE. Also, I'm not sure how to add images or binding in RichText in UE. Here is the method I tried.
I have read the tutorial on RichText and the localization example in UE. I found that I couldn't use BBCode in UE, and I'm not sure what standard is used for rich text in UE. Also, I'm not sure how to add images or binding in RichText in UE. Here is the method I tried.
Code: Select all
<TextBlock >
<Run>test</Run>
<InlineUIContainer>
<Image Source="Resources/Images/Icon/test/gamepad_a.png" Stretch="None"/>
</InlineUIContainer>
<Run>Test</Run>
</TextBlock>
<!--it worked,But from a development perspective, this approach cannot be used.-->
<TextBlock noesis:RichText.Text="{noesis:LocTable 'test',Key=DescLabel}" Margin="0,150"/>
<!--it worked-->
<TextBlock noesis:RichText.Text="{Binding TestImage}" Margin="0,250"/>
<!--it didn't worked-->
<Label Content="{noesis:LocTable 'test1' ,Key=DescLabel}" Margin="0,350" />
<!--it didn't worked,so i can't use Label in UE?-->
<TextBlock noesis:RichText.Text="There are [i]many[/i] ways to implement localization in [style=ColoredText]NoesisGUI[/style]." Margin="0,450"/>
<!--it didn't worked-->
<TextBlock noesis:RichText.Text="{Binding TestText}" Margin="0,550"/>
<!--it worked-->
<TextBlock noesis:RichText.Text="[Image]/Resources/Images/Icon/test/gamepad_a.png[/Image]" Margin="0,650"/>
<!--it didn't worked,it just prints out the path.-->
<TextBlock noesis:RichText.Text="{Binding TestBinding}" Margin="0,750"/>
<!--it didn't worked,it just prints out the path.-->
Code: Select all
TestText = "There are <ItalicText>many</> ways to implement localization in <ColoredText>Noesis</>. In this example we are using our <ColoredItalicText>LocTable</> markup extension to integrate with Unreal localization system where we defined localized texts for each label. Each time the language is changed, the displayed text is updated accordingly. The <ColoredItalicText>RichText</> attached property for <ItalicText>TextBlocks</> allows you to use Unreal styles and images in your text.";
TestImage = "<img>/Resources/Images/Icon/test/gamepad_a.png</>";
TestBinding = "<bind>TestBinding_</>";
TestBinding_ = "test";
Who is online
Users browsing this forum: Ahrefs [Bot], Semrush [Bot] and 2 guests