mirror of
https://github.com/kepler155c/opus
synced 2025-02-08 21:10:03 +00:00
changes for deprecated ui methods
This commit is contained in:
parent
9d2a76f4ea
commit
e703c7f7b6
@ -343,7 +343,7 @@ function Browser:eventHandler(event)
|
||||
local file = self.grid:getSelected()
|
||||
|
||||
if event.type == 'quit' then
|
||||
Event.exitPullEvents()
|
||||
UI:quit()
|
||||
|
||||
elseif event.type == 'edit' and file then
|
||||
self:run('edit', file.name)
|
||||
|
@ -378,11 +378,11 @@ function page:executeStatement(statement)
|
||||
end
|
||||
|
||||
if _exit then
|
||||
UI:exitPullEvents()
|
||||
UI:quit()
|
||||
end
|
||||
end
|
||||
|
||||
local args = { ... }
|
||||
local args = Util.parse(...)
|
||||
if args[1] then
|
||||
command = 'args[1]'
|
||||
sandboxEnv.args = args
|
||||
@ -391,4 +391,4 @@ if args[1] then
|
||||
end
|
||||
|
||||
UI:setPage(page)
|
||||
UI:pullEvents()
|
||||
UI:start()
|
||||
|
@ -111,7 +111,8 @@ local page = UI.Page {
|
||||
event = 'slide_hide',
|
||||
},
|
||||
text = UI.TextArea {
|
||||
x = 2, y = 2,
|
||||
x = 1, y = 2,
|
||||
marginLeft = 1,
|
||||
value = [[
|
||||
|
||||
In order to connect to another computer:
|
||||
@ -252,7 +253,7 @@ function page:eventHandler(event)
|
||||
Config.update('network', config)
|
||||
|
||||
elseif event.type == 'quit' then
|
||||
Event.exitPullEvents()
|
||||
UI:quit()
|
||||
end
|
||||
UI.Page.eventHandler(self, event)
|
||||
end
|
||||
@ -290,4 +291,4 @@ if not device.wireless_modem then
|
||||
end
|
||||
|
||||
UI:setPage(page)
|
||||
UI:pullEvents()
|
||||
UI:start()
|
||||
|
@ -183,7 +183,7 @@ function page:eventHandler(event)
|
||||
self.action.button:draw()
|
||||
|
||||
elseif event.type == 'quit' then
|
||||
UI:exitPullEvents()
|
||||
UI:quit()
|
||||
end
|
||||
UI.Page.eventHandler(self, event)
|
||||
end
|
||||
@ -195,4 +195,4 @@ Packages:downloadList()
|
||||
page:loadPackages()
|
||||
page:sync()
|
||||
|
||||
UI:pullEvents()
|
||||
UI:start()
|
||||
|
@ -5,7 +5,6 @@ local Util = require('opus.util')
|
||||
local colors = _G.colors
|
||||
local device = _G.device
|
||||
local textutils = _G.textutils
|
||||
local peripheral = _G.peripheral
|
||||
local multishell = _ENV.multishell
|
||||
|
||||
local gridColumns = {}
|
||||
@ -280,7 +279,7 @@ function page.packetSlide:eventHandler(event)
|
||||
end
|
||||
|
||||
function page.packetGrid:getDisplayValues(row)
|
||||
local row = Util.shallowCopy(row)
|
||||
row = Util.shallowCopy(row)
|
||||
row.distance = Util.toBytes(Util.round(row.distance), 2)
|
||||
return row
|
||||
end
|
||||
@ -356,7 +355,7 @@ function page:eventHandler(event)
|
||||
self.packetSlide:show(event.selected)
|
||||
|
||||
elseif event.type == 'quit' then
|
||||
Event.exitPullEvents()
|
||||
UI:quit()
|
||||
|
||||
else return UI.Page.eventHandler(self, event)
|
||||
end
|
||||
@ -386,4 +385,4 @@ if args[1] then
|
||||
end
|
||||
|
||||
UI:setPage(page)
|
||||
UI:pullEvents()
|
||||
UI:start()
|
||||
|
@ -42,7 +42,7 @@ end
|
||||
|
||||
function systemPage:eventHandler(event)
|
||||
if event.type == 'quit' then
|
||||
UI:exitPullEvents()
|
||||
UI:quit()
|
||||
|
||||
elseif event.type == 'success_message' then
|
||||
self.notification:success(event.message)
|
||||
@ -82,4 +82,4 @@ local plugins = loadDirectory(fs.combine(programDir, 'system'), { })
|
||||
systemPage.tabs.settings.grid:setValues(plugins)
|
||||
|
||||
UI:setPage(systemPage)
|
||||
UI:pullEvents()
|
||||
UI:start()
|
||||
|
@ -52,7 +52,7 @@ local page = UI.Page {
|
||||
end
|
||||
end
|
||||
if event.type == 'quit' then
|
||||
Event.exitPullEvents()
|
||||
UI:quit()
|
||||
end
|
||||
UI.Page.eventHandler(self, event)
|
||||
end
|
||||
@ -65,4 +65,4 @@ Event.onInterval(1, function()
|
||||
end)
|
||||
|
||||
UI:setPage(page)
|
||||
UI:pullEvents()
|
||||
UI:start()
|
||||
|
@ -131,7 +131,7 @@ function page:eventHandler(event)
|
||||
shell.openForegroundTab('PackageManager')
|
||||
|
||||
elseif event.type == 'wizard_complete' or event.type == 'cancel' then
|
||||
UI.exitPullEvents()
|
||||
UI:quit()
|
||||
|
||||
else
|
||||
return UI.Page.eventHandler(self, event)
|
||||
@ -140,4 +140,4 @@ function page:eventHandler(event)
|
||||
end
|
||||
|
||||
UI:setPage(page)
|
||||
UI:pullEvents()
|
||||
UI:start()
|
||||
|
@ -194,4 +194,4 @@ page = UI.Page {
|
||||
}
|
||||
|
||||
UI:setPage(page)
|
||||
UI:pullEvents()
|
||||
UI:start()
|
||||
|
Loading…
x
Reference in New Issue
Block a user