再次调整cmd相关,全部改成console

This commit is contained in:
MrZ626
2021-04-29 22:40:35 +08:00
parent 89b87be143
commit c21e010159
10 changed files with 21 additions and 26 deletions

View File

@@ -660,7 +660,7 @@ return{
importVK="Import Virtual Key Layout", importVK="Import Virtual Key Layout",
}, },
error={ error={
cmd="Console", console="Console",
quit="Quit", quit="Quit",
}, },
}, },

View File

@@ -572,7 +572,7 @@ return{
importVK="Importer VK", importVK="Importer VK",
}, },
error={ error={
cmd="Console", console="Console",
quit="Quit", quit="Quit",
}, },
}, },

View File

@@ -657,7 +657,7 @@ return{
importVK="Importar layout de hud", importVK="Importar layout de hud",
}, },
error={ error={
cmd="Console", console="Console",
quit="Quit", quit="Quit",
}, },
}, },

View File

@@ -571,7 +571,7 @@ return{
importVK="Importar VK", importVK="Importar VK",
}, },
error={ error={
cmd="Console", console="Console",
quit="Salir", quit="Salir",
}, },
}, },

View File

@@ -182,7 +182,7 @@ return{
tapFX="动画", tapFX="动画",
}, },
error={ error={
cmd="Console", console="Console",
quit="Quit", quit="Quit",
}, },
}, },

View File

@@ -661,7 +661,7 @@ return{
importVK="导入虚拟按键布局", importVK="导入虚拟按键布局",
}, },
error={ error={
cmd="控制台", console="控制台",
quit="退出", quit="退出",
}, },
}, },

View File

@@ -96,7 +96,8 @@ do--commands.help(arg)
"", "",
"Aliases: rm delete remove", "Aliases: rm delete remove",
"", "",
"Usage: del [filename]", "Usage: del [filename|dirname]",
"Usage: del -s [dirname]",
}, },
},rm="del",delete="del",remove="del", },rm="del",delete="del",remove="del",
cls={ cls={
@@ -371,7 +372,7 @@ do
end end
end end
function commands.del(name) 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 recursive then name=name:sub(4)end
if name~=""then if name~=""then
@@ -392,7 +393,8 @@ do
log{C.R,("No file called '%s'"):format(name)} log{C.R,("No file called '%s'"):format(name)}
end end
else else
log{C.aqua,"Usage: del [filename]"} log{C.aqua,"Usage: del [filename|dirname]"}
log{C.aqua,"Usage: del -s [dirname]"}
end end
end end
end end
@@ -421,7 +423,7 @@ function commands.wireframe(bool)
gc.setWireframe(bool=="true") gc.setWireframe(bool=="true")
log("Wireframe: "..(gc.isWireframe()and"on"or"off")) log("Wireframe: "..(gc.isWireframe()and"on"or"off"))
else else
log{C.aqua,"Usage: wireframe [true|false]"} log{C.aqua,"Usage: wireframe <true|false>"}
end end
end end
function commands.gammacorrect(bool) function commands.gammacorrect(bool)
@@ -429,7 +431,7 @@ function commands.gammacorrect(bool)
love._setGammaCorrect(bool=="true") love._setGammaCorrect(bool=="true")
log("GammaCorrect: "..(gc.isGammaCorrect()and"on"or"off")) log("GammaCorrect: "..(gc.isGammaCorrect()and"on"or"off"))
else else
log{C.aqua,"Usage: gammacorrect [true|false]"} log{C.aqua,"Usage: gammacorrect <true|false>"}
end end
end end
function commands.rmwtm(pw) function commands.rmwtm(pw)

View File

@@ -36,7 +36,7 @@ function scene.draw()
end end
scene.widgetList={ 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}, WIDGET.newKey{name="quit",x=1140,y=640,w=170,h=80,font=40,code=backScene},
} }

View File

@@ -10,7 +10,7 @@ local shadePhase1,shadePhase2
local progress=0 local progress=0
local studioLogo--Studio logo text object local studioLogo--Studio logo text object
local logoColor1,logoColor2 local logoColor1,logoColor2
local skip,locked,cmdLaunchKey local skip,locked
local light={} local light={}
for i=0,26 do for i=0,26 do
@@ -213,7 +213,7 @@ function scene.sceneInit()
shadePhase2=6.26*math.random() shadePhase2=6.26*math.random()
skip=0--Skip time skip=0--Skip time
locked=SETTING.appLock locked=SETTING.appLock
cmdLaunchKey=0 consoleLaunchKey=0
if not locked then light[6*3],light[26*3]=true,true end if not locked then light[6*3],light[26*3]=true,true end
kb.setKeyRepeat(false) kb.setKeyRepeat(false)
end end
@@ -226,8 +226,6 @@ function scene.keyDown(key)
SCN.back() SCN.back()
elseif key=="s"then elseif key=="s"then
skip=999 skip=999
elseif key=="r"then
cmdLaunchKey=cmdLaunchKey+1
elseif locked and #key==1 and key:byte()>=97 and key:byte()<=122 then elseif locked and #key==1 and key:byte()>=97 and key:byte()<=122 then
switchLight(key:byte()-96) switchLight(key:byte()-96)
else else
@@ -267,12 +265,7 @@ function scene.update(dt)
skip=skip-1 skip=skip-1
end end
if openTime>=3.26 and not SCN.swapping then if openTime>=3.26 and not SCN.swapping then
if cmdLaunchKey==2 then SCN.swapTo("intro")
SCN.push("intro")
SCN.swapTo("app_cmd")
else
SCN.swapTo("intro")
end
love.keyboard.setKeyRepeat(true) love.keyboard.setKeyRepeat(true)
end end
end end

View File

@@ -11,13 +11,13 @@ local widgetX0={
-10,-10,-10,-10, -10,-10,-10,-10,
1290,1290,1290,1290, 1290,1290,1290,1290,
} }
local cmdEntryThread=coroutine.wrap(function() local consoleEntryThread=coroutine.wrap(function()
while true do while true do
SFX.play("ren_"..math.random(5,6))YIELD() SFX.play("ren_"..math.random(5,6))YIELD()
SFX.play("ren_"..math.random(7,8))YIELD() SFX.play("ren_"..math.random(7,8))YIELD()
SFX.play("ren_"..math.random(9,10))YIELD() SFX.play("ren_"..math.random(9,10))YIELD()
SFX.play("ren_9")SFX.play("ren_11")SFX.play("ren_mega") SFX.play("ren_9")SFX.play("ren_11")SFX.play("ren_mega")
SCN.go("app_cmd") SCN.go("app_console")
YIELD() YIELD()
end end
end) end)
@@ -40,7 +40,7 @@ end
function scene.mouseDown(x,y) function scene.mouseDown(x,y)
if x>=400 and x<=880 and y>=10 and y<=110 then if x>=400 and x<=880 and y>=10 and y<=110 then
cmdEntryThread() consoleEntryThread()
end end
end end
scene.touchDown=scene.mouseDown scene.touchDown=scene.mouseDown
@@ -116,7 +116,7 @@ function scene.keyDown(key)
SCN.back() SCN.back()
end end
elseif key=="c"then elseif key=="c"then
cmdEntryThread() consoleEntryThread()
end end
end end