can now use named colors

This commit is contained in:
kepler155c@gmail.com
2020-04-21 22:32:53 -06:00
parent 949c485539
commit d17162b49d
14 changed files with 190 additions and 253 deletions

View File

@@ -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)

View File

@@ -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 })

View File

@@ -50,7 +50,7 @@ local setup = UI.SlideOut {
[[also have an introspection module.]],
},
statusBar = UI.StatusBar {
backgroundColor = UI.colors.primary,
backgroundColor = 'primary',
},
}