public static CurveTypePopup Create(VamPrefabFactory prefabFactory) { var curveTypeJSON = new JSONStorableStringChooser("Change curve", CurveTypeValues.labels2, "", "Curve type"); var curveTypeUI = prefabFactory.CreatePopup(curveTypeJSON, false, true); curveTypeUI.popupPanelHeight = 260f; var curveTypePopup = curveTypeUI.gameObject.AddComponent <CurveTypePopup>(); curveTypePopup.curveTypeJSON = curveTypeJSON; curveTypePopup.curveTypeUI = curveTypeUI; return(curveTypePopup); }
private JSONStorableStringChooser InitAnimationSelectorUI() { var jsc = new JSONStorableStringChooser("Animation", new List <string>(), "", "Animation", val => { if (_ignoreAnimationChange) { return; } _animationEditContext?.SelectAnimation(val); }); var popup = _prefabFactory.CreatePopup(jsc, false, true); popup.popupPanelHeight = GetComponent <UIDynamic>()?.height ?? 500; return(jsc); }