Example #1
0
        public RiderFlowSceneToolbarRoot()
        {
            SetRootStyleProperties();
            var startupLabel = new Label("Initializing...");

            Add(startupLabel);
            ContainerReadyRequirement.Instance.IsReady.WhenTrue(myDefinition.Lifetime, (b) =>
            {
                Remove(startupLabel);
                myRiderFlowToolbarElements = new List <VisualElement>()
                {
                    ComponentContainer.GetComponent <SceneSearchPopupTool>().MakeVisualElement(myDefinition.Lifetime),
                    ComponentContainer.GetComponent <CameraPresetCreationTool>().MakeVisualElement(),
                    ComponentContainer.GetComponent <CameraPresetExplorerTool>().MakeVisualElement(),
                    ComponentContainer.GetComponent <BookmarkExplorerTool>().MakeVisualElement(),
                };
                foreach (var toolbarElement in myRiderFlowToolbarElements)
                {
                    Add(toolbarElement);
                }
                RegisterCallback <GeometryChangedEvent>(OnGeometryChanged);
                myParentSet.Advise(myDefinition.Lifetime, SetUpChildElements);
                mySceneOccurrenceExplorerTool = ComponentContainer.GetComponent <SceneOccurrenceExplorerTool>();
                mySceneOccurrenceExplorerTool.Session.Advise(myDefinition.Lifetime, session =>
                {
                    if (!myShowingFindUsages)
                    {
                        AddFindUsages();
                    }
                });

                RegisterCallback <DetachFromPanelEvent>(OnDestroy);
            });
        }
Example #2
0
 public void Persist(ComponentContainer <IComponent> data, string name)
 {
     if (!_wrappers_dict.ContainsKey(name))
     {
         _wrappers_dict.Add(name, new ComponentIOWrapper(data));
     }
     else
     {
         _wrappers_dict[name].Set(data.GetComponent());
     }
 }
Example #3
0
 public override IComponent GetComponent()
 {
     return(data.GetComponent());
 }
Example #4
0
 public T GetComponent <T>()
 {
     return(components.GetComponent <T>());
 }