Fixed default label not showing up on first boot

This commit is contained in:
LemADEC 2016-07-30 15:46:03 +02:00
parent c7ddb35a03
commit 15b645f2ba
5 changed files with 25 additions and 12 deletions

View file

@ -269,6 +269,7 @@ function readInputText(currentValue)
local inputAbort = false
local input = string.format(currentValue)
local x, y = term.getCursorPos()
Write(input)
os.pullEventRaw() -- skip first char event
repeat
ClearWarning()

View file

@ -291,6 +291,7 @@ function readInputText(currentValue)
local inputAbort = false
local input = string.format(currentValue)
local x, y = term.getCursorPos()
Write(input)
os.pullEventRaw() -- skip first char event
repeat
ClearWarning()
@ -904,8 +905,8 @@ function core_page_setMovement()
SetCursorPos(1, 3)
core_movement[1] = core_page_setDistanceAxis(2, "Forward" , "Front", "Back", core_movement[1], math.abs(core_front + core_back + 1))
core_movement[2] = core_page_setDistanceAxis(3, "Vertical", "Up" , "Down", core_movement[2], math.abs(core_up + core_down + 1))
core_movement[3] = core_page_setDistanceAxis(4, "Lateral" , "Right", "Left", core_movement[3], math.abs(core_left + core_right + 1))
core_movement[2] = core_page_setDistanceAxis(4, "Vertical", "Up" , "Down", core_movement[2], math.abs(core_up + core_down + 1))
core_movement[3] = core_page_setDistanceAxis(6, "Lateral" , "Right", "Left", core_movement[3], math.abs(core_left + core_right + 1))
core_movement = { ship.movement(core_movement[1], core_movement[2], core_movement[3]) }
end
@ -914,10 +915,13 @@ function core_page_setDistanceAxis(line, axis, positive, negative, userEntry, sh
if core_isInHyper and line ~= 3 then
maximumDistance = shipLength + 127 * 100
end
SetCursorPos(1, line + 1)
SetColorDisabled()
SetCursorPos(3, line + 1)
Write(positive .. " is " .. ( shipLength + 1) .. ", maximum is " .. maximumDistance .. " ")
SetCursorPos(1, line + 2)
SetCursorPos(3, line + 2)
Write(negative .. " is " .. (-shipLength - 1) .. ", maximum is " .. -maximumDistance .. " ")
SetColorDefault()
repeat
SetCursorPos(1, line)
Write(axis .. " movement: ")

View file

@ -269,6 +269,7 @@ function readInputText(currentValue)
local inputAbort = false
local input = string.format(currentValue)
local x, y = term.getCursorPos()
Write(input)
os.pullEventRaw() -- skip first char event
repeat
ClearWarning()
@ -611,8 +612,8 @@ function core_page_setMovement()
SetCursorPos(1, 3)
core_movement[1] = core_page_setDistanceAxis(2, "Forward" , "Front", "Back", core_movement[1], math.abs(core_front + core_back + 1))
core_movement[2] = core_page_setDistanceAxis(3, "Vertical", "Up" , "Down", core_movement[2], math.abs(core_up + core_down + 1))
core_movement[3] = core_page_setDistanceAxis(4, "Lateral" , "Right", "Left", core_movement[3], math.abs(core_left + core_right + 1))
core_movement[2] = core_page_setDistanceAxis(4, "Vertical", "Up" , "Down", core_movement[2], math.abs(core_up + core_down + 1))
core_movement[3] = core_page_setDistanceAxis(6, "Lateral" , "Right", "Left", core_movement[3], math.abs(core_left + core_right + 1))
core_movement = { ship.movement(core_movement[1], core_movement[2], core_movement[3]) }
end
@ -621,10 +622,13 @@ function core_page_setDistanceAxis(line, axis, positive, negative, userEntry, sh
if core_isInHyper and line ~= 3 then
maximumDistance = shipLength + 127 * 100
end
SetCursorPos(1, line + 1)
SetColorDisabled()
SetCursorPos(3, line + 1)
Write(positive .. " is " .. ( shipLength + 1) .. ", maximum is " .. maximumDistance .. " ")
SetCursorPos(1, line + 2)
SetCursorPos(3, line + 2)
Write(negative .. " is " .. (-shipLength - 1) .. ", maximum is " .. -maximumDistance .. " ")
SetColorDefault()
repeat
SetCursorPos(1, line)
Write(axis .. " movement: ")

View file

@ -269,6 +269,7 @@ function readInputText(currentValue)
local inputAbort = false
local input = string.format(currentValue)
local x, y = term.getCursorPos()
Write(input)
os.pullEventRaw() -- skip first char event
repeat
ClearWarning()

View file

@ -564,8 +564,8 @@ function core_page_setMovement()
SetCursorPos(1, 3)
core_movement[1] = core_page_setDistanceAxis(2, "Forward" , "Front", "Back", core_movement[1], math.abs(core_front + core_back + 1))
core_movement[2] = core_page_setDistanceAxis(3, "Vertical", "Up" , "Down", core_movement[2], math.abs(core_up + core_down + 1))
core_movement[3] = core_page_setDistanceAxis(4, "Lateral" , "Right", "Left", core_movement[3], math.abs(core_left + core_right + 1))
core_movement[2] = core_page_setDistanceAxis(4, "Vertical", "Up" , "Down", core_movement[2], math.abs(core_up + core_down + 1))
core_movement[3] = core_page_setDistanceAxis(6, "Lateral" , "Right", "Left", core_movement[3], math.abs(core_left + core_right + 1))
core_movement = { ship.movement(core_movement[1], core_movement[2], core_movement[3]) }
end
@ -574,10 +574,13 @@ function core_page_setDistanceAxis(line, axis, positive, negative, userEntry, sh
if core_isInHyper and line ~= 3 then
maximumDistance = shipLength + 127 * 100
end
SetCursorPos(1, line + 1)
SetColorDisabled()
SetCursorPos(3, line + 1)
Write(positive .. " is " .. ( shipLength + 1) .. ", maximum is " .. maximumDistance .. " ")
SetCursorPos(1, line + 2)
SetCursorPos(3, line + 2)
Write(negative .. " is " .. (-shipLength - 1) .. ", maximum is " .. -maximumDistance .. " ")
SetColorDefault()
repeat
SetCursorPos(1, line)
Write(axis .. " movement: ")