From d3ef7e7f81d9fc3aef37c70dcaca04dba07add75 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Tue, 20 Jul 2021 15:16:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/app_console.lua | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/parts/scenes/app_console.lua b/parts/scenes/app_console.lua index 6abe91a2..e883c32a 100644 --- a/parts/scenes/app_console.lua +++ b/parts/scenes/app_console.lua @@ -862,11 +862,10 @@ local fleg={ }setmetatable(fleg,{__tostring=function()return"The fl\97g."end}) function userG.the_box(k,f) if k~=first_key then log"Usage:"log"?"return end - if not f then log"Two keys needed"return end - if type(f)~='function'then log"Function need"return end + if not f or type(f)~='function'then log"Second arg is a function"return end noLog=true - if f()~=f then noLog=false log"Give me yourself."return end - if f(26)~=math.huge then noLog=false log"Infinity for the lucky number"return end + if f()~=f then noLog=false log"Return itself"return end + if f(26)~=math.huge then noLog=false log"Lucky number → Infinity"return end noLog=false log"*You Lose*" return fleg @@ -976,8 +975,7 @@ function scene.keyDown(key) elseif key=="pagedown"then outputBox:scroll(20) elseif key=="home"then outputBox:scroll(-1e99) elseif key=="end"then outputBox:scroll(1e99) - elseif combKey[key]and kb.isDown("lctrl","rctrl")then - combKey[key]() + elseif combKey[key]and kb.isDown("lctrl","rctrl")then combKey[key]() elseif key=="escape"then if not WIDGET.isFocus(inputBox)then WIDGET.focus(inputBox) @@ -995,4 +993,4 @@ scene.widgetList={ inputBox, } -return scene +return scene \ No newline at end of file