private void showTab(ValueChangedEvent <Tab> tabChanged) { tabContentContainer.Children.ForEach(tab => tab.Hide()); switch (tabChanged.NewValue) { case Tab.Properties: propertyDisplay.Show(); break; case Tab.Transforms: transformDisplay.Show(); break; } }
public DrawVisualiser() { RelativeSizeAxes = Axes.Both; Children = new Drawable[] { overlay = new InfoOverlay(), treeContainer = new TreeContainer { State = { BindTarget = State }, ChooseTarget = () => { Searching = true; Target = null; }, GoUpOneParent = delegate { Drawable lastHighlight = highlightedTarget?.Target; var parent = Target?.Parent; if (parent != null) { var lastVisualiser = targetVisualiser; Target = parent; lastVisualiser.SetContainer(targetVisualiser); targetVisualiser.Expand(); } // Rehighlight the last highlight if (lastHighlight != null) { VisualisedDrawable visualised = targetVisualiser.FindVisualisedDrawable(lastHighlight); if (visualised != null) { propertyDisplay.Show(); setHighlight(visualised); } } }, ToggleProperties = delegate { if (targetVisualiser == null) { return; } propertyDisplay.ToggleVisibility(); if (propertyDisplay.State.Value == Visibility.Visible) { setHighlight(targetVisualiser); } }, }, new CursorContainer() }; propertyDisplay = treeContainer.PropertyDisplay; propertyDisplay.State.ValueChanged += v => { switch (v.NewValue) { case Visibility.Hidden: // Dehighlight everything automatically if property display is closed setHighlight(null); break; } }; }