Tuesday, January 10, 2012
C++ OpenGL mouse click event?
ok here is what i want to do. I'm using OpenGL and C++ to create a map editor for future games, and as experiance for the final copy as this is my first attempt. I create a grid all fine and dandy and then create the boxes. What i need to do is make it so when you click the "blue box" your selected tile is blue, then when you "drop it" onto a spot in the grid it turns that spot into a "blue block" and i can do that good, but the only problem is I dont know how to register a click. so basicaly i need something like ( if (mouseleft = 1){ "CODE CODE CODE"}) i just need it so that when the mouse is pressed i can change variables, BUT i also need to know how to make it regester the object (the blue block as we call it) being clicked. Any sources or sample code is MUCH MUCH MUCH appreciated! And please no answers like, "thats easy, you're a noob!" Thanks!
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment