Im in need of a little bit of help. Im having problems getting my start menu working the way it should. What im trying to do is, after you press start to bring up the startmenu pressing start again should make it go away.. this can work using the break function to make the start menu go away instead of the whole script but i still need to know what to put to make it use the start button after it has allready been pressed to bring it up. Heres my code.
i have got this to work the way i want by simply usingCode:if pad:start() then
while true do
screen:clear()
screen:blit(0,0,board)
pad=Controls.read()
if pad:up() and oldpad:up()~=pad:up() then
sel=sel-1
elseif pad:down() and oldpad:down()~=pad:down() then
sel=sel+1
end
if sel<1 then sel=4 end
if sel>4 then sel=1 end
local choice={"Save","Save & Quit","Quit","Cancel"}
local chcol={editcolor,editcolor,editcolor,editcolor}
chcol[sel]=selecolor
screen:blit(190,106,start)
screen:print(224,117,choice[1],chcol[1])
screen:print(196,127,choice[2],chcol[2])
screen:print(224,137,choice[3],chcol[3])
screen:print(216,147,choice[4],chcol[4])
if pad:cross() then
if sel==1 or sel==2 then
local file=io.open("./memos/"..field,"w")
file:write(field2)
file:close()
end
if sel==2 or sel==3 then
goprg = false
background=Image.load("./images/background.png")
tfread = false
end
break
end
screen.waitVblankStart()
screen:flip()
oldpad=pad
end
but, circle is not the buton i want to use, its start that i need.Code:if pad:circle() then
break
end
and another question i have is, how do i make it so pressing circle makes this only select once instead of switching back and forth real fast..
what that does it when you press ( and hold ) circle it switches between the two really fast and makes it hard to select. i need to know how to make it only switch once per time your press circle.Code:elseif pad:circle() then
if fieldedit == 1 then fieldedit = 2
else fieldedit = 1
end
