zloty
Topic Author
Posts: 6
Joined: 18 Feb 2018, 21:41

Custom panel implementation

22 Mar 2018, 00:09

We are currently evaluating NoesisGUI for our game (based on the Unity game engine). So far it looks really promising.
One of the features in our game is a quite extensive mod support from simple mods with just new content to complex mods with new code and UI changes (new controls or modifying existing ones). In a proof of concept we were able verify that this is possible with NoesisGUI. But there is one important step for which we don't have a solution yet.

The POC uses an ItemsControl with data binding and data templates to render all controls into a StackPanel. But for our game we need a more capable layout component, to align controls at each other. So for example if a mod wants to add a new control above the minimap, it can specify this via layout constraints (something like... the lower right corner of the new control is at the upper right corner of the minimap control).

In WPF we would create a custom panel implementation which provides a few attached properties to specify the layout constraints. But as far as we see, this is not possible in NoesisGUI, because the panel class doesn't provide the necessary methods (like MeasureOverride and ArrangeOverride). We found a similar post in the forum (viewtopic.php?f=3&t=428) which is almost 4 years old, but doesn't have a solution.

Is this somehow possible with newer versions of NoesisGUI? Maybe by providing the panel implementation as native code like the other framework classes in NoesisGUI? Or do you have another suggestion how this can be achieved?
 
User avatar
sfernandez
Site Admin
Posts: 1328
Joined: 22 Dec 2011, 19:20

Re: Custom panel implementation

27 Mar 2018, 11:37

Sorry for the late answer, we were very busy with all GDC stuff, but we are back to normal during this week.

C# panel doesn't allow yet to reimplement MeasureOverride and ArrangeOverride.
We will expose it in the following minor release.

In your scenario is not possible to use DockPanel to layout elements the way you want?
 
zloty
Topic Author
Posts: 6
Joined: 18 Feb 2018, 21:41

Re: Custom panel implementation

27 Mar 2018, 22:21

Thanks for the reply.

The standard panels wont work for this, because we don't have pre-defined slots where mods can insert new controls. The idea is, that mods can place their controls relative to any other control. So it's more like a canvas, but with layout support. :)

Do you know when the minor release will be available? Days, weeks or months? Depending on this information we will just wait with this feature or look for a workaround.
 
User avatar
sfernandez
Site Admin
Posts: 1328
Joined: 22 Dec 2011, 19:20

Re: Custom panel implementation

28 Mar 2018, 09:48

We expect the next release will be in a few weeks including some crash fixes and some pending bugs.
 
User avatar
jsantos
Site Admin
Posts: 2122
Joined: 20 Jan 2012, 17:18
Contact:

Re: Custom panel implementation

28 Mar 2018, 14:37

Just to make sure we are going to implement what you need, you just need to override MeasureOverride and ArrangeOverride right?
 
zloty
Topic Author
Posts: 6
Joined: 18 Feb 2018, 21:41

Re: Custom panel implementation

29 Mar 2018, 09:50

sorry for the delay, i didn't received a notification.

Yes those two methods would be enough for now.
 
zloty
Topic Author
Posts: 6
Joined: 18 Feb 2018, 21:41

Re: Custom panel implementation

29 Mar 2018, 10:05

I did a quick check to verify my last answer and it seems there is another thing missing to create custom panels with Noesis.
The property Panel.InternalChildren is also not available. Everything else (Measuring an element, getting the desired size and arranging it) is possible.

So it's FrameworkElement.MeasureOverride, FrameworkElement.ArrangeOverride and Panel.InternalChildren
 
User avatar
jsantos
Site Admin
Posts: 2122
Joined: 20 Jan 2012, 17:18
Contact:

Re: Custom panel implementation

03 Apr 2018, 08:06

Could you please create a ticket about it?
 
zloty
Topic Author
Posts: 6
Joined: 18 Feb 2018, 21:41

Re: Custom panel implementation

03 Apr 2018, 14:56

 
zloty
Topic Author
Posts: 6
Joined: 18 Feb 2018, 21:41

Re: Custom panel implementation

10 Aug 2018, 14:19

Hi,

will this be part of the NoesisGUI 2.2 Beta?

Who is online

Users browsing this forum: No registered users and 17 guests