changes for deprecated ui methods - recolor milo - make turtle scripts run again - mob rancher improvements
This commit is contained in:
@@ -216,7 +216,7 @@ _G._syslog = function(...)
|
||||
end
|
||||
|
||||
local s, m = pcall(function()
|
||||
UI:pullEvents()
|
||||
UI:start()
|
||||
end)
|
||||
|
||||
turtle.setStatus('idle')
|
||||
|
||||
@@ -63,8 +63,8 @@ local page = UI.Page {
|
||||
x = 1, ex = -13,
|
||||
limit = 50,
|
||||
shadowText = 'filter',
|
||||
backgroundColor = colors.cyan,
|
||||
backgroundFocusColor = colors.cyan,
|
||||
backgroundColor = UI.colors.primary,
|
||||
backgroundFocusColor = UI.colors.primary,
|
||||
accelerators = {
|
||||
[ 'enter' ] = 'eject',
|
||||
[ 'up' ] = 'grid_up',
|
||||
@@ -169,7 +169,7 @@ end
|
||||
|
||||
function page:eventHandler(event)
|
||||
if event.type == 'quit' then
|
||||
UI:exitPullEvents()
|
||||
UI:quit()
|
||||
|
||||
elseif event.type == 'setup' then
|
||||
self.setup.form:setValues(context.state)
|
||||
@@ -524,7 +524,7 @@ local programDir = fs.getDir(shell.getRunningProgram())
|
||||
loadDirectory(fs.combine(programDir, 'plugins/remote'))
|
||||
|
||||
UI:setPage(page)
|
||||
UI:pullEvents()
|
||||
UI:start()
|
||||
|
||||
if context.socket then
|
||||
context.socket:close()
|
||||
|
||||
@@ -54,8 +54,8 @@ local page = UI.Page {
|
||||
limit = 50,
|
||||
shadowText = 'filter',
|
||||
shadowTextColor = colors.gray,
|
||||
backgroundColor = colors.cyan,
|
||||
backgroundFocusColor = colors.cyan,
|
||||
backgroundColor = UI.colors.primary,
|
||||
backgroundFocusColor = UI.colors.primary,
|
||||
accelerators = {
|
||||
[ 'enter' ] = 'eject',
|
||||
[ 'up' ] = 'grid_up',
|
||||
@@ -66,7 +66,7 @@ local page = UI.Page {
|
||||
storageStatus = UI.Text {
|
||||
x = -17, ex = -10,
|
||||
textColor = colors.lime,
|
||||
backgroundColor = colors.cyan,
|
||||
backgroundColor = UI.colors.primary,
|
||||
value = '',
|
||||
},
|
||||
amount = UI.TextEntry {
|
||||
@@ -208,7 +208,7 @@ end
|
||||
|
||||
function page:eventHandler(event)
|
||||
if event.type == 'quit' then
|
||||
UI:exitPullEvents()
|
||||
UI:quit()
|
||||
|
||||
elseif event.type == 'eject' or event.type == 'grid_select' then
|
||||
self:eject(1)
|
||||
|
||||
@@ -7,7 +7,6 @@ local Util = require('opus.util')
|
||||
|
||||
local colors = _G.colors
|
||||
local device = _G.device
|
||||
local turtle = _G.turtle
|
||||
|
||||
local context = Milo:getContext()
|
||||
|
||||
@@ -22,8 +21,8 @@ local networkPage = UI.Page {
|
||||
y = -2, x = 1, ex = -9,
|
||||
limit = 50,
|
||||
shadowText = 'filter',
|
||||
backgroundColor = colors.cyan,
|
||||
backgroundFocusColor = colors.cyan,
|
||||
backgroundColor = UI.colors.primary,
|
||||
backgroundFocusColor = UI.colors.primary,
|
||||
},
|
||||
grid = UI.ScrollingGrid {
|
||||
y = 2, ey = -3,
|
||||
@@ -195,7 +194,6 @@ nodeWizard = UI.Page {
|
||||
pages = {
|
||||
general = UI.WizardPage {
|
||||
index = 1,
|
||||
backgroundColor = colors.cyan,
|
||||
form = UI.Form {
|
||||
x = 2, ex = -2, y = 1, ey = 3,
|
||||
manualControls = true,
|
||||
@@ -236,11 +234,10 @@ The settings will take effect immediately!]],
|
||||
},
|
||||
},
|
||||
statusBar = UI.StatusBar {
|
||||
backgroundColor = colors.cyan,
|
||||
backgroundColor = UI.colors.primary,
|
||||
},
|
||||
notification = UI.Notification { },
|
||||
filter = UI.SlideOut {
|
||||
backgroundColor = colors.cyan,
|
||||
noFill = true,
|
||||
menuBar = UI.MenuBar {
|
||||
buttons = {
|
||||
@@ -292,7 +289,7 @@ The settings will take effect immediately!]],
|
||||
},
|
||||
},
|
||||
statusBar = UI.StatusBar {
|
||||
backgroundColor = colors.cyan,
|
||||
backgroundColor = UI.colors.primary,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ Right-clicking on the activity monitor will reset the totals.]]
|
||||
local wizardPage = UI.WizardPage {
|
||||
title = 'Activity Monitor',
|
||||
index = 2,
|
||||
backgroundColor = colors.cyan,
|
||||
[1] = UI.TextArea {
|
||||
x = 2, ex = -2, y = 2, ey = 6,
|
||||
marginRight = 0,
|
||||
|
||||
@@ -3,7 +3,6 @@ local Event = require('opus.event')
|
||||
local Milo = require('milo')
|
||||
local UI = require('opus.ui')
|
||||
|
||||
local colors = _G.colors
|
||||
local device = _G.device
|
||||
local fs = _G.fs
|
||||
local os = _G.os
|
||||
@@ -23,7 +22,6 @@ Backup configuration files each minecraft day.
|
||||
local wizardPage = UI.WizardPage {
|
||||
title = 'Backup Drive',
|
||||
index = 2,
|
||||
backgroundColor = colors.cyan,
|
||||
[1] = UI.TextArea {
|
||||
x = 2, ex = -2, y = 2, ey = -2,
|
||||
value = string.format(template, Ansi.yellow, Ansi.reset),
|
||||
|
||||
@@ -18,7 +18,6 @@ Note that you do not need to import items from the brewing stand or export blaze
|
||||
local wizardPage = UI.WizardPage {
|
||||
title = 'Brewing Stand',
|
||||
index = 2,
|
||||
backgroundColor = colors.cyan,
|
||||
[1] = UI.TextArea {
|
||||
x = 2, ex = -2, y = 2, ey = -2,
|
||||
value = string.format(template, Ansi.yellow, Ansi.reset),
|
||||
|
||||
@@ -4,12 +4,10 @@ local itemDB = require('core.itemDB')
|
||||
|
||||
local colors = _G.colors
|
||||
local device = _G.device
|
||||
local context = Milo:getContext()
|
||||
|
||||
local wizardPage = UI.WizardPage {
|
||||
title = 'Level Emitter',
|
||||
index = 2,
|
||||
backgroundColor = colors.cyan,
|
||||
[1] = UI.TextArea {
|
||||
x = 2, y = 1,
|
||||
height = 2,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
local Ansi = require('opus.ansi')
|
||||
local UI = require('opus.ui')
|
||||
|
||||
local colors = _G.colors
|
||||
local device = _G.device
|
||||
|
||||
--[[ Configuration Screen ]]
|
||||
@@ -14,7 +13,6 @@ Any items placed in this chest will be imported into storage.
|
||||
local inputChestWizardPage = UI.WizardPage {
|
||||
title = 'Input Chest',
|
||||
index = 2,
|
||||
backgroundColor = colors.cyan,
|
||||
[1] = UI.TextArea {
|
||||
x = 2, ex = -2, y = 2, ey = -2,
|
||||
value = string.format(template, Ansi.yellow, Ansi.reset),
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
local Ansi = require('opus.ansi')
|
||||
local UI = require('opus.ui')
|
||||
|
||||
local colors = _G.colors
|
||||
|
||||
local infoTab = UI.Tab {
|
||||
tabTitle = 'Info',
|
||||
index = 4,
|
||||
backgroundColor = colors.cyan,
|
||||
textArea = UI.TextArea {
|
||||
x = 2, ex = -2, y = 2, ey = -2,
|
||||
},
|
||||
|
||||
@@ -9,7 +9,6 @@ local context = Milo:getContext()
|
||||
local machinesTab = UI.Tab {
|
||||
tabTitle = 'Machine',
|
||||
index = 3,
|
||||
backgroundColor = colors.cyan,
|
||||
grid = UI.ScrollingGrid {
|
||||
x = 2, ex = -2, y = 2, ey = -2,
|
||||
disableHeader = true,
|
||||
|
||||
@@ -3,12 +3,9 @@ local itemDB = require('core.itemDB')
|
||||
local Milo = require('milo')
|
||||
local UI = require('opus.ui')
|
||||
|
||||
local colors = _G.colors
|
||||
|
||||
local recipeTab = UI.Tab {
|
||||
tabTitle = 'Recipe',
|
||||
index = 2,
|
||||
backgroundColor = colors.cyan,
|
||||
grid = UI.ScrollingGrid {
|
||||
x = 2, ex = -2, y = 2, ey = -4,
|
||||
disableHeader = true,
|
||||
|
||||
@@ -15,7 +15,6 @@ local os = _G.os
|
||||
local wizardPage = UI.WizardPage {
|
||||
title = 'Crafting Monitor',
|
||||
index = 2,
|
||||
backgroundColor = colors.cyan,
|
||||
[1] = UI.TextArea {
|
||||
x = 2, ex = -2, y = 2, ey = 3,
|
||||
marginRight = 0,
|
||||
|
||||
@@ -10,7 +10,6 @@ local STARTUP_FILE = 'usr/autorun/miloRemote.lua'
|
||||
local context = ({ ... })[1]
|
||||
|
||||
local setup = UI.SlideOut {
|
||||
backgroundColor = colors.cyan,
|
||||
titleBar = UI.TitleBar {
|
||||
title = 'Remote Setup',
|
||||
},
|
||||
@@ -51,7 +50,7 @@ local setup = UI.SlideOut {
|
||||
[[also have an introspection module.]],
|
||||
},
|
||||
statusBar = UI.StatusBar {
|
||||
backgroundColor = colors.cyan,
|
||||
backgroundColor = UI.colors.primary,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ end
|
||||
local wizardPage = UI.WizardPage {
|
||||
title = 'Speaker',
|
||||
index = 2,
|
||||
backgroundColor = colors.cyan,
|
||||
[1] = UI.Text {
|
||||
x = 2, y = 2,
|
||||
textColor = colors.yellow,
|
||||
|
||||
@@ -18,7 +18,6 @@ Right-clicking on the activity monitor will reset the totals.]]
|
||||
local wizardPage = UI.WizardPage {
|
||||
title = 'Status Monitor',
|
||||
index = 2,
|
||||
backgroundColor = colors.cyan,
|
||||
[1] = UI.TextArea {
|
||||
x = 2, ex = -2, y = 2, ey = 6,
|
||||
marginRight = 0,
|
||||
@@ -137,12 +136,14 @@ local function createPage(node)
|
||||
},
|
||||
[2] = UI.Tab {
|
||||
tabTitle = 'Stats',
|
||||
noFill = true,
|
||||
textArea = UI.TextArea {
|
||||
y = 3,
|
||||
},
|
||||
},
|
||||
[3] = UI.Tab {
|
||||
tabTitle = 'Storage',
|
||||
noFill = true,
|
||||
grid = UI.ScrollingGrid {
|
||||
y = 2,
|
||||
columns = {
|
||||
@@ -157,6 +158,7 @@ local function createPage(node)
|
||||
},
|
||||
[4] = UI.Tab {
|
||||
tabTitle = 'Offline',
|
||||
noFill = true,
|
||||
grid = UI.ScrollingGrid {
|
||||
y = 2,
|
||||
columns = {
|
||||
@@ -167,12 +169,14 @@ local function createPage(node)
|
||||
},
|
||||
[5] = UI.Tab {
|
||||
tabTitle = 'Activity',
|
||||
noFill = true,
|
||||
term = UI.Embedded {
|
||||
--visible = true,
|
||||
},
|
||||
},
|
||||
[6] = UI.Tab {
|
||||
tabTitle = 'Tasks',
|
||||
noFill = true,
|
||||
grid = UI.ScrollingGrid {
|
||||
y = 2,
|
||||
values = context.tasks,
|
||||
|
||||
@@ -7,7 +7,6 @@ local device = _G.device
|
||||
local storageView = UI.WizardPage {
|
||||
title = 'Storage Options - General',
|
||||
index = 2,
|
||||
backgroundColor = colors.cyan,
|
||||
form = UI.Form {
|
||||
x = 2, ex = -2, y = 1, ey = -2,
|
||||
manualControls = true,
|
||||
@@ -62,7 +61,6 @@ UI:getPage('nodeWizard').wizard:add({ storageGeneral = storageView })
|
||||
local lockView = UI.WizardPage {
|
||||
title = 'Storage Options - Locking',
|
||||
index = 3,
|
||||
backgroundColor = colors.cyan,
|
||||
form = UI.Form {
|
||||
x = 2, ex = -2, y = 1, ey = 3,
|
||||
manualControls = true,
|
||||
|
||||
@@ -12,7 +12,6 @@ local context = Milo:getContext()
|
||||
local wizardPage = UI.WizardPage {
|
||||
title = 'Transfer Inventory',
|
||||
index = 2,
|
||||
backgroundColor = colors.cyan,
|
||||
grid = UI.ScrollingGrid {
|
||||
y = 2, ey = -2,
|
||||
values = context.storage.nodes,
|
||||
|
||||
@@ -9,7 +9,6 @@ local device = _G.device
|
||||
local wizardPage = UI.WizardPage {
|
||||
title = 'Trashcan',
|
||||
index = 2,
|
||||
backgroundColor = colors.cyan,
|
||||
info = UI.TextArea {
|
||||
x = 1, ex = -1, y = 2, ey = 4,
|
||||
textColor = colors.yellow,
|
||||
|
||||
Reference in New Issue
Block a user