Jump to content

  • Log In with Google      Sign In   
  • Create Account

Level Editor using XNA Studio 4.0


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 lucky6969b   Members   -  Reputation: 636

Like
0Likes
Like

Posted 03 June 2013 - 12:08 AM

Hello,

If I am using the XNA studio, how can I get a panel in the middle of the form and click button down the bottom.

As you see, XNA will populate game content to the whole window. As I am writing a level editor here, I need some interaction between the contents and some controls. If not possible, I would revert back to Direct3D using C#, but it doesn't seem to be any documentation available.

Let me know

Thanks

Jack


Edited by lucky6969b, 03 June 2013 - 01:21 AM.


Sponsor:

#2 Andy474   Members   -  Reputation: 690

Like
0Likes
Like

Posted 03 June 2013 - 04:29 AM

I'm not sure i understand ...

 

Are you asking how to make the GUI Controls, or how to make objects interact with the GUI Controls?

 

If your just in XNA you'll have to make the GUI controls yourself, or use WinForms or WPF.

 

As for interaction, there are hundred of ways depending on the GUI you use.



#3 LordRhys   Members   -  Reputation: 367

Like
0Likes
Like

Posted 03 June 2013 - 07:43 AM

In order to do what you want you will have to use a WinForm project and drop in two files that will allow you to use the XNA graphics. You need to get GraphicsDeviceService.cs, and GraphicsDeviceControl.cs, you can find these in an example project on AppHub. Then when you drop your mapdisplay in the WinForm you do something like the following:


class MapDisplay : WinFormsGraphicsDevice.GraphicsDeviceControl
{
public event EventHandler OnInitialize;
public event EventHandler OnDraw;

protected override void Initialize()
{
if (OnInitialize != null)
OnInitialize(this, null);
}

protected override void Draw()
{
if (OnDraw != null)
OnDraw(this, null);
}
}

#4 Stuntdk   Members   -  Reputation: 436

Like
1Likes
Like

Posted 03 June 2013 - 11:59 PM

Take a look at Nick Gravelyn's Tile Editor series, he makes an editor using Winforms (Editor start at tutorial 3B)



#5 LordRhys   Members   -  Reputation: 367

Like
1Likes
Like

Posted 04 June 2013 - 08:51 AM

you could also check out this tutorial site for XNA 4.0, this is where I got my Editor information:

 

http://xnagpa.net/xna4/rpgtutorials/xna4rpgtutorial11a.pdf



#6 lucky6969b   Members   -  Reputation: 636

Like
0Likes
Like

Posted 09 June 2013 - 03:39 AM

thanks






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS