升级控件模块,封装focus相关的几个静态方法
This commit is contained in:
@@ -190,7 +190,7 @@ function love.touchreleased(id,x,y)
|
||||
WIDGET.release(x,y)
|
||||
touching=false
|
||||
if WIDGET.sel and not WIDGET.sel.keepFocus then
|
||||
WIDGET.sel=false
|
||||
WIDGET.unFocus()
|
||||
end
|
||||
end
|
||||
if SCN.touchUp then SCN.touchUp(x,y)end
|
||||
@@ -214,7 +214,7 @@ local function noDevkeyPressed(key)
|
||||
end
|
||||
end
|
||||
elseif key=="f4"then if not kb.isDown("lalt","ralt")then LOG.copy()end
|
||||
elseif key=="f5"then if WIDGET.sel then print(WIDGET.sel)end
|
||||
elseif key=="f5"then print(WIDGET.isFocus()or"no widget selected")
|
||||
elseif key=="f6"then for k,v in next,_G do print(k,v)end
|
||||
elseif key=="f7"then if love._openConsole then love._openConsole()end
|
||||
elseif key=="f8"then devMode=nil LOG.print("DEBUG OFF")
|
||||
@@ -224,8 +224,8 @@ local function noDevkeyPressed(key)
|
||||
elseif key=="f12"then devMode=4 LOG.print("DEBUG 4")
|
||||
elseif key=="\\"then _G["\100\114\97\119\70\87\77"]=NULL
|
||||
elseif devMode==2 then
|
||||
if WIDGET.sel then
|
||||
local W=WIDGET.sel
|
||||
local W=WIDGET.sel
|
||||
if W then
|
||||
if key=="left"then W.x=W.x-10
|
||||
elseif key=="right"then W.x=W.x+10
|
||||
elseif key=="up"then W.y=W.y-10
|
||||
|
||||
Reference in New Issue
Block a user