Fixed starting message.
This commit is contained in:
parent
e175f78431
commit
c833571bbc
|
@ -273,17 +273,17 @@ local function handleSchematicUrl(url)
|
|||
os.sleep(2)
|
||||
return
|
||||
end
|
||||
g.drawText(mon, 1, 8, "Fetching item lists from URL...", colors.lightGray, colors.black)
|
||||
g.drawText(mon, 1, 7, "Fetching item lists from URL...", colors.lightGray, colors.black)
|
||||
local itemLists, err = fetchItemLists(url)
|
||||
if not itemLists then
|
||||
g.drawText(mon, 1, 9, "Failed to fetch item lists.", colors.red, colors.black)
|
||||
g.drawText(mon, 1, 10, err, colors.red, colors.black)
|
||||
g.drawText(mon, 1, 8, "Failed to fetch item lists.", colors.red, colors.black)
|
||||
g.drawText(mon, 1, 9, err, colors.red, colors.black)
|
||||
os.sleep(3)
|
||||
return
|
||||
end
|
||||
|
||||
g.drawText(mon, 1, 9, "Got lists for "..(#itemLists).." schematics:", colors.white, colors.black)
|
||||
local y = 10
|
||||
g.drawText(mon, 1, 8, "Got lists for "..(#itemLists).." schematics:", colors.white, colors.black)
|
||||
local y = 9
|
||||
for i, itemList in pairs(itemLists) do
|
||||
local count = itemList.__COUNT__
|
||||
local name = itemList.__NAME__
|
||||
|
@ -298,14 +298,16 @@ local function handleSchematicUrl(url)
|
|||
-- Draw continue and cancel buttons and wait for user input.
|
||||
g.fillRect(mon, 1, H-2, 18, 3, colors.gray)
|
||||
g.drawTextCenter(mon, 9, H-1, "Cancel", colors.white)
|
||||
g.fillRect(mon, 19, H-2, 20, 3, colors.green)
|
||||
g.fillRect(mon, 19, H-2, 21, 3, colors.green)
|
||||
g.drawTextCenter(mon, 29, H-1, "Continue", colors.white)
|
||||
local waiting = true
|
||||
while waiting do
|
||||
local event, monName, x, y = os.pullEvent("monitor_touch")
|
||||
if monName == "monitor_24" and y >= H-2 then
|
||||
if x <= 18 then
|
||||
-- Canceled, so quit the whole application.
|
||||
playNotes("harp", {12, 8})
|
||||
RUNNING = false
|
||||
return
|
||||
else
|
||||
playNotes("bell", {12, 16})
|
||||
|
@ -337,7 +339,12 @@ local function handleSchematicUrl(url)
|
|||
g.drawText(mon, 17, H-1, "Report", colors.white)
|
||||
g.fillRect(mon, 27, H-2, 13, 3, colors.red)
|
||||
g.drawText(mon, 31, H-1, "Quit", colors.white)
|
||||
os.sleep(3)
|
||||
|
||||
for i = 1, 5 do
|
||||
g.drawText(mon, 1, H-4, "Starting in "..(5-i+1), colors.white, colors.black)
|
||||
os.sleep(1)
|
||||
end
|
||||
|
||||
EXPORTING = true
|
||||
local fExport = function() exportSchematics(itemLists) end
|
||||
local fHandleEvents = function() handleExportEvents() end
|
||||
|
|
Loading…
Reference in New Issue