diff --git a/src/lib/ui/rendere/List.hx b/src/lib/ui/rendere/List.hx new file mode 100644 index 0000000..f0d15be --- /dev/null +++ b/src/lib/ui/rendere/List.hx @@ -0,0 +1,20 @@ +package lib.ui.rendere; + +class List { + public function new() {} + + public function render(list:Array): Canvas { + var canvas = new Canvas(); + for (line in 0...list.length) { + for (char in 0...list[line].length) { + var c = list[line].charAt(char); + canvas.set({x: char, y: line}, { + char: c, + textColor: Color.White, + bg: Color.Black, + }); + } + } + return canvas; + } +}