create focus callback, better exit callback stability

This commit is contained in:
Jill 2022-09-22 15:56:38 +03:00
parent f6a95e81c6
commit 0763d750ff
1 changed files with 7 additions and 0 deletions

View File

@ -529,6 +529,13 @@
self:addcommand('On', onCommand)
self:addcommand('Ready', screen_ready_command)
self:addcommand('Off', exit)
self:addcommand('SaltyResetMessageCommand', exit)
self:addcommand('WindowFocus', function()
uranium:call('focus', true)
end)
self:addcommand('WindowFocusLost', function()
uranium:call('focus', false)
end)
self:queuecommand('Ready')
else
Trace('got an error loading main.lua!')