Jump to content
  • Advertisement
Sign in to follow this  

[.net] MDX and C# :: Getting Mouse Position (Tile Editor)?

This topic is 4422 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Okay, I just started a 2D Tile Editor using C# and Managed DX 9. It's actually a tile-map, but some of the objects are 3D (blocks for "walls", etc.), and the rest are just tile textures. The main window is a split container, the left panel being the object tree-view, and the right panel being a "Panel" that I use to render the map. The window is a fixed size (no maximizing, etc.), the right panel is 640x480, which is the size of the map (no scrolling, etc.). I will probably be using Windows coordinates ("PositionNormalTextured" vertices -- I think that's what it's called), instead of "1.0f", "2.0f", and so on). But how would I translate the mouse coordinates, when the left-mouse button is clicked, into coordinates in the rendering panel. Like, if I click at the very top-left of the panel, it comes out as "0, 0", instead of "127, 268" or something (because of where the window is positioned, etc.). I hope I have made my question clear enough. I couldn't really think of a better way to explain it. =P I'm using VC# 2005 and MDX 9 (Dec. 2005 SDK). Thanks in advance, Matt U.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!