mirror of
https://github.com/kepler155c/opus
synced 2024-11-15 05:04:50 +00:00
35 lines
745 B
Plaintext
35 lines
745 B
Plaintext
|
local os = _G.os
|
||
|
local parallel = _G.parallel
|
||
|
local peripheral = _G.peripheral
|
||
|
local settings = _G.settings
|
||
|
local term = _G.term
|
||
|
|
||
|
|
||
|
local mon = peripheral.find('monitor')
|
||
|
if mon then
|
||
|
term.redirect(mon)
|
||
|
if not settings.get('opus.kiosk.textscale') then
|
||
|
settings.set('opus.kiosk.textscale', .5)
|
||
|
end
|
||
|
mon.setTextScale(settings.get('opus.kiosk.textscale') or .5)
|
||
|
|
||
|
parallel.waitForAny(
|
||
|
function()
|
||
|
os.run(_ENV, '/sys/boot/opus.boot')
|
||
|
end,
|
||
|
|
||
|
function()
|
||
|
while true do
|
||
|
local event, _, x, y = os.pullEventRaw('monitor_touch')
|
||
|
|
||
|
if event == 'monitor_touch' then
|
||
|
os.queueEvent('mouse_click', 1, x, y)
|
||
|
os.queueEvent('mouse_up', 1, x, y)
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
)
|
||
|
else
|
||
|
os.run(_ENV, '/sys/boot/opus.boot')
|
||
|
end
|