Embedding Nuclex as a game component

Sep 13, 2011 at 2:41 PM

Hey fellows,

is it possible to embed Nuclex just as a game component, so that my whole team does not have to change their game.cs?

regards,

nop0x

Coordinator
Sep 13, 2011 at 4:00 PM

Have you looked at the sources or docs at all?

This is not a replacement for Game.cs or something intrusive like that. It's a collection of utility classes, some are game components, some are smaller than that.

Some examples of game components are: the InputManager (input mocking, event based input, DirectInput support), GameStateManager and GuiManager. And there's a ton of smaller utility classes for things like rectangle packing, vertex declaration management, primitive batching, 3D text rendering and so on.

Sep 13, 2011 at 6:05 PM
Cygon wrote:

Have you looked at the sources or docs at all?

This is not a replacement for Game.cs or something intrusive like that. It's a collection of utility classes, some are game components, some are smaller than that.

Some examples of game components are: the InputManager (input mocking, event based input, DirectInput support), GameStateManager and GuiManager. And there's a ton of smaller utility classes for things like rectangle packing, vertex declaration management, primitive batching, 3D text rendering and so on.

 

I'm sorry but I seemed to ask something which was misunderstood.

I had a look on the demos, but now im really confused.

In your Nuclex.UserInterface.Demo you have the class Demo Dialog, which seemes to be some sort of component.

But which component designer gives a DemoDialog.cs file (which is shown as a normal class) with a DemoDialogDesigner.cs as a dropdown action?

This  is the only thing, which i do not really understand.

regards

P.S.: sorry for my bad english :)

Coordinator
Sep 13, 2011 at 7:47 PM

The DemoDialog.cs contains just an ordinary class with the code for the dialog that is displayed by the demo.

This drop down thing (they're called "nested items" oder "nested files") is nothing special, you can do it with any file you like. I named it .Designer.cs and nested it so developers used to Windows Forms would feel at home. There is no designer and if you open the DemoDialog.Designer.cs file you'll find a little pun on that (#region NOT Windows Forms designer generated code) :)