Esempio n. 1
0
            public LayoutSelectionItem(LyricLayout layout)
            {
                this.layout = layout;

                AutoSizeAxes = Axes.Both;
                Spacing      = new Vector2(5);
                Direction    = FillDirection.Vertical;

                InternalChildren = new Drawable[]
                {
                    cornerContainer = new Container
                    {
                        AutoSizeAxes = Axes.Both,
                        Masking      = true,
                        CornerRadius = 5f,
                        Child        = drawableLayoutPreview = new DrawableLayoutPreview
                        {
                            Size   = new Vector2(selection_size),
                            Layout = layout,
                        }
                    },
                    new OsuSpriteText
                    {
                        Text = layout.Name
                    }
                };

                selectedLayoutIndex.BindValueChanged(e =>
                {
                    var selected = layout.ID == e.NewValue;
                    cornerContainer.BorderThickness = selected ? 3 : 0;
                }, true);
            }
Esempio n. 2
0
 public LayoutToolTip()
 {
     Child = preview = new DrawableLayoutPreview
     {
         Size = new Vector2(512 * scale, 384 * scale),
     };
 }