I want to create a line drawing based on key presses. Each key press will relate to a predefined xy co-ordinate on screen and when the next key is pressed a line will be drawn between the two and so on for the next keypress.
Having placed a node for each key on the screen I have compiled a list of all of the x co-ordinates (there are 21 values) and a list of all they co-ordinates (there are 3 values). For these I have created two arrays, one lX and one for Y, so that I can create values for each letter
Q [0] [0]
x = 65.8 (1st number in Array X)
y = 65.8. (1st number in Array Y)
Array X [65.8, 83.8, 101.8, 119.8, 137.8, 155.8, 173.8, 191.8, 209.8, 227.8, 245.8, 263.8, 281.8, 299.8, 317.8, 335.8, 353.8, 371.8, 389.8, 407.8, 425.8]
Array Y [65.8, 101.8, 137.8]
Basically I am unsure of how to relate the x and y values of the letters to the keypress. I.e.
Keypress 1 = B
Keypress 2 = A
Keypress 3 = D
Keypress 2 = G
Keypress 2 = E
Keypress 2 = R
Etc…
I find coding very difficult, so if anyone would be able to explain this it would be greatly appreciated.
Many Thanks
Helen