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