mirror of
https://github.com/LDDestroier/CC/
synced 2025-02-07 14:40:03 +00:00
Update workspace.lua
This commit is contained in:
parent
d416695866
commit
055fda579c
@ -67,8 +67,10 @@ local drawWorkspaceIndicator = function(terminal)
|
|||||||
if instances[y][x] then
|
if instances[y][x] then
|
||||||
if focus[1] == x and focus[2] == y then
|
if focus[1] == x and focus[2] == y then
|
||||||
term.blit(" ", "8", "8")
|
term.blit(" ", "8", "8")
|
||||||
else
|
elseif instances[y][x].active then
|
||||||
term.blit(" ", "7", "7")
|
term.blit(" ", "7", "7")
|
||||||
|
else
|
||||||
|
term.blit(" ", "f", "f")
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
term.blit(" ", "0", "0")
|
term.blit(" ", "0", "0")
|
||||||
@ -574,6 +576,7 @@ local newInstance = function(x, y, program, initialStart)
|
|||||||
instances[y][x] = {
|
instances[y][x] = {
|
||||||
x = x,
|
x = x,
|
||||||
y = y,
|
y = y,
|
||||||
|
active = initialStart,
|
||||||
co = coroutine.create(function()
|
co = coroutine.create(function()
|
||||||
term.redirect(window.handle)
|
term.redirect(window.handle)
|
||||||
local evt
|
local evt
|
||||||
@ -587,6 +590,7 @@ local newInstance = function(x, y, program, initialStart)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
instances[y][x].active = false
|
||||||
term.clear()
|
term.clear()
|
||||||
term.setCursorBlink(false)
|
term.setCursorBlink(false)
|
||||||
cwrite("This workspace is inactive.", 0 + scr_y / 2)
|
cwrite("This workspace is inactive.", 0 + scr_y / 2)
|
||||||
@ -604,6 +608,8 @@ local newInstance = function(x, y, program, initialStart)
|
|||||||
term.clear()
|
term.clear()
|
||||||
term.setCursorBlink(true)
|
term.setCursorBlink(true)
|
||||||
|
|
||||||
|
instances[y][x].active = true
|
||||||
|
|
||||||
if not initialStart then
|
if not initialStart then
|
||||||
if not program or type(program) == "string" then
|
if not program or type(program) == "string" then
|
||||||
shell.run(program or defaultProgram)
|
shell.run(program or defaultProgram)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user