Jump to content
  • Advertisement
Sign in to follow this  
tomer_sh

help

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

hi all! I start to write my own map editor. the maps are composed from 2d matrix - a grid. I want to allow the user to see a 2d grid composed out of squares, and to allow him to interact with each square. What is the best way to make those graphic squares as interactive objects. i.e - hishlights when I pass on them the cursor, and open a dialog when I double click them etc.. this is very important, since I worked out in my mind most of the aspects, and this is crucial. I am going to use Win32 api. plus, if u can recommand good GUI libraries for me to use

Share this post


Link to post
Share on other sites
Advertisement
For an editor you can probably get away with using the GDI functions like Polyline etc. Draw your grid using one of these then when someone clicks (WM_LBUTTONDOWN) work out from the mouse x,y position which grid cell it is over then open a dialog. If just passing the mouse over change the colour of that grid square.

Share this post


Link to post
Share on other sites
heh, actually I haven't used it, but I've heard plenty of good things about it, and I'm planning on learning it soon. Also it seems to be one of the few object oriented GUI libraries(and it's cross-platform, which is always(at least to me) a plus)

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!