Hi guys. I would like to ask your advice on a few things. It would be really helpful if you could answer any of my questions. This is all using Quincy 2005, FLTK and C++.
Description - I am going to make a game called bejeweled. This involved moving a picture of a jewel (one space left, right, up or down). The program will then check if their are three or more jewels in a row anywhere on the board. It will then eliminate them.
Question 1 - How would you draw a starting grid? Would you draw several FLTK boxes and use the label function to display different shapes? If so, is there a way I can identify each box in the code? For instance, if the x and y coordinate of the mouse click is within a certain range, this is the box that has been selected...
Also is there any type of function that allows you to ask what label is inside the FLTK box? For instance if you have @circle. Is there anyway I can extract this information?
I already have an array filled with random numbers. These numbers will be fed into the grid start up procedure. I have tried to allow the boxes label to be identified as a label, for instance
1 2 3
|
string x = circle
Fl_Box *box = new Fl_Box(150,250,300,100, x);
|
But this will not work, Is there anyway the type of box can be defined via a variable?
Sorry if this is highly non technical langue, but hopefully you can understand the issues and shed some light.
Thanks again!