mirror of
https://github.com/kepler155c/opus
synced 2024-06-16 10:19:59 +00:00
Add option to remove splash on startup
Adds the setting option 'opus.show_splash'. By default it is set to true. When set to false opus will immediately boot without showing the splash screen. Fairly straightforward.
This commit is contained in:
parent
43163053a5
commit
118932c0b5
39
startup.lua
39
startup.lua
|
@ -117,22 +117,33 @@ local function splash()
|
||||||
term.write(str)
|
term.write(str)
|
||||||
end
|
end
|
||||||
|
|
||||||
term.clear()
|
local doSplash = true
|
||||||
splash()
|
if settings then
|
||||||
|
doSplash = settings.get('opus.show_splash')
|
||||||
local timerId = os.startTimer(1.5)
|
if doSplash == nil then
|
||||||
while true do
|
doSplash = true
|
||||||
local e, id = os.pullEvent()
|
settings.set('opus.show_splash', true)
|
||||||
if e == 'timer' and id == timerId then
|
settings.save('.settings')
|
||||||
break
|
|
||||||
end
|
end
|
||||||
if e == 'char' then
|
end
|
||||||
bootOption = startupMenu()
|
if doSplash then
|
||||||
if settings then
|
term.clear()
|
||||||
settings.set('opus.boot_option', bootOption)
|
splash()
|
||||||
settings.save('.settings')
|
|
||||||
|
local timerId = os.startTimer(1.5)
|
||||||
|
while true do
|
||||||
|
local e, id = os.pullEvent()
|
||||||
|
if e == 'timer' and id == timerId then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
if e == 'char' then
|
||||||
|
bootOption = startupMenu()
|
||||||
|
if settings then
|
||||||
|
settings.set('opus.boot_option', bootOption)
|
||||||
|
settings.save('.settings')
|
||||||
|
end
|
||||||
|
break
|
||||||
end
|
end
|
||||||
break
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user