/// <inheritdoc /> /// <summary> /// </summary> public EditorMetadataConfirmationDialog(EditorScreen screen, EditorMetadataChanger changer) : base(0) { Screen = screen; Changer = changer; Screen.InBackgroundConfirmationDialog = true; Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, 0, 0.75f, 100)); CreateContent(); }
/// <summary> /// </summary> private void CreateMetadataChanger() { MetadataChanger = new EditorMetadataChanger(this) { Parent = Container, Alignment = Alignment.MidLeft }; MetadataChanger.X = -MetadataChanger.Width; MetadataChanger.MoveToX(0, Easing.OutQuint, 600); }
/// <summary> /// </summary> /// <param name="changer"></param> /// <param name="items"></param> public EditorMetadataScrollContainer(EditorMetadataChanger changer, List <EditorMetadataItem> items) : base(new ScalableVector2(0, 0), new ScalableVector2(0, 0)) { Changer = changer; Items = items; Size = new ScalableVector2(Changer.Width, Changer.Height - Changer.HeaderBackground.Height - Changer.FooterBackground.Height); Alpha = 0; Scrollbar.Tint = Color.White; Scrollbar.Width = 5; Scrollbar.X += 8; ScrollSpeed = 150; EasingType = Easing.OutQuint; TimeToCompleteScroll = 1500; var totalHeight = 0f; for (var i = 0; i < Items.Count; i++) { var item = Items[i]; AddContainedDrawable(item); totalHeight += item.Height; const int spacing = 13; if (i == 0) { item.Y = spacing; continue; } item.Y = Items[i - 1].Y + Items[i - 1].Height + spacing; totalHeight += spacing; } if (ContentContainer.Height < totalHeight) { ContentContainer.Height = Height; } }