一堆场景同时允许回车键和小键盘回车键
This commit is contained in:
@@ -323,7 +323,7 @@ function scene.keyDown(key,isRep)
|
|||||||
elseif key=='1' or key=='2' then (kb.isDown('lshift','lctrl','lalt') and playRep or setFocus)(key=='1' and 1 or 2)
|
elseif key=='1' or key=='2' then (kb.isDown('lshift','lctrl','lalt') and playRep or setFocus)(key=='1' and 1 or 2)
|
||||||
elseif key=='c1' then playRep(1)
|
elseif key=='c1' then playRep(1)
|
||||||
elseif key=='c2' then playRep(2)
|
elseif key=='c2' then playRep(2)
|
||||||
elseif key=='return' then
|
elseif key=='return' or key=='kpenter' then
|
||||||
if repeater.focus then
|
if repeater.focus then
|
||||||
repeater.focus=false
|
repeater.focus=false
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ function scene.keyDown(key)
|
|||||||
val=val..key
|
val=val..key
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif key=='return' then
|
elseif key=='return' or key=='kpenter' then
|
||||||
scene.keyDown('calculate')
|
scene.keyDown('calculate')
|
||||||
elseif key=='calculate' then
|
elseif key=='calculate' then
|
||||||
val=val:gsub("e$","")
|
val=val:gsub("e$","")
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ end
|
|||||||
function scene.keyDown(key,rep)
|
function scene.keyDown(key,rep)
|
||||||
if key=='escape' and not rep then
|
if key=='escape' and not rep then
|
||||||
SCN.back()
|
SCN.back()
|
||||||
elseif key=='return' then
|
elseif key=='return' or key=='kpenter' then
|
||||||
if #scene.widgetList.code:getText():upper()==0 then
|
if #scene.widgetList.code:getText():upper()==0 then
|
||||||
_getCode()
|
_getCode()
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ function scene.touchClick(x,y)
|
|||||||
end
|
end
|
||||||
function scene.keyDown(key,isRep)
|
function scene.keyDown(key,isRep)
|
||||||
if isRep then return end
|
if isRep then return end
|
||||||
if key=='return' then
|
if key=='return' or key=='kpenter' then
|
||||||
if mapCam.sel then
|
if mapCam.sel then
|
||||||
if visibleModes[mapCam.sel]==2 then
|
if visibleModes[mapCam.sel]==2 then
|
||||||
MES.new('info',text.unlockHint)
|
MES.new('info',text.unlockHint)
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ function scene.keyDown(key,isRep)
|
|||||||
else
|
else
|
||||||
_quit()
|
_quit()
|
||||||
end
|
end
|
||||||
elseif key=='return' then
|
elseif key=='return' or key=='kpenter' then
|
||||||
local mes=STRING.trim(inputBox:getText())
|
local mes=STRING.trim(inputBox:getText())
|
||||||
if not inputBox.hide and #mes>0 then
|
if not inputBox.hide and #mes>0 then
|
||||||
if mes:sub(1,1)=='/' then
|
if mes:sub(1,1)=='/' then
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ function scene.keyDown(key)
|
|||||||
if fetchTimer<=7 then
|
if fetchTimer<=7 then
|
||||||
_fetchRoom()
|
_fetchRoom()
|
||||||
end
|
end
|
||||||
elseif roomList:getLen()>0 and (key=='join' or key=='return' and love.keyboard.isDown('lctrl','rctrl')) then
|
elseif roomList:getLen()>0 and (key=='join' or (key=='return' or key=='kpenter') and love.keyboard.isDown('lctrl','rctrl')) then
|
||||||
local R=roomList:getSel()
|
local R=roomList:getSel()
|
||||||
if R and not TASK.getLock('fetchRoom') then
|
if R and not TASK.getLock('fetchRoom') then
|
||||||
if R.info.version==VERSION.room then
|
if R.info.version==VERSION.room then
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ function scene.sceneInit()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function scene.keyDown(key)
|
function scene.keyDown(key)
|
||||||
if key=='return' then
|
if key=='return' or key=='kpenter' then
|
||||||
local rep=listBox:getSel()
|
local rep=listBox:getSel()
|
||||||
if rep then
|
if rep then
|
||||||
_playRep(rep.fileName)
|
_playRep(rep.fileName)
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ end
|
|||||||
function scene.keyDown(key,rep)
|
function scene.keyDown(key,rep)
|
||||||
if key=='escape' and not rep then
|
if key=='escape' and not rep then
|
||||||
SCN.back()
|
SCN.back()
|
||||||
elseif key=='return' then
|
elseif key=='return' or key=='kpenter' then
|
||||||
if #scene.widgetList.code:getText()==0 then
|
if #scene.widgetList.code:getText()==0 then
|
||||||
NET.getCode(USER.email)
|
NET.getCode(USER.email)
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user