debug页面新增复制日志信息和输出屏幕信息

This commit is contained in:
MrZ626
2020-09-19 00:31:45 +08:00
parent 2044f4096d
commit f174a02bdc
3 changed files with 30 additions and 24 deletions

View File

@@ -58,7 +58,6 @@ local langList={
statSavingError="统计保存失败:",
unlockSavingError="解锁保存失败:",
recSavingError="纪录保存失败:",
switchSpawnSFX="请开启方块出生音效",
needRestart="重新开始以生效",
@@ -439,6 +438,8 @@ local langList={
back="返回",
},
debug={
copyLog="复制日志",
scrInfo="输出屏幕信息",
reset="重置?",
reset1="重置解锁/等级",
reset2="重置统计",
@@ -581,7 +582,6 @@ local langList={
statSavingError="统计保存失败:",
unlockSavingError="解锁保存失败:",
recSavingError="纪录保存失败:",
switchSpawnSFX="请开启方块出生音效",
needRestart="重新开始以生效",
@@ -960,6 +960,8 @@ local langList={
back="返回",
},
debug={
copyLog="复制日志",
scrInfo="输出屏幕信息",
reset="重置?",
reset1="重置解锁/等级",
reset2="重置统计",
@@ -1102,7 +1104,6 @@ local langList={
statSavingError="Failed to save statistics:",
unlockSavingError="Failed to save unlocked content:",
recSavingError="Failed to save record:",
switchSpawnSFX="Switch on spawn SFX to play",
needRestart="Effective after restart",
@@ -1471,6 +1472,8 @@ local langList={
back="Back",
},
debug={
copyLog="Copy Log",
scrInfo="Show Screen Info.",
reset="Reset?",
reset1="Reset ranks",
reset2="Reset data",
@@ -1613,6 +1616,7 @@ local langList={
statSavingError="x!:",
unlockSavingError="x!:",
recSavingError="x!:",
switchSpawnSFX="Switch on spawn SFX to play",
needRestart="!!*#R#*!!",
copySuccess="~$~",
@@ -2124,7 +2128,6 @@ local langList={
statSavingError="统计保存失败:",
unlockSavingError="解锁保存失败:",
recSavingError="纪录保存失败:",
switchSpawnSFX="请开启方块出生音效",
needRestart="重新开始以生效",
@@ -2502,6 +2505,8 @@ local langList={
back="返回",
},
debug={
copyLog="复制日志",
scrInfo="输出屏幕信息",
reset="重置?",
reset1="重置解锁/等级",
reset2="重置统计",

View File

@@ -617,14 +617,20 @@ local Widgets={
newButton({name="back", x=640, y=620,w=200,h=80,color="white",font=35,code=BACK}),
},
debug={
newButton({name="reset", x=640,y=200,w=260,h=100,color="yellow",font=40,
code=function()
sceneTemp.reset=true
end,
hide=function()
return sceneTemp.reset
end}),
newButton({name="reset1", x=340,y=400,w=260,h=100,color="red",font=40,
newButton({name="copyLog", x=300,y=120,w=300,h=100,color="green", font=30,code=function()LOG.copy()end}),
newButton({name="scrInfo", x=640,y=120,w=300,h=100,color="green", font=30,code=function()
LOG.print("Screen Info:")
LOG.print("x y: "..scr.x.." "..scr.y)
LOG.print("w h: "..scr.w.." "..scr.h)
LOG.print("W H: "..scr.W.." "..scr.H)
LOG.print("k: "..math.floor(scr.k*100)*.01)
LOG.print("rad: "..math.floor(scr.rad*100)*.01)
LOG.print("dpi: "..scr.dpi)
end}),
newButton({name="reset", x=640,y=380,w=240,h=100,color="orange", font=40,
code=function()sceneTemp.reset=true end,
hide=function()return sceneTemp.reset end}),
newButton({name="reset1", x=340,y=480,w=240,h=100,color="red", font=40,
code=function()
love.filesystem.remove("unlock.dat")
SFX.play("finesseError_long")
@@ -632,10 +638,8 @@ local Widgets={
TEXT.show("effected after restart game",640,360,60,"stretch",.4)
TEXT.show("play one game if you regret",640,390,40,"stretch",.4)
end,
hide=function()
return not sceneTemp.reset
end}),
newButton({name="reset2", x=640,y=400,w=260,h=100,color="red",font=40,
hide=function()return not sceneTemp.reset end}),
newButton({name="reset2", x=640,y=480,w=260,h=100,color="red", font=40,
code=function()
love.filesystem.remove("data.dat")
SFX.play("finesseError_long")
@@ -643,10 +647,8 @@ local Widgets={
TEXT.show("effected after restart game",640,360,60,"stretch",.4)
TEXT.show("play one game if you regret",640,390,40,"stretch",.4)
end,
hide=function()
return not sceneTemp.reset
end}),
newButton({name="reset3", x=940,y=400,w=260,h=100,color="red",font=40,
hide=function()return not sceneTemp.reset end}),
newButton({name="reset3", x=940,y=480,w=260,h=100,color="red", font=40,
code=function()
local L=love.filesystem.getDirectoryItems("")
for i=1,#L do
@@ -660,10 +662,8 @@ local Widgets={
TEXT.show("effected after restart game",640,390,60,"stretch",.4)
SCN.back()
end,
hide=function()
return not sceneTemp.reset
end}),
newButton({name="back", x=640,y=620,w=200,h=80,color="white",font=35,code=BACK}),
hide=function()return not sceneTemp.reset end}),
newButton({name="back", x=640,y=620,w=200,h=80,color="white", font=40,code=BACK}),
},
}