Ui enhancements 2.0 (#29)
* canvas overhaul * editor 2.0 * more tweaks * more editor work * completions + refactor * cleanup + editor additions * cleanup + undo overhaul * editor recent/peripherals/redo + cleanup * editor path issues * cleanup * changes for deprecated ui methods - recolor milo - make turtle scripts run again - mob rancher improvements * can now use named colors
This commit was merged in pull request #29.
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -41,7 +41,6 @@ function page:eventHandler(event)
|
||||
|
||||
elseif event.type == 'focus_change' then
|
||||
self.statusBar:setStatus(event.focused.help)
|
||||
self.statusBar:draw()
|
||||
|
||||
elseif event.type == 'success_message' then
|
||||
self.notification:success(event.message)
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
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,
|
||||
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,
|
||||
|
||||
@@ -9,7 +9,7 @@ local context = Milo:getContext()
|
||||
local resetTab = UI.Tab {
|
||||
tabTitle = 'Reset',
|
||||
index = 5,
|
||||
backgroundColor = colors.cyan,
|
||||
noFill = true,
|
||||
textArea = UI.TextArea {
|
||||
y = 2, ey = 6,
|
||||
textColor = colors.yellow,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
local Ansi = require('opus.ansi')
|
||||
local UI = require('opus.ui')
|
||||
|
||||
local colors = _G.colors
|
||||
local device = _G.device
|
||||
|
||||
--[[ Configuration Screen ]]
|
||||
local template =
|
||||
[[%sWarning%s
|
||||
|
||||
Must an interface for Refined Storage / Applied Energistics.
|
||||
|
||||
Add all speed upgrades possible.
|
||||
]]
|
||||
|
||||
local wizardPage = UI.WizardPage {
|
||||
title = 'Mass Storage',
|
||||
index = 2,
|
||||
backgroundColor = colors.cyan,
|
||||
[1] = UI.TextArea {
|
||||
x = 2, ex = -2, y = 2, ey = -2,
|
||||
value = string.format(template, Ansi.red, Ansi.reset),
|
||||
},
|
||||
}
|
||||
|
||||
function wizardPage:isValidFor(node)
|
||||
if node.mtype == 'storage' then
|
||||
local m = device[node.name]
|
||||
return m and m.listAvailableItems
|
||||
end
|
||||
end
|
||||
|
||||
function wizardPage:setNode(node)
|
||||
self.node = node
|
||||
end
|
||||
|
||||
function wizardPage:validate()
|
||||
self.node.adapterType = 'massAdapter'
|
||||
return true
|
||||
end
|
||||
|
||||
-- disable until a way is found to transfer between 2 non-transferrable nodes
|
||||
-- UI:getPage('nodeWizard').wizard:add({ inputChest = wizardPage })
|
||||
@@ -10,12 +10,11 @@ local STARTUP_FILE = 'usr/autorun/miloRemote.lua'
|
||||
local context = ({ ... })[1]
|
||||
|
||||
local setup = UI.SlideOut {
|
||||
backgroundColor = colors.cyan,
|
||||
titleBar = UI.TitleBar {
|
||||
title = 'Remote Setup',
|
||||
},
|
||||
form = UI.Form {
|
||||
x = 2, ex = -2, y = 2, ey = -1,
|
||||
y = 2, ey = -1,
|
||||
[1] = UI.TextEntry {
|
||||
formLabel = 'Server', formKey = 'server',
|
||||
help = 'ID for the server',
|
||||
@@ -40,18 +39,18 @@ local setup = UI.SlideOut {
|
||||
formLabel = 'Run on startup', formKey = 'runOnStartup',
|
||||
help = 'Run this program on startup'
|
||||
},
|
||||
info = UI.TextArea {
|
||||
x = 1, ex = -1, y = 6, ey = -4,
|
||||
textColor = colors.yellow,
|
||||
marginLeft = 0,
|
||||
marginRight = 0,
|
||||
value = [[The Milo turtle must connect to a manipulator with a ]] ..
|
||||
[[bound introspection module. The neural interface must ]] ..
|
||||
[[also have an introspection module.]],
|
||||
},
|
||||
},
|
||||
info = UI.TextArea {
|
||||
x = 2, ex = -2, y = 8, ey = -4,
|
||||
textColor = colors.yellow,
|
||||
marginLeft = 0,
|
||||
marginRight = 0,
|
||||
value = [[The Milo turtle must connect to a manipulator with a ]] ..
|
||||
[[bound introspection module. The neural interface must ]] ..
|
||||
[[also have an introspection module.]],
|
||||
},
|
||||
statusBar = UI.StatusBar {
|
||||
backgroundColor = colors.cyan,
|
||||
backgroundColor = '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,
|
||||
@@ -86,6 +85,7 @@ local function createPage(node)
|
||||
[1] = UI.Tab {
|
||||
tabTitle = 'Overview',
|
||||
backgroundColor = colors.black,
|
||||
noFill = true,
|
||||
onlineLabel = UI.Text {
|
||||
x = 2, y = 2,
|
||||
value = 'Storage Status',
|
||||
@@ -136,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 = {
|
||||
@@ -156,6 +158,7 @@ local function createPage(node)
|
||||
},
|
||||
[4] = UI.Tab {
|
||||
tabTitle = 'Offline',
|
||||
noFill = true,
|
||||
grid = UI.ScrollingGrid {
|
||||
y = 2,
|
||||
columns = {
|
||||
@@ -166,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