bright-gpu-74537
07/10/2020, 1:48 PMbright-gpu-74537
07/10/2020, 1:49 PMfast-rain-20339
07/10/2020, 1:49 PMfast-rain-20339
07/10/2020, 1:49 PMbright-gpu-74537
07/10/2020, 1:49 PMfast-rain-20339
07/10/2020, 1:52 PMfast-rain-20339
07/10/2020, 1:52 PMfast-rain-20339
07/10/2020, 1:52 PMfast-rain-20339
07/10/2020, 1:53 PMnew HaxeUIApp()
fast-rain-20339
07/10/2020, 1:53 PMbright-gpu-74537
07/10/2020, 2:04 PMbright-gpu-74537
07/10/2020, 2:04 PMbright-gpu-74537
07/10/2020, 2:04 PMfast-rain-20339
07/10/2020, 2:04 PMfast-rain-20339
07/11/2020, 7:11 AMfast-rain-20339
07/11/2020, 7:12 AMhandsome-television-62908
07/11/2020, 8:37 AMfast-rain-20339
07/11/2020, 8:37 AMfast-rain-20339
07/11/2020, 8:38 AMhandsome-television-62908
07/11/2020, 8:40 AMhandsome-television-62908
07/11/2020, 8:40 AMfast-rain-20339
07/11/2020, 8:40 AMhandsome-television-62908
07/11/2020, 8:41 AMfast-rain-20339
07/11/2020, 8:43 AMhandsome-television-62908
07/11/2020, 8:49 AMhaxe
typedef FileNode = { children:Array<FileNode>, location:String };
function buildTree(item:FileNode, offset:Int) {
var el:Component;
if (item.children.length != 0) {
el = new VBox();
// add style here that adds padding left = offset
for (file in item.children) el.addComponent(buildTree(file, offset));
} else {
el = buildItem(location);
}
return el;
}
Literally wrote this in here so it sucks but that's my first idea lol. You'd just pass in your file structure to build the tree and obviously need to remove the indentation from the first VBoxfast-rain-20339
07/11/2020, 8:50 AMhandsome-television-62908
07/11/2020, 8:51 AMfast-rain-20339
07/11/2020, 8:51 AMbright-gpu-74537
07/11/2020, 9:31 AMfast-rain-20339
07/11/2020, 9:32 AM