Sign in to follow this  
tomer_sh

help

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
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

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