Jonathon Stevens

I'm curious as to #1 if it's possible and #2 how to get started building a GUI creator where you can drag and drop gui controls in 'design time' to create code files or a form of XML

How do I tap into vs.net to create my own design time/code time pages The GUI controls wouldn't be .net controls, but controls that inherit from a custom gui control class and so on.

Thanks,

Jonathon



Re: XNA Game Studio Express Creating a GUI builder in visual studio

GlitchEnzo

If your goal is to make a GUI creator for others to use in the future, I wouldn't "waste" my time.

Apparently they are hoping to have a GUI solution in a future version of XNA.
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=734160&SiteID=1

So, as long as you are patient, you will have one eventually.





Re: XNA Game Studio Express Creating a GUI builder in visual studio

Kyle_W

Well although Microsoft does appear to be planning to create a GUI control offering, I don't believe anyone has stated whether this offering will include a visual designer for Visual Studio. It may simply be a set of classes to enable creation of controls through code, similar to what some in the community have already done:

http://jsedlak.org/xna5d

http://www.nuclex.org/news/2007/01/14/ceguisharp

Whether it's a worthwhile pursuit in light of other activity on this front is of course up to you, but if you decide to pursue it, perhaps this link will help:

http://msdn2.microsoft.com/en-us/vstudio/aa700819.aspx





Re: XNA Game Studio Express Creating a GUI builder in visual studio

Stephen Styrchak - MSFT

More specific to designers and serialization of code, you may want to read this:

http://msdn2.microsoft.com/en-us/library/aa720032(VS.71).aspx

You'll note that this is all about designers for Winform controls and Components, which is not what you want to do. However, you can read this to get an idea of what a visual designer entails, and how to build one. If you participated in our beta 1, you may also recognize how we provided our initial component design surface. However, I will warn you that attempting to make a designer that works cross-platform is very difficult with the existing designer framework (which is why we abandoned it).

--Stephen





Re: XNA Game Studio Express Creating a GUI builder in visual studio

Jonathon Stevens

Before you guys didn't have a designer for GUI, you had a designer for the entire game. Sure, that was the "main screen" GUI, but I'm not talking on that level. I want to simply create a plugin (or whatever it would be called) for visual studio so that I can go in and get a design surface (design view) and drag and drop custom GUI controls I've build (just like xna5d and others have done). When you drop them on the screen, it creates the xml in the (source) part of the file which tracks what the control was, where in world space it's been dropped, size, etc. etc.

Think of an asp.net page. You have the design time of the page where you drag and drop controls which creates the xhtml you see by clicking on "Source." This is where I want to start. So it's ONE file but you can view it in design or in source mode. I then, AFTER I get that working, would like to possibly link in a code behind file for additional features, but that's in the future.

I went to some of those links, and they describe many things, but I can't find (maybe because I'm not even sure what this would be called) anything specific to what I'm talking about doing. Biztalk has a plugin for building in vs.net, sql server does, etc. etc., I just want to build one of those for my own GUI stuff.





Re: XNA Game Studio Express Creating a GUI builder in visual studio

waruwaru

Jonathon Stevens wrote:

Before you guys didn't have a designer for GUI, you had a designer for the entire game. Sure, that was the "main screen" GUI, but I'm not talking on that level. I want to simply create a plugin (or whatever it would be called) for visual studio so that I can go in and get a design surface (design view) and drag and drop custom GUI controls I've build (just like xna5d and others have done). When you drop them on the screen, it creates the xml in the (source) part of the file which tracks what the control was, where in world space it's been dropped, size, etc. etc.

VS Express edition doesn't support alot of the extensibility stuff as the Standard/Pro versions of VS 2005. You might want to look

http://msdn2.microsoft.com/en-us/vstudio/aa700819.aspx

While you are at it, vote for my favorite enhancement request:

https://connect.microsoft.com/feedback/ViewFeedback.aspx FeedbackID=190037&SiteID=226






Re: XNA Game Studio Express Creating a GUI builder in visual studio

Jim Perry

Would a WinForms app that allows you to lay out game screens with just rectangles for control placeholders be useful to anyone It would write out XML for use in your game. What would be useful

Note: this is just a quick and dirty thing I'm whipping up, not a fancy IDE.






Re: XNA Game Studio Express Creating a GUI builder in visual studio

Stephen Styrchak - MSFT

The reason I pointed out the Managed Designer Framework was not because it was exactly what you wanted to build, but it is the same concept. It provides a design surface that gives you a visual representation of code (or XML, or whatever your preferred serialization format is). This designer framework is extremely customizable. In your case, you probably would want to customize the serializers to generate something custom to represent each GUI element. The serialization format is arbitrary, as are the objects rendering the view.

Using the existing designer framework, you could create a few Winform controls to represent your GUI elements, then add custom serializers to them so they serialize into the format you need for your GUI engine (instead of into code to initialize a Form). It's tricky, because those same serializers would need to deserialize into your Winform controls, but it would sure beat building it from scratch.

The other benefit of this approach is that the Managed Designer Framework is included in VC# Express. As waruwaru pointed out, using the VS SDK will not allow you to create customizations for Express.

You do need to read about and understand the designer framework, but creating a custom design surface in that framework is pretty straightforward once you get it (not trivial, but straightforward). Alternately, if you decide you don't want to build on it, it will probably give you some good architectural ideas for building your own designer.

Keep in mind that if you start from scratch, you won't be able to integrate it into C# Express.

--Stephen





Re: XNA Game Studio Express Creating a GUI builder in visual studio

Kyle_W

It seems like Stephen's idea is the best approach. I hope the XNA Team will use this approach with whatever GUI implementation they plan to provide.