milo: text scaling + manipulator fixes

This commit is contained in:
kepler155c@gmail.com
2018-12-02 13:16:00 -05:00
parent 27c455ba16
commit 4b229b868e
3 changed files with 58 additions and 10 deletions

View File

@@ -15,13 +15,35 @@ local wizardPage = UI.Window {
index = 2,
backgroundColor = colors.cyan,
[1] = UI.TextArea {
x = 2, ex = -2, y = 2, ey = -2,
x = 2, ex = -2, y = 2, ey = 3,
marginRight = 0,
textColor = colors.yellow,
value = 'Displays the crafting progress.'
},
form = UI.Form {
x = 2, ex = -2, y = 4, ey = -2,
manualControls = true,
[1] = UI.Chooser {
width = 9,
formLabel = 'Font Size', formKey = 'textScale',
nochoice = 'Small',
choices = {
{ name = 'Small', value = .5, help = '(requires restart)', },
{ name = 'Large', value = 1, help = '(requires restart)', },
},
help = 'Adjust text scaling (requires restart)',
},
},
}
function wizardPage:setNode(node)
self.form:setValues(node)
end
function wizardPage:validate()
return self.form:save()
end
function wizardPage:isValidType(node)
local m = device[node.name]
return m and m.type == 'monitor' and {
@@ -44,7 +66,7 @@ local function createPage(node)
local page = UI.Page {
parent = UI.Device {
device = node.adapter,
textScale = .5,
textScale = node.textScale or .5,
},
grid = UI.Grid {
sortColumn = 'index',