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