This project is read-only.

GuiManager tutorial

Dec 28, 2011 at 6:27 PM
Edited Dec 28, 2011 at 6:57 PM

I was following your tutorial on creating a simple form using the GuiManager. However it seems the tutorial is out of date or something. In the tutorial GuiManager's constructor is taking a reference to "this", which is a Microsoft.Xna.Game, but none of GuiManager's constructors accept that type. I could create an empty GameServiceContainer and pass that, but I doubt that is what is required. I managed to get the tutorial to compile by passing an empty GameServiceContainer, however I end up getting an exception on the line where I try to create a new 'Screen'.

System.TypeInitializationException was unhandled, The type initializer for 'Nuclex.UserInterface.Screen' threw an exception.

I am using the binaries provided in the downloads section, the only two I needed to get the program to compile were Nuclex.UserInterface.dll and Nuclex.Input.dll.

Is there something I'm missing, is there a working code sample somewhere I can look at that uses an up-to-date version of GuiManager?

EDIT: And if I move the 'new Screen()' code to the LoadContent() method I now get an exception during base.Initialize() of this (seemingly related to the GameServiceContainer that is now required): 
Using the GUI with the default input capturer requires the IInputService. Please either add the IInputService to Game.Services by using the Nuclex.Input.InputManager in your game or provide a custom IInputCapturer implementation for the GUI and assign it before GuiManager.Initialize() is called.

EDIT: I also just downloaded the demo package and tried to compile and got this error for Graphics, Input, and Fonts projects:
'Error loading pipeline assembly "F:\Game Development\Projects\Nuclex\Demos\References\framework\xna-4.0-x86\Nuclex.Fonts.Content.TrueTypeImporter.dll".'


FINAL EDIT: Ok I managed to get it to work by looking at the code in the demo download. You guys might want to update the tutorial in this wiki for the GuiManager, it won't work as shown. Also you should probably mention which binaries are needed to run it, UserInterface, Input, Support, nunit, and SlimDX. It's strange that it requires SlimDX when XNA has its own input system, and I'm not sure why the unit test dll is required either.

Jul 4, 2012 at 2:37 AM

I am getting the same errors.  How do I get past the: 

Error loading pipeline assembly Nuclex.Fonts.Content.TrueTypeImporter.dll



Jul 4, 2012 at 3:26 AM
Have you tried right-clicking them in Windows Explorer and undisabling them?

- Nic

On Jul 3, 2012, at 7:37 PM, "ondesic" <> wrote:

From: ondesic

I am getting the same errors. How do I get past the:

Error loading pipeline assembly Nuclex.Fonts.Content.TrueTypeImporter.dll