public void Bind(IAtomPlugin plugin, string defaultScreen = null) { _plugin = plugin; _leftPanelPrefabFactory = leftPanel.AddComponent <VamPrefabFactory>(); _leftPanelPrefabFactory.plugin = plugin; _controlPanel = CreateControlPanel(leftPanel); _controlPanel.Bind(plugin); InitClipboardUI(); InitChangeCurveTypeUI(); _curves = InitCurvesUI(); tabs.Add(AnimationsScreen.ScreenName); tabs.Add(TargetsScreen.ScreenName); tabs.Add(EditAnimationScreen.ScreenName); tabs.Add(MoreScreen.ScreenName); _expandButton = tabs.Add("Collapse >"); InitToggleRightPanelButton(_expandButton); tabs.onTabSelected.AddListener(screenName => { screensManager.ChangeScreen(screenName); Expand(true); }); screensManager = InitScreensManager(rightPanel); screensManager.onScreenChanged.AddListener(screenName => tabs.Select(screenName)); screensManager.Bind(plugin, defaultScreen); }
private void InitControlPanelUI(bool rightSide) { var controlPanelContainer = _plugin.CreateSpacer(rightSide); controlPanelContainer.height = 500f; _controlPanel = controlPanelContainer.gameObject.AddComponent <AnimationControlPanel>(); _controlPanel.Bind(_plugin); }
public void Bind(AtomAnimation animation) { this.animation = animation; _controlPanel.Bind(animation); _curveType.Bind(animation); _curves.Bind(animation); }
public void Bind(AtomAnimationEditContext ctx) { animationEditContext = ctx; _controlPanel.Bind(ctx); _curveType.Bind(ctx); _curves.Bind(ctx); }
public void VamTimelineRequestControlPanelInjection(GameObject container) { _controllerInjectedControlerPanel = container.GetComponent <AnimationControlPanel>(); if (_controllerInjectedControlerPanel == null) { _controllerInjectedControlerPanel = container.AddComponent <AnimationControlPanel>(); _controllerInjectedControlerPanel.Bind(this); } _controllerInjectedControlerPanel.Bind(animation); }
public void Bind(AtomAnimation animation) { _controlPanel.Bind(animation); ChangeScreen(GetDefaultScreen()); }