From c21e01015971f71bae9a51caafe3bf25863b7a91 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 29 Apr 2021 22:40:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=8D=E6=AC=A1=E8=B0=83=E6=95=B4cmd?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=EF=BC=8C=E5=85=A8=E9=83=A8=E6=94=B9=E6=88=90?= =?UTF-8?q?console?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/language/lang_en.lua | 2 +- parts/language/lang_fr.lua | 2 +- parts/language/lang_pt.lua | 2 +- parts/language/lang_sp.lua | 2 +- parts/language/lang_yygq.lua | 2 +- parts/language/lang_zh.lua | 2 +- parts/scenes/{app_cmd.lua => app_console.lua} | 12 +++++++----- parts/scenes/error.lua | 2 +- parts/scenes/load.lua | 13 +++---------- parts/scenes/main.lua | 8 ++++---- 10 files changed, 21 insertions(+), 26 deletions(-) rename parts/scenes/{app_cmd.lua => app_console.lua} (98%) diff --git a/parts/language/lang_en.lua b/parts/language/lang_en.lua index 7389dc81..e56da1a8 100644 --- a/parts/language/lang_en.lua +++ b/parts/language/lang_en.lua @@ -660,7 +660,7 @@ return{ importVK="Import Virtual Key Layout", }, error={ - cmd="Console", + console="Console", quit="Quit", }, }, diff --git a/parts/language/lang_fr.lua b/parts/language/lang_fr.lua index 55872933..0e9a8a49 100644 --- a/parts/language/lang_fr.lua +++ b/parts/language/lang_fr.lua @@ -572,7 +572,7 @@ return{ importVK="Importer VK", }, error={ - cmd="Console", + console="Console", quit="Quit", }, }, diff --git a/parts/language/lang_pt.lua b/parts/language/lang_pt.lua index 7d080f97..079fe977 100644 --- a/parts/language/lang_pt.lua +++ b/parts/language/lang_pt.lua @@ -657,7 +657,7 @@ return{ importVK="Importar layout de hud", }, error={ - cmd="Console", + console="Console", quit="Quit", }, }, diff --git a/parts/language/lang_sp.lua b/parts/language/lang_sp.lua index d80f51bc..c2b67689 100644 --- a/parts/language/lang_sp.lua +++ b/parts/language/lang_sp.lua @@ -571,7 +571,7 @@ return{ importVK="Importar VK", }, error={ - cmd="Console", + console="Console", quit="Salir", }, }, diff --git a/parts/language/lang_yygq.lua b/parts/language/lang_yygq.lua index 9962f68b..90877bdd 100644 --- a/parts/language/lang_yygq.lua +++ b/parts/language/lang_yygq.lua @@ -182,7 +182,7 @@ return{ tapFX="动画", }, error={ - cmd="Console", + console="Console", quit="Quit", }, }, diff --git a/parts/language/lang_zh.lua b/parts/language/lang_zh.lua index b4e9f8f0..df9f388d 100644 --- a/parts/language/lang_zh.lua +++ b/parts/language/lang_zh.lua @@ -661,7 +661,7 @@ return{ importVK="导入虚拟按键布局", }, error={ - cmd="控制台", + console="控制台", quit="退出", }, }, diff --git a/parts/scenes/app_cmd.lua b/parts/scenes/app_console.lua similarity index 98% rename from parts/scenes/app_cmd.lua rename to parts/scenes/app_console.lua index e14fc38f..235976df 100644 --- a/parts/scenes/app_cmd.lua +++ b/parts/scenes/app_console.lua @@ -96,7 +96,8 @@ do--commands.help(arg) "", "Aliases: rm delete remove", "", - "Usage: del [filename]", + "Usage: del [filename|dirname]", + "Usage: del -s [dirname]", }, },rm="del",delete="del",remove="del", cls={ @@ -371,7 +372,7 @@ do end end function commands.del(name) - local recursive=name:sub(1,3)=="/s " + local recursive=name:sub(1,3)=="-s " if recursive then name=name:sub(4)end if name~=""then @@ -392,7 +393,8 @@ do log{C.R,("No file called '%s'"):format(name)} end else - log{C.aqua,"Usage: del [filename]"} + log{C.aqua,"Usage: del [filename|dirname]"} + log{C.aqua,"Usage: del -s [dirname]"} end end end @@ -421,7 +423,7 @@ function commands.wireframe(bool) gc.setWireframe(bool=="true") log("Wireframe: "..(gc.isWireframe()and"on"or"off")) else - log{C.aqua,"Usage: wireframe [true|false]"} + log{C.aqua,"Usage: wireframe "} end end function commands.gammacorrect(bool) @@ -429,7 +431,7 @@ function commands.gammacorrect(bool) love._setGammaCorrect(bool=="true") log("GammaCorrect: "..(gc.isGammaCorrect()and"on"or"off")) else - log{C.aqua,"Usage: gammacorrect [true|false]"} + log{C.aqua,"Usage: gammacorrect "} end end function commands.rmwtm(pw) diff --git a/parts/scenes/error.lua b/parts/scenes/error.lua index 94ef389d..64f9e67d 100644 --- a/parts/scenes/error.lua +++ b/parts/scenes/error.lua @@ -36,7 +36,7 @@ function scene.draw() end scene.widgetList={ - WIDGET.newKey{name="cmd",x=940,y=640,w=170,h=80,font=40,code=goScene"app_cmd"}, + WIDGET.newKey{name="console",x=940,y=640,w=170,h=80,font=40,code=goScene"app_console"}, WIDGET.newKey{name="quit",x=1140,y=640,w=170,h=80,font=40,code=backScene}, } diff --git a/parts/scenes/load.lua b/parts/scenes/load.lua index ad464997..43b3f347 100644 --- a/parts/scenes/load.lua +++ b/parts/scenes/load.lua @@ -10,7 +10,7 @@ local shadePhase1,shadePhase2 local progress=0 local studioLogo--Studio logo text object local logoColor1,logoColor2 -local skip,locked,cmdLaunchKey +local skip,locked local light={} for i=0,26 do @@ -213,7 +213,7 @@ function scene.sceneInit() shadePhase2=6.26*math.random() skip=0--Skip time locked=SETTING.appLock - cmdLaunchKey=0 + consoleLaunchKey=0 if not locked then light[6*3],light[26*3]=true,true end kb.setKeyRepeat(false) end @@ -226,8 +226,6 @@ function scene.keyDown(key) SCN.back() elseif key=="s"then skip=999 - elseif key=="r"then - cmdLaunchKey=cmdLaunchKey+1 elseif locked and #key==1 and key:byte()>=97 and key:byte()<=122 then switchLight(key:byte()-96) else @@ -267,12 +265,7 @@ function scene.update(dt) skip=skip-1 end if openTime>=3.26 and not SCN.swapping then - if cmdLaunchKey==2 then - SCN.push("intro") - SCN.swapTo("app_cmd") - else - SCN.swapTo("intro") - end + SCN.swapTo("intro") love.keyboard.setKeyRepeat(true) end end diff --git a/parts/scenes/main.lua b/parts/scenes/main.lua index be23d924..340816ac 100644 --- a/parts/scenes/main.lua +++ b/parts/scenes/main.lua @@ -11,13 +11,13 @@ local widgetX0={ -10,-10,-10,-10, 1290,1290,1290,1290, } -local cmdEntryThread=coroutine.wrap(function() +local consoleEntryThread=coroutine.wrap(function() while true do SFX.play("ren_"..math.random(5,6))YIELD() SFX.play("ren_"..math.random(7,8))YIELD() SFX.play("ren_"..math.random(9,10))YIELD() SFX.play("ren_9")SFX.play("ren_11")SFX.play("ren_mega") - SCN.go("app_cmd") + SCN.go("app_console") YIELD() end end) @@ -40,7 +40,7 @@ end function scene.mouseDown(x,y) if x>=400 and x<=880 and y>=10 and y<=110 then - cmdEntryThread() + consoleEntryThread() end end scene.touchDown=scene.mouseDown @@ -116,7 +116,7 @@ function scene.keyDown(key) SCN.back() end elseif key=="c"then - cmdEntryThread() + consoleEntryThread() end end