View Issue Details

IDProjectCategoryView StatusLast Update
0002714NoesisGUIUnrealpublic2023-10-04 22:56
Reporterpaula.flamingfowl Assigned To 
Status newResolutionopen 
Product Version3.2 
Summary0002714: Inline font icons ignore the Enabled and IsHitTestable properties from parent text box
DescriptionWe're using a TextBox which RichText.Text property is binded to a property that could contain inline tags. We created a tag that changes the FontFamily to use a font icon.
The icons are being rendered correctly, but we realized that if we remove the interaction by setting the IsEnabled to false, the drawn icon still detects the interaction.

For example (see the video), we have some world icons (using a TextBox with a font icon) that we want to remove their interaction since hovering or clicking them doesn't nothing (and there are objects behind them, the wall, that we want to interact). We set the IsHitTestVisible and IsEnabled propeties to false. However, when we try to interact with the object behind the icon, we can't since the icon is detecting the interaction.

This is how we are setting the text to print the icon:
 <Viewbox IsHitTestVisible="False" IsEnabled="False">
          <TextBlock noesis:RichText.Text="{Binding Text}" Foreground="{TemplateBinding Foreground}"/>

THen, this is an inline tag with a font icon we created:
    <Style x:Key="FontMapIcon" TargetType="{x:Type Inline}">
        <Setter Property="FontFamily" Value="{DynamicResource Font.Family.Map.Icon}"/>

And the binded Text could be something like <FontMapIcon>A</>

We investigated this a bit and we found that changing the IsEnabled property in the newly created Run component (the ParseText method in RichText.cpp) fixes the problem (see attached image).
Steps To ReproduceCreate a font icon with iconmoon.

Import the font into blend and create an inline tag. Something like this:
  <Style x:Key="FontMapIcon" TargetType="{x:Type Inline}">
        <Setter Property="FontFamily" Value="{DynamicResource Font.Family.Map.Icon}"/>

Create a TextBox and bind the RichText.Text property to a text with the font tag: <FontMapIcon>A</>. Set IsEnabled to false

Create a component behind that TextBox which color changes when it's hovered

Import into unreal. See that the object behind is not hovered when the cursor is on top of the TextBox icon




2023-10-04 22:56


image.png (46,534 bytes)   
image.png (46,534 bytes)   

Issue History

Date Modified Username Field Change
2023-10-04 22:56 paula.flamingfowl New Issue
2023-10-04 22:56 paula.flamingfowl Tag Attached: richtext
2023-10-04 22:56 paula.flamingfowl File Added: image.png
2023-10-04 22:56 paula.flamingfowl File Added: Nueva-pestaña (3).webm