2021-03-03 15:40:19 -05:00
|
|
|
--Update to Seth-Bling's MarI/O app
|
2021-04-29 20:19:56 -04:00
|
|
|
local gui = gui
|
2021-03-03 15:40:19 -05:00
|
|
|
|
2021-03-22 18:53:13 -04:00
|
|
|
local base = string.gsub(@@LUA_SCRIPT_FILENAME@@, "(.*[/\\])(.*)", "%1")
|
2021-03-05 19:53:44 -05:00
|
|
|
|
2021-04-09 15:06:55 -04:00
|
|
|
local pool = dofile(base.."/pool.lua")
|
2021-03-06 07:36:58 -05:00
|
|
|
|
2021-04-09 15:06:55 -04:00
|
|
|
local statusLine = nil
|
|
|
|
local statusColor = 0x0000ff00
|
2021-03-07 02:36:09 -05:00
|
|
|
|
2021-04-09 15:06:55 -04:00
|
|
|
pool.onMessage(function(msg, color)
|
|
|
|
print(msg)
|
|
|
|
statusLine = msg
|
|
|
|
statusColor = color
|
|
|
|
end)
|
2021-03-05 10:10:05 -05:00
|
|
|
|
2021-04-09 15:06:55 -04:00
|
|
|
local guiHeight = 0
|
|
|
|
local guiWidth = 0
|
|
|
|
pool.onRenderForm(function(form)
|
2021-03-05 18:17:35 -05:00
|
|
|
guiWidth, guiHeight = gui.resolution()
|
2021-04-09 15:06:55 -04:00
|
|
|
gui.left_gap(500)
|
2021-03-05 18:17:35 -05:00
|
|
|
gui.top_gap(0)
|
|
|
|
gui.bottom_gap(0)
|
|
|
|
gui.right_gap(0)
|
2021-04-09 15:06:55 -04:00
|
|
|
form:draw(-500, 0)
|
2021-03-03 15:40:19 -05:00
|
|
|
|
2021-04-09 15:06:55 -04:00
|
|
|
if statusLine ~= nil then
|
|
|
|
gui.rectangle(-500, guiHeight - 20, 0, 20, 1, 0x00000000, statusColor)
|
|
|
|
gui.text(-500, guiHeight - 20, statusLine, 0x00000000)
|
2021-03-05 18:17:35 -05:00
|
|
|
end
|
2021-04-09 15:06:55 -04:00
|
|
|
end)
|
2021-05-01 19:39:35 -04:00
|
|
|
|
|
|
|
pool.run():next(function()
|
|
|
|
print("The pool finished running!!!")
|
|
|
|
end):catch(function(error)
|
|
|
|
io.stderr:write(string.format("There was a problem running the pool: %s", error))
|
|
|
|
print(string.format("There was a problem running the pool: %s", error))
|
|
|
|
end)
|