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

Started by
0 comments, last by TFS_Waldo 17 years, 10 months ago
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.
:==-_ Why don't the voices just leave me alone?! _-==:
Advertisement
Nevermind, a simple "PointToClient" call worked. LoL. Silly me! =D
:==-_ Why don't the voices just leave me alone?! _-==:

This topic is closed to new replies.

Advertisement