Liste der Anhänge anzeigen (Anzahl: 1)
Code:
pad = Controls.read()
if pad:up() then
menupos = menupos - 1
if menupos == 0 then
menupos = 3
end
end
if pad:down() then
menupos = menupos + 1
if menupos == 4 then
menupos = 1
end
end
1. If I don't just ever so lightly tap the d-pad, the cursor will go down at least 4-5 spaces in a single normal press of the button. How can I make it so the cursor will only move one space for every button press.
Edit: I tried Vblanks, but they didn't work at all.
Code:
screen:print(0,40,"###",rgb)
screen:print(0,50,"###",rgb)
screen:print(0,60,"###",rgb)
2. How do I use drawrect? >_>
3. It would be really cool if someone could show me some tips to optimize my code.
Thanks in advance.