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:
@@ -1,6 +1,6 @@
|
||||
local Craft = require('milo.craft2')
|
||||
local Event = require('opus.event')
|
||||
local fuzzy = require('milo.fuzzyMatch')
|
||||
local fuzzy = require('opus.fuzzy')
|
||||
local Milo = require('milo')
|
||||
local Sound = require('opus.sound')
|
||||
local UI = require('opus.ui')
|
||||
@@ -54,8 +54,8 @@ local page = UI.Page {
|
||||
limit = 50,
|
||||
shadowText = 'filter',
|
||||
shadowTextColor = colors.gray,
|
||||
backgroundColor = colors.cyan,
|
||||
backgroundFocusColor = colors.cyan,
|
||||
backgroundColor = 'primary',
|
||||
backgroundFocusColor = '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 = '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 = 'primary',
|
||||
backgroundFocusColor = '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,11 @@ The settings will take effect immediately!]],
|
||||
},
|
||||
},
|
||||
statusBar = UI.StatusBar {
|
||||
backgroundColor = colors.cyan,
|
||||
backgroundColor = 'primary',
|
||||
},
|
||||
notification = UI.Notification { },
|
||||
filter = UI.SlideOut {
|
||||
backgroundColor = colors.cyan,
|
||||
noFill = true,
|
||||
menuBar = UI.MenuBar {
|
||||
buttons = {
|
||||
{ text = 'Save', event = 'save' },
|
||||
@@ -248,7 +246,8 @@ The settings will take effect immediately!]],
|
||||
},
|
||||
},
|
||||
grid = UI.ScrollingGrid {
|
||||
x = 2, ex = -6, y = 2, ey = -6,
|
||||
x = 2, ex = -6, y = 3, ey = -7,
|
||||
disableHeader = true,
|
||||
columns = {
|
||||
{ heading = 'Name', key = 'displayName' },
|
||||
},
|
||||
@@ -262,7 +261,7 @@ The settings will take effect immediately!]],
|
||||
text = '-', event = 'remove_entry', help = 'Remove',
|
||||
},
|
||||
form = UI.Form {
|
||||
x = 2, y = -4, height = 3,
|
||||
x = 2, y = -5, height = 3,
|
||||
margin = 1,
|
||||
manualControls = true,
|
||||
[1] = UI.Checkbox {
|
||||
@@ -290,7 +289,7 @@ The settings will take effect immediately!]],
|
||||
},
|
||||
},
|
||||
statusBar = UI.StatusBar {
|
||||
backgroundColor = colors.cyan,
|
||||
backgroundColor = 'primary',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user