Page 1 of 2

Passing input through opacity?

Posted: 13 Sep 2022, 20:39
by ZGholson
Hello!

I am currently running into an issue where we have a Noesis UI that is set to full screen but in reality only takes up 1/3 of the screen. The rest is just empty space. I have a UMG button on the viewport as well so that we can perform some test code when clicking on it. It appears that the Noesis UI is consuming the input when we attempt to click on the button. Are we implementing the Xaml incorrectly or is there way to not consume the input when clicking on a blank space of the UI?

Thank you

Re: Passing input through opacity?

Posted: 14 Sep 2022, 16:21
by hcpizzi
Hi,

I've started looking into this. What exactly are you doing? Are you doing AddToViewport of both the UMG Blueprint and the NoesisView?

Re: Passing input through opacity?

Posted: 14 Sep 2022, 21:43
by ZGholson
Correct, I am adding a noesis view and then a UMG widget to the screen via add to viewport. Thanks for looking into it.

Re: Passing input through opacity?

Posted: 19 Sep 2022, 21:24
by ZGholson
Hello I just wanted to check back to see if we have an idea here. Thanks!

Re: Passing input through opacity?

Posted: 20 Sep 2022, 11:20
by hcpizzi
I'm still looking into it, but I found a workaround.

If the useful parts of the UI don't overlap, could it be possible to add the Noesis widget first, then the UMG widget on top?

Re: Passing input through opacity?

Posted: 20 Sep 2022, 23:53
by ZGholson
Thank you for continuing to look into this. That solution would work in some cases but I am not entirely sure we can rely on that to solve our other cases. I will also continue to tinker with this.

Re: Passing input through opacity?

Posted: 23 Sep 2022, 13:36
by sfernandez
Hi, we created a ticket (#2430) to track this issue.

The problem was that our widget was changing the default Visibility value to Visible and as the widget was covering the entire screen was blocking everything that was below.
We are going to restore the default value to SelfHitTestInvisible, and only add our widget to the HitTestGrid when Noesis UI elements are really hit testing.
We will provide a patch in the aforementioned ticket.

Re: Passing input through opacity?

Posted: 23 Sep 2022, 15:09
by hcpizzi
Hello again,

I've attached a patch to the aforementioned ticket that allows input to go through null (not transparent) backgrounds.

Please, read the explanation and give the patch a try, and let us know if it resolves your issues.

Thanks.

Re: Passing input through opacity?

Posted: 23 Sep 2022, 23:23
by ZGholson
Thank you for the potential work around. So far I haven't had luck with it. However, it could be something I am doing wrong on my end. I didn't want to leave you hanging, I have seen your reply and will resume work on this Monday. Thanks again!

Re: Passing input through opacity?

Posted: 26 Sep 2022, 21:49
by ZGholson
I could be implementing this differently than what may be expected so take this with a grain of salt. When I apply the patch and recompile source I am still seeing the issue in my view. Our view exists along the following:
<Window
  x:Name="MainWindow"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  mc:Ignorable="d"
  xmlns:noesis="clr-namespace:NoesisGUIExtensions;assembly=Noesis.GUI.Extensions"
  xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
  xmlns:datamodel="clr-namespace:DataPath.Model"
  xmlns:custom="clr-namespace:Custom.UI"
  d:DesignWidth="1920"
  d:DesignHeight="1080"
  FontFamily="../Common/Fonts/#Inter">
  <Window.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
       	<!--resources...-->
      </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
  </Window.Resources>
  <Viewbox HorizontalAlignment="Right">
    <Grid
      Width="Auto"
      Height="Auto"
      HorizontalAlignment="Right"
      VerticalAlignment="Bottom">
      <Control
        x:Name="DataList"
        Template="{DynamicResource DataListInstance}" />
        <!--TDataPanel is collapsed in a trigger that is stripped from this code-->
      <Control
        x:Name="DataPanel"
        Template="{DynamicResource DataPanelInstance}"
        d:IsHidden="True" />
    </Grid>
  </Viewbox>
</Window>
What we are seeing is that Window or ViewBox consuming the input even though there is not an interactable element there. Should we be using another type?

Thanks!