Page 1 of 1

HUD Rendering

Posted: 23 Jan 2019, 23:48
by Khonan
Hi,

I'm working on some kind of HUD but as soon as I attach a noesisview to my cam, noesis fill the entire screen (and not only the controls from the xaml file). How to make the xaml "root" transparent... Where is defined the background color ? ( I could set the alpha to 0, at least :))

If someone got an idea ;)

Regards,

Re: HUD Rendering

Posted: 24 Jan 2019, 09:11
by Khonan
I'll add this to my log:

It appears I was using noesistheme.xaml (for testing theming styles) and noesistheme makes the background opaque.
As soon as I removed Style or using another one (like NocturnalStyle.xaml) I get back my 3d view behind the HUD :

ResourceDictionary style = (ResourceDictionary)Noesis.GUI.LoadXaml("Assets/NoesisGUI/Samples/test/NocturnalStyle.xaml");
Noesis.GUI.SetApplicationResources(style);
Noesis.GUI.LoadComponent(this, "Assets/NoesisGUI/Samples/test/MainWindow.xaml");

Let's move on.

(XAML code in unity is really great ! Thanks to the team)

Re: HUD Rendering

Posted: 24 Jan 2019, 11:03
by sfernandez
NoesisTheme makes the background opaque
I'm curious, what kind of control were you using as root of your xaml?
Because base controls like Control, ContentControl, UserControl, ItemsControl... all have a null background and shouldn't fill the screen.
And Panel classes like Grid, Canvas, DockPanel,... that are normally used as root have also a null background as default.

Re: HUD Rendering

Posted: 31 Jan 2019, 11:22
by Khonan
I was using a UserControl,

<UserControl x:Class="Atome2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006 ... esentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/marku ... ility/2006" mc:Ignorable="d"
xmlns:local="clr-namespace:Atome2"
Background="#FF1A1A1D" Height="Auto" d:DesignWidth="1000" VerticalAlignment="Top">

<Grid Height="Auto" HorizontalAlignment="Stretch">
...
</Grid>

----

Re: HUD Rendering

Posted: 31 Jan 2019, 13:49
by sfernandez
Ok, makes sense now, you were setting the Background of the root control.
Background="#FF1A1A1D"