Hi,
I've been trying to make a snake game in lazarus, but i encountered the following problem:
I use a TImage's canvas to draw on. The main procedure is called by a button, and in that procedure there's a repeat cycle. However, nothing is drawn, and the button stays 'clicked'. I put also a sleep statement in the code, but that didn't help.
I think it's because the program waits until everything is done. How can I avoid this problem?
Also, how can I convert an integer to a color. I know I can use colors like this: Pen.Color:= #FFFFFF, but I can't do Pen.Color:= #aninteger. After converting the integer to a hexadecimal number, I get a word, so how could I do it?
Thank you for any help!