I am making a game (naval battle), and i need to have GRIDS in many formats: 10x11 squares, 10x12 and 14x16 for example. The problem is, when i change the CANVAS Width e Height e drawing a new GRID (row and colunns) the LINES are out of place.. The interesting is if i push the same botton for the second time, everything works fine.
Other thing, if a set the standard Width and Weight of the CANVAS (during development) whith the same size of that Botton (for ex, 10x12 = width 300 x height 360), in this case the Botton works well for the first time.
Seems that changes in the dimensions of the CANVAS do not work immediately, and the program is trying to draw lines in a CANVAS with the last dimensions set.
I tried to repeat twice the MakeGrig procedure in a single call and still doesn't work.
THE GAME IS READY, but I can not ask the player to press the same button twice to select the grid...