remove dependency on device global

This commit is contained in:
kepler155c@gmail.com
2019-03-11 23:48:22 -04:00
parent bd9b2825be
commit 04af12b452
3 changed files with 11 additions and 10 deletions

View File

@@ -8,7 +8,6 @@ local Util = require('util')
local _rep = string.rep
local _sub = string.sub
local colors = _G.colors
local device = _G.device
local fs = _G.fs
local os = _G.os
local peripheral = _G.peripheral
@@ -914,9 +913,9 @@ UI.Device.defaults = {
function UI.Device:postInit()
self.device = self.device or term.current()
if self.deviceType then
self.device = device[self.deviceType]
end
--if self.deviceType then
-- self.device = device[self.deviceType]
--end
if not self.device.setTextScale then
self.device.setTextScale = function() end
@@ -1197,6 +1196,7 @@ end
loadComponents()
UI.theme = { }
UI:loadTheme('usr/config/ui.theme')
if Util.getVersion() >= 1.76 then
UI:loadTheme('sys/etc/ext.theme')