Re: Noob questions about wether some things are possible or
Posted: 04 Sep 2013, 04:22
Glad to have been helpful 
Welcome to our official discussion site. You’ll find topics on features, bugs, development, and general support here
https://www.noesisengine.com/forums/
Just as clarification. That tutorial is intended to be used with the native SDK. We have to adapt it for C#. Meanwhile there is information inside the UnityTutorial about UserControls.Hi,
About the UserControl, i am following this documentation :
Docs/Gui.Core.UserControlTutorial.html
In this documentation the XAML contains the keyword UserControl, if i must use another keyword, could you please tell me which one?
Thanks in advance.
<Grid 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"
Background="Transparent"
>
</Grid>
Pointi mousePosition = frameworkElement.GetMouse().GetPosition();
Point point = frameworkElement.PointFromScreen(new Point(mousePosition));
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Background="Transparent" Margin="0,0,0,1">
<Grid x:Name="LayoutRoot" Background="Transparent" Margin="0,0,0,-1">
</Grid>
</Grid>
<Grid 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"
>
<Grid.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../NoesisGUI/Themes/NoesisStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Grid.Resources>
<Button>Button</Button>
</Grid>
Yes yes. It is a problem on our side. Problem is that we are using the Background property to clear the surface and this is not always correct.Jesus (i think it's your name), I'm not sure i understand what you are saying here. Eliminating the Background does not result in the desired behavior. I need to get the MouseEvents on the full screen, on the root. A control doesn't send MouseEvent if there is no background nor "foreground" (by foreground i mean children controls). To achieve what i want to achieve, i then need to have the background set to transparent on the root.
If you believe that a control should never have a transparent background, could you please indicate me the correct way of doing what i want to do?
It is a bug. Added to the bugtracker.I also got another problem with a full screen gui. I narrowed it down to the following code :(my gui is located in the folder Assets/GUI, as a result, the template path is what is ../NoesisGUI/Themes/NoesisStyle.xaml)Code: Select all<Grid 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" > <Grid.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="../NoesisGUI/Themes/NoesisStyle.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Grid.Resources> <Button>Button</Button> </Grid>
When you interact with the button of this code when it's the root, the gui disappears and Unity enters a lock up state. It does the same with the WindowsStyle, but not with the SimpleSyle nor OrbStyle. As a temporar work around i disabled the Button style in the NoesisStyle.xaml line 293. I think the issue is related to the animation of the control when the control is touching the borders of the screen, however my level of WPF is not advanced enough to give you more information than that.
Yes, it is guaranteed. Although NoesisGUI uses threads internally the API offered to the client hides that. Callbacks are always invoked in the unity main thread.Edit :
I have another question. From what i understood, NoesisGUI is multithread, so i would like to know if it is guaranteed that the event from NoesisGui are raised on same thread than Unity. This is important because Unity engine methods are not re-entrant.
Thanks in advance.
hehe Getting feedback from users is not a reason to hate, in fact it is the opposite. Open as many threads as you want. I cannot guarantee you fast responses for everything but we try to answer all the posts.
Thanks for the answers. Actually i was editing the post on purpose in order not to spam you because otherwise you are going to start hating me![]()
Yes, absolutely. Our styles are provided as samples. You can reuse, modify them as you like. By the way, NoesisStyle is pending a revision because it can be optimized in several aspects. If you find bugs or improvements do not hesitate to post about it here.I would have a question about your policy about the different styles provided with NoesisGUI. Can we reuse part or all of the styles you provided in our games or do we have to recreate or own styles from scratch? I must say i really like the NoesisStyle, it looks cool.
I created a blog about my game and i would like to post some screenshots of it, so i need to know if i have the authorization to do so knowing that my gui is using the NoesisStyle right now except for the button from which i removed the style.