报错系统大升级,更不容易闪退并且不会把程序搞死
This commit is contained in:
@@ -658,6 +658,10 @@ return{
|
||||
resetRecord="Reset records",
|
||||
resetData="Reset data",
|
||||
},
|
||||
error={
|
||||
cmd="CMD",
|
||||
quit="Quit",
|
||||
},
|
||||
},
|
||||
modes={
|
||||
["sprint_10l"]= {"Sprint", "10L", "Clear 10 lines!"},
|
||||
|
||||
@@ -576,6 +576,10 @@ return{
|
||||
resetRecord="Réinitialiser les records",
|
||||
resetData="Réinitialiser les données",
|
||||
},
|
||||
error={
|
||||
cmd="CMD",
|
||||
quit="Quit",
|
||||
},
|
||||
},
|
||||
modes={
|
||||
["sprint_10l"]= {"Sprint", "10L", "Nettoyez 10 lignes !"},
|
||||
|
||||
@@ -657,6 +657,10 @@ return{
|
||||
resetRecord="Reset records",
|
||||
resetData="Reset data",
|
||||
},
|
||||
error={
|
||||
cmd="CMD",
|
||||
quit="Quit",
|
||||
},
|
||||
},
|
||||
modes={
|
||||
["sprint_10l"]= {"Sprint", "10L", "Limpe 10 linhas!"},
|
||||
|
||||
@@ -573,6 +573,10 @@ return{
|
||||
-- resetRecord="Reset records",
|
||||
resetData="Reiniciar datos",
|
||||
},
|
||||
error={
|
||||
cmd="CMD",
|
||||
quit="Quit",
|
||||
},
|
||||
},
|
||||
modes={
|
||||
["sprint_10l"]= {"Sprint", "10L", "¡Limpia 10 líneas!"},
|
||||
|
||||
@@ -183,6 +183,10 @@ return{
|
||||
disappear="消失",
|
||||
tapFX="动画",
|
||||
},
|
||||
error={
|
||||
cmd="CMD",
|
||||
quit="Quit",
|
||||
},
|
||||
},
|
||||
modes={
|
||||
["sprint_10l"]= {"竞速", "10L", "消10行"},
|
||||
|
||||
@@ -661,6 +661,10 @@ return{
|
||||
resetRecord="重置纪录",
|
||||
resetData="重置统计",
|
||||
},
|
||||
error={
|
||||
cmd="命令行",
|
||||
quit="退出",
|
||||
},
|
||||
},
|
||||
modes={
|
||||
["sprint_10l"]= {"竞速", "10L", "消除10行"},
|
||||
|
||||
@@ -258,6 +258,7 @@ do--commands.help(arg)
|
||||
end
|
||||
end
|
||||
function commands.shutdown(arg)os.execute("shutdown "..arg)end
|
||||
function commands.error(mes)error(mes)end
|
||||
function commands.cls()outputBox:clear()end
|
||||
function commands.rst()
|
||||
history,hisPtr={}
|
||||
|
||||
39
parts/scenes/error.lua
Normal file
39
parts/scenes/error.lua
Normal file
@@ -0,0 +1,39 @@
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
|
||||
local BGcolor
|
||||
local stateInfo,errorText
|
||||
local errorShot,errorInfo
|
||||
|
||||
local scene={}
|
||||
|
||||
function scene.sceneInit()
|
||||
BGcolor=rnd()>.026 and{.3,.5,.9}or{.62,.3,.926}
|
||||
stateInfo=SYSTEM.."-"..VERSION_NAME.." scene:"..SCN.cur
|
||||
errorText=LOADED and text.errorMsg or"An error has occurred during loading.\nError info has been created, and you can send it to the author."
|
||||
errorShot,errorInfo=ERRDATA[#ERRDATA].shot,ERRDATA[#ERRDATA].mes
|
||||
if SETTING then SFX.fplay("error",SETTING.voc*.8 or 0)end
|
||||
end
|
||||
|
||||
function scene.draw()
|
||||
gc.clear(BGcolor)
|
||||
gc.setColor(1,1,1)
|
||||
gc.draw(errorShot,100,345,nil,512/errorShot:getWidth(),288/errorShot:getHeight())
|
||||
setFont(100)gc.print(":(",100,00,0,1.2)
|
||||
setFont(40)gc.printf(errorText,100,160,SCR.w0-100)
|
||||
setFont(20)
|
||||
gc.print(stateInfo,100,640)
|
||||
|
||||
gc.printf(errorInfo[1],626,326,1260-626)
|
||||
gc.print("TRACEBACK",626,390)
|
||||
for i=4,#errorInfo do
|
||||
gc.print(errorInfo[i],626,340+20*i)
|
||||
end
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newKey{name="cmd",x=940,y=640,w=170,h=80,font=40,code=goScene"app_cmd"},
|
||||
WIDGET.newKey{name="quit",x=1140,y=640,w=170,h=80,font=40,code=backScene},
|
||||
}
|
||||
|
||||
return scene
|
||||
Reference in New Issue
Block a user