use simple list renderer in HomeContext
This commit is contained in:
parent
9e128eaad2
commit
a1ce5957d1
@ -1,5 +1,6 @@
|
|||||||
package lib;
|
package lib;
|
||||||
|
|
||||||
|
import lib.ui.rendere.List;
|
||||||
import kernel.KernelEvents;
|
import kernel.KernelEvents;
|
||||||
import bin.Terminal;
|
import bin.Terminal;
|
||||||
import kernel.ui.WindowManager;
|
import kernel.ui.WindowManager;
|
||||||
@ -93,13 +94,9 @@ class HomeContext {
|
|||||||
ctx.clear();
|
ctx.clear();
|
||||||
ctx.setCursorPos(0,0);
|
ctx.setCursorPos(0,0);
|
||||||
|
|
||||||
for(i in 0...MAX_CONTEXT){
|
var list = [for (i in 0...MAX_CONTEXT) workspaces.exists(i) ? 'Switch to context ${i}' : 'Create new Terminal on context ${i}'];
|
||||||
ctx.setCursorPos(0,i);
|
var listRenderer = new List();
|
||||||
if (workspaces.exists(i)) {
|
|
||||||
ctx.write("Switch to context " + i);
|
listRenderer.render(list).renderToContext(ctx);
|
||||||
}else{
|
|
||||||
ctx.write("Create new Terminal on context " + i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user