Sign in to follow this  

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

This topic is 4205 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

This topic is 4205 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this