Log viewer (#1076)

* Add scene

* Modify app_console.lua

* Add fix ability to viewlog in case log got messed a bit
This commit is contained in:
C6H12O6 + NaCl + H2O
2024-01-16 14:19:19 +07:00
committed by GitHub
parent efeb24b0f0
commit 2d12ab3a19
3 changed files with 191 additions and 4 deletions

View File

@@ -377,6 +377,15 @@ local commands={} do
"Usage: openurl [url]",
},
}
commands.viewlog={
code=goScene('viewlog'),
description="View crash logs",
details={
"Open the crash logs menu",
"",
"Usage: viewlog"
}
}
commands.scrinfo={
code=function()
for _,v in next,SCR.info() do
@@ -478,7 +487,9 @@ local commands={} do
commands.setbg={
code=function(name)
if name~="" then
if name~=BG.cur then
if SETTING.lockBG then
log{"Background is currently ",C.R,"locked",C.Z,"! You can unlock it in Video settings."}
elseif name~=BG.cur then
if BG.set(name) then
log(("Background set to '%s'"):format(name))
else
@@ -502,7 +513,7 @@ local commands={} do
code=function(name)
if name~="" then
if SETTING.noTheme then
log{"Theme is ",C.R,"disabled",C.Z,"! Please re-enable it before trying this command again"}
log{"Themes are currently ",C.R,"disabled",C.Z,"! You can re-enable it in Video settings."}
else
if THEME.set(name) then
log("Theme set to: "..name)
@@ -1153,4 +1164,4 @@ scene.widgetList={
inputBox,
}
return scene
return scene