public void buildPathListFromPath(PathTree child, ref float startY, ref float startX) { UIPathTreeText now = new UIPathTreeText(this, child); now.Left.Set(startX, 0); /*now.Top.Set(startY, 0); * startY = startY + 12f;*/ startX = startX + 4f; if (now.tree.SimpleEquals(selected)) { now.TextColor = Color.LimeGreen; } internalGrid.Add(now); if (child.isOpen) { List <String> keys = new List <string>(); keys.AddRange(child.tree.Keys); keys.Sort(); foreach (String key in keys) { buildPathListFromPath(child.tree[key], ref startY, ref startX); startX -= 4; } } }
private void buildPathList() { internalGrid.Clear(); internalGrid.Left.Set(2, 0); internalGrid.Top.Set(2, 0); internalGrid.Width.Set(0, 1.0f); internalGrid.Height.Set(0, 1.0f); float startX = 2; float startY = 2; UIPathTreeText all = new UIPathTreeText(this, allTree); all.Left.Set(startX, 0); /*all.Top.Set(startY, 0); * startY = startY + 12f;*/ if (selected == null) { selected = allTree; } if (all.tree.SimpleEquals(selected)) { all.TextColor = Color.LimeGreen; } internalGrid.Add(all); List <String> keys = new List <string>(); keys.AddRange(paths.tree.Keys); keys.Sort(); foreach (String key in keys) { buildPathListFromPath(paths.tree[key], ref startY, ref startX); startX -= 4; } Recalculate(); internalGrid.RecalculateChildren(); hasChanged = false; }