function buttonControl_key(i) mouseShow=false if i=="up"or i=="down"or i=="left"or i=="right"then if not Buttons.sel then Buttons.sel=1 else Buttons.sel=Buttons[scene][Buttons.sel][i]or Buttons.sel end elseif i=="space"or i=="return"then if not sceneSwaping and Buttons.sel then local B=Buttons[scene][Buttons.sel] B.code() B.alpha=1 sysSFX("button") end end end function buttonControl_gamepad(i) if i=="dpup"or i=="dpdown"or i=="dpleft"or i=="dpright"then if not Buttons.sel then Buttons.sel=1 mouseShow=false else Buttons.sel=Buttons[scene][Buttons.sel][i=="dpup"and"up"or i=="dpdown"and"down"or i=="dpleft"and"left"or"right"]or Buttons.sel end elseif i=="start"then if not sceneSwaping and Buttons.sel then local B=Buttons[scene][Buttons.sel] if B.hold then Buttons.pressing=max(Buttons.pressing,1)end B.code() B.alpha=1 sysSFX("button") end end end function love.mousemoved(x,y) mouseShow=true mx,my=mouseConvert(x,y) Buttons.sel=nil for i=1,#Buttons[scene]do local B=Buttons[scene][i] if not(B.hide and B.hide())then if abs(mx-B.x)