1
0
mirror of https://github.com/kepler155c/opus synced 2024-06-18 11:20:01 +00:00

ui improvements - disable shell scrolling

This commit is contained in:
kepler155c@gmail.com 2018-10-24 06:50:16 -04:00
parent adc5eb286d
commit 605e923d48
3 changed files with 8 additions and 2 deletions

View File

@ -3261,6 +3261,8 @@ function UI.Form:save()
if (child.pruneEmpty and type(child.value) == 'string' and #child.value == 0) or
(child.pruneEmpty and type(child.value) == 'boolean' and not child.value) then
self.values[child.formKey] = nil
elseif child.validate == 'numeric' then
self.values[child.formKey] = tonumber(child.value)
else
self.values[child.formKey] = child.value
end

View File

@ -365,7 +365,7 @@ local term = _G.term
local textutils = _G.textutils
local terminal = term.current()
Terminal.scrollable(terminal, 100)
--Terminal.scrollable(terminal, 100)
terminal.noAutoScroll = true
local config = {

View File

@ -32,6 +32,7 @@ local config = {
backgroundColor = colors.gray,
tabBarBackgroundColor = colors.gray,
focusBackgroundColor = colors.gray,
errorColor = colors.red,
},
color = {
textColor = colors.lightGray,
@ -40,6 +41,7 @@ local config = {
backgroundColor = colors.gray,
tabBarBackgroundColor = colors.gray,
focusBackgroundColor = colors.gray,
errorColor = colors.black,
},
}
Config.load('multishell', config)
@ -129,6 +131,7 @@ function multishell.openTab(tab)
print('\nPress enter to close')
routine.isDead = true
routine.hidden = false
redrawMenu()
while true do
local e, code = os.pullEventRaw('key')
if e == 'terminate' or e == 'key' and code == keys.enter then
@ -252,8 +255,9 @@ kernel.hook('multishell_redraw', function()
tab.ex = tabX + tab.width
tabX = tabX + tab.width
if tab ~= currentTab then
local textColor = tab.isDead and _colors.errorColor or _colors.textColor
write(tab.sx, tab.title:sub(1, tab.width - 1),
_colors.backgroundColor, _colors.textColor)
_colors.backgroundColor, textColor)
end
end
end