规范代码,大量xxx=nil换成xxx=false

This commit is contained in:
MrZ626
2020-12-22 14:54:01 +08:00
parent f611199fab
commit fe2abf6903
25 changed files with 127 additions and 128 deletions

View File

@@ -31,7 +31,7 @@ local ins,rem=table.insert,table.remove
local SCR=SCR
local mx,my,mouseShow=-20,-20,false
local touching=nil--First touching ID(userdata)
local touching--First touching ID(userdata)
local xOy=SCR.xOy
joysticks={}
@@ -146,7 +146,7 @@ function love.touchmoved(id,x,y,dx,dy)
else
WIDGET.moveCursor(x,y)
if not WIDGET.sel then
touching=nil
touching=false
end
end
end
@@ -156,9 +156,9 @@ function love.touchreleased(id,x,y)
if id==touching then
WIDGET.press(x,y)
WIDGET.release(x,y)
touching=nil
touching=false
if WIDGET.sel and not WIDGET.sel.keepFocus then
WIDGET.sel=nil
WIDGET.sel=false
end
end
if SCN.touchUp then SCN.touchUp(id,x,y)end