mirror of
https://github.com/kepler155c/opus
synced 2025-07-01 17:42:59 +00:00
kiosk mode
This commit is contained in:
parent
f0a65d87ce
commit
3cc368f33a
@ -194,7 +194,8 @@ UI.Icon.defaults = {
|
|||||||
}
|
}
|
||||||
function UI.Icon:eventHandler(event)
|
function UI.Icon:eventHandler(event)
|
||||||
if event.type == 'mouse_click' then
|
if event.type == 'mouse_click' then
|
||||||
self:setFocus(self.button)
|
--self:setFocus(self.button)
|
||||||
|
self:emit({ type = self.button.event, button = self.button })
|
||||||
return true
|
return true
|
||||||
elseif event.type == 'mouse_doubleclick' then
|
elseif event.type == 'mouse_doubleclick' then
|
||||||
self:emit({ type = self.button.event, button = self.button })
|
self:emit({ type = self.button.event, button = self.button })
|
||||||
|
@ -1,17 +1,16 @@
|
|||||||
local os = _G.os
|
local os = _G.os
|
||||||
local parallel = _G.parallel
|
local parallel = _G.parallel
|
||||||
local peripheral = _G.peripheral
|
local peripheral = _G.peripheral
|
||||||
local settings = _G.settings
|
local settings = _G.settings
|
||||||
local term = _G.term
|
local term = _G.term
|
||||||
|
|
||||||
|
|
||||||
local mon = peripheral.find('monitor')
|
local mon = peripheral.find('monitor')
|
||||||
if mon then
|
if mon then
|
||||||
term.redirect(mon)
|
term.redirect(mon)
|
||||||
if not settings.get('opus.kiosk.textscale') then
|
if not settings.get('kiosk.textscale') then
|
||||||
settings.set('opus.kiosk.textscale', .5)
|
settings.set('kiosk.textscale', .5)
|
||||||
end
|
end
|
||||||
mon.setTextScale(settings.get('opus.kiosk.textscale') or .5)
|
mon.setTextScale(settings.get('kiosk.textscale') or .5)
|
||||||
|
|
||||||
parallel.waitForAny(
|
parallel.waitForAny(
|
||||||
function()
|
function()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user