-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Create integers drawX and drawY, set them to 0.
Add an onInput event to the Panel. Arrow down increases drawY, arrow right increases drawX (both go to max 64). Up and Left arrows do the opposite.
Draw on the panel using e.Graphics as before, but with a
for(int i = drawY; i < 64; i++)
for(int j = drawX; j < 64; j++)
...
Draw gameObjects with their X & Y in range of i and j and the appropriate amount of lines for the grid.
On every input refresh the panel, draw it again and see how the performance is.
If the performance is fine, Mouse drawing would be next. It could be done as it is right now, just taking the drawX & drawY into account (increase the click coordinates by pictureSize * drawX and pictureSize * drawY respectively)
If all of this works, it could be also done on mouseScroll (shift + scroll for going sideways).