void Add(int id) { ScrollContent newScrollContent = Instantiate(scrollContent); newScrollContent.Init(id, symbol); newScrollContent.transform.SetParent(container); }
public void AddContent(ScrollContentView prefab, ScrollContentInfo contentInfo) { var scrollContent = new ScrollContent(prefab, contentInfo); scrollContents.Add(scrollContent); Sync(); }
public override void OnInspectorGUI() { serializedObject.Update(); EditorGUILayout.PropertyField(m_ScrollRect); EditorGUILayout.PropertyField(m_Sample); EditorGUILayout.PropertyField(m_Padding, true); EditorGUILayout.PropertyField(m_Spacing); EditorGUI.BeginChangeCheck(); EditorGUILayout.PropertyField(m_Direction); EditorGUILayout.PropertyField(m_VCorner); EditorGUILayout.PropertyField(m_HCorner); EditorGUILayout.PropertyField(m_RawChildCount); if (EditorGUI.EndChangeCheck()) { var dir = (ScrollContent.Direction)m_Direction.enumValueIndex; foreach (var o in serializedObject.targetObjects) { ScrollContent c = o as ScrollContent; c.SetDirection(dir); } } serializedObject.ApplyModifiedProperties(); GUILayout.BeginHorizontal(); if (GUILayout.Button("Clear")) { var content = target as ScrollContent; content.ClearLaout(); } if (GUILayout.Button("Layout")) { var content = target as ScrollContent; content.LayoutCompleted(); } GUILayout.EndHorizontal(); }
private async void Content_OnNavigationCompleted(WebView sender, WebViewNavigationCompletedEventArgs args) { await CalculatePageHeightAsync(); SizeChanged += ArticleDetail_SizeChanged; ScrollContent.ChangeView(null, 200, null); }
void Limpiar() { IdiomaHablado.Clear(); ModelHI.Clear(); RefreshDGIdiomas(); ListaEducacion.Clear(); RefreshDGEducacion(); txtDNI.Text = ""; txtNombre.Text = ""; txtApellido.Text = ""; CbPaisNac.SelectedIndex = -1; CbFechaNac.SelectedDate = null; txtEmail.Text = ""; txtTelefono.Text = ""; txtDireccion.Text = ""; CbEstadoLegal.Text = ""; CbDepartamento.SelectedIndex = -1; txtNombrePuesto.Text = ""; CbFechaApl.SelectedDate = null; txtURLCV.Text = ""; ScrollContent.ScrollToTop(); }
private async Task CalculatePageHeightAsync() { // TODO:跳转至上次滚动条位置 double offset = ScrollContent.VerticalOffset; // 如果WebView高度高于内容高度,下面的js获取的就是WebView高度。所以这里先清0 Content.Height = 0; double height = Convert.ToDouble(await Content.InvokeScriptAsync("eval", new string[] { "document.documentElement.scrollHeight.toString();" })); Content.Height = height; ScrollContent.ChangeView(null, offset, null); }
ScrollInstanceCache GetInstanceFromCache(ScrollContent content) { var instance = instancies.Find(i => !i.instance.gameObject.activeSelf && i.prefabId == content.GetPrefabId()); if (instance == null) { var clone = Object.Instantiate(content.GetPrefab(), scrollRect.content, false); instance = new ScrollInstanceCache(); instance.prefabId = content.GetPrefabId(); instance.instance = clone; instancies.Add(instance); } else if (instance.instance == null) { instancies.Remove(instance); instance = GetInstanceFromCache(content); } return(instance); }
public AudioMixerVisualiser() : base("AudioMixer", "(Ctrl+F9 to toggle)") { ScrollContent.Expire(); MainHorizontalContent.Add(new BasicScrollContainer(Direction.Horizontal) { RelativeSizeAxes = Axes.Y, Width = WIDTH, Children = new[] { mixerFlow = new FillFlowContainer <MixerDisplay> { RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, Spacing = new Vector2(10), Padding = new MarginPadding(10) } } }); }
public void BeginJoin(TournamentMatch match, bool losers) { ScrollContent.Add(new JoinVisualiser(MatchesContainer, match, losers, UpdateLayout)); }
void Awake() { _Instance = this; childPanel.Clear(); }
void ReleaseDesignerOutlets() { if (AspectHeight != null) { AspectHeight.Dispose(); AspectHeight = null; } if (ChallengeImage != null) { ChallengeImage.Dispose(); ChallengeImage = null; } if (ChallengeTextLbl != null) { ChallengeTextLbl.Dispose(); ChallengeTextLbl = null; } if (cnImagePlaceholderAspect != null) { cnImagePlaceholderAspect.Dispose(); cnImagePlaceholderAspect = null; } if (cnImagesCountHeight != null) { cnImagesCountHeight.Dispose(); cnImagesCountHeight = null; } if (cnMapPlaceholderAspect != null) { cnMapPlaceholderAspect.Dispose(); cnMapPlaceholderAspect = null; } if (cnMarginCount != null) { cnMarginCount.Dispose(); cnMarginCount = null; } if (cnsMapTop1 != null) { cnsMapTop1.Dispose(); cnsMapTop1 = null; } if (cnsWebViewHeight != null) { cnsWebViewHeight.Dispose(); cnsWebViewHeight = null; } if (CountChallengeLbl != null) { CountChallengeLbl.Dispose(); CountChallengeLbl = null; } if (DetailCollectionView != null) { DetailCollectionView.Dispose(); DetailCollectionView = null; } if (DetailCollectionViewAspect != null) { DetailCollectionViewAspect.Dispose(); DetailCollectionViewAspect = null; } if (MapViewBase != null) { MapViewBase.Dispose(); MapViewBase = null; } if (NeedUploadCountText1 != null) { NeedUploadCountText1.Dispose(); NeedUploadCountText1 = null; } if (paddingMap != null) { paddingMap.Dispose(); paddingMap = null; } if (PointsImage != null) { PointsImage.Dispose(); PointsImage = null; } if (PointsText != null) { PointsText.Dispose(); PointsText = null; } if (ScrollContent != null) { ScrollContent.Dispose(); ScrollContent = null; } if (ScrollView != null) { ScrollView.Dispose(); ScrollView = null; } if (SubmitButton != null) { SubmitButton.Dispose(); SubmitButton = null; } if (TimeText != null) { TimeText.Dispose(); TimeText = null; } if (UploadedCountText1 != null) { UploadedCountText1.Dispose(); UploadedCountText1 = null; } if (vImagePlaceholder != null) { vImagePlaceholder.Dispose(); vImagePlaceholder = null; } if (vImagesCount != null) { vImagesCount.Dispose(); vImagesCount = null; } if (WebView != null) { WebView.Dispose(); WebView = null; } }
private void Top_Click(object sender, RoutedEventArgs e) { ScrollContent.ChangeView(null, 0, null); }