Olá gostaria de saber como posso diminuir esses códigos pra não ficar tao grande no menu que estou criando
tocolorbut1 = tocolor(154,205,50, 220)
if isCursorOnElement(screenW * 0.6020, screenH * 0.1550, screenW * 0.0600, screenH * 0.0300) then--botao1
tocolorbut1 = tocolor(255,255,255, 20)
end
tocolorbut2 = tocolor(154,205,50, 220)
if isCursorOnElement(screenW * 0.6020, screenH * 0.2029, screenW * 0.0600, screenH * 0.0300) then--botao2
tocolorbut2 = tocolor(255,255,255, 20)
end
tocolorbut3 = tocolor(154,205,50, 220)
if isCursorOnElement(screenW * 0.6020, screenH * 0.2498, screenW * 0.0600, screenH * 0.0300) then--botao3
tocolorbut3 = tocolor(255,255,255, 20)
end
Tem mais pra baixo tipo uns 20 e o codigo fica muito grande .-.