HUD Rendering
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,
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
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)
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)
-
sfernandez
Site Admin
- Posts: 2984
- Joined:
Re: HUD Rendering
I'm curious, what kind of control were you using as root of your xaml?NoesisTheme makes the background opaque
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
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>
----
<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>
----
-
sfernandez
Site Admin
- Posts: 2984
- Joined:
Re: HUD Rendering
Ok, makes sense now, you were setting the Background of the root control.
Code: Select all
Background="#FF1A1A1D"
Who is online
Users browsing this forum: Semrush [Bot] and 90 guests