diff --git a/src/lib/HomeContext.hx b/src/lib/HomeContext.hx index 5a0cf67..ee81d26 100644 --- a/src/lib/HomeContext.hx +++ b/src/lib/HomeContext.hx @@ -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); } }