mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2026-01-10 13:12:40 +01:00
Update OS.lua
This commit is contained in:
parent
e18a631647
commit
2f1f21910c
@ -725,6 +725,8 @@ local function enterSystem()
|
||||
elseif fs.exists("System/OS/Users.cfg") then
|
||||
safeBiometry()
|
||||
drawAll()
|
||||
elseif fs.exists("System/OS/WithoutProtection.cfg") then
|
||||
drawAll()
|
||||
end
|
||||
end
|
||||
|
||||
@ -759,6 +761,8 @@ local function notification(text)
|
||||
|
||||
newObj("Notification", "Exit", x + width - 1, y, x + width - 1, y)
|
||||
newObj("Notification", "Show", x, y, x + width - 2, y + height - 1)
|
||||
|
||||
return oldPixels
|
||||
end
|
||||
|
||||
--Проверка наличия новых версий
|
||||
@ -792,27 +796,36 @@ local function checkForUpdates()
|
||||
|
||||
--Выводим нотификацию вон в таком случае
|
||||
if oldVersion <= newVersion then
|
||||
notification("Доступны обновления ОС!")
|
||||
return notification("Доступны обновления ОС!")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function displayInfoAboutUpdate()
|
||||
|
||||
end
|
||||
|
||||
|
||||
--А вот и системка стартует
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if not launchConfigurator() then enterSystem() end
|
||||
|
||||
--checkForUpdates()
|
||||
local notificationOldPixels = checkForUpdates()
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
-- Понеслась моча по трубам
|
||||
while true do
|
||||
|
||||
|
||||
local eventData = { event.pull() }
|
||||
if eventData[1] == "touch" then
|
||||
|
||||
--Удаляем нотификацию, если имеется
|
||||
if notificationOldPixels then ecs.drawOldPixels(notificationOldPixels); notificationOldPixels = nil end
|
||||
|
||||
--Переменная, становящаяся ложью только в случае клика на какой-либо элемент, не суть какой
|
||||
local clickedOnEmptySpace = true
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user