public UserDropdownHeader() { Foreground.Padding = new MarginPadding { Left = 10, Right = 10 }; Margin = new MarginPadding { Bottom = 5 }; Masking = true; CornerRadius = 5; EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Shadow, Colour = Color4.Black.Opacity(0.25f), Radius = 4, }; Icon.Size = new Vector2(14); Icon.Margin = new MarginPadding(0); Foreground.Add(statusIcon = new SpriteIcon { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, Icon = FontAwesome.Regular.Circle, Size = new Vector2(14), }); Text.Margin = new MarginPadding { Left = LABEL_LEFT_MARGIN }; }
protected override void Apply(IContainer c, double time) { EdgeEffectParameters e = c.EdgeEffect; e.Colour = valueAt(time); c.EdgeEffect = e; }
protected FullscreenOverlay(OverlayColourScheme colourScheme) { Header = CreateHeader(); ColourProvider = new OverlayColourProvider(colourScheme); RelativeSizeAxes = Axes.Both; RelativePositionAxes = Axes.Both; Width = 0.85f; Anchor = Anchor.TopCentre; Origin = Anchor.TopCentre; Masking = true; EdgeEffect = new EdgeEffectParameters { Colour = Color4.Black.Opacity(0), Type = EdgeEffectType.Shadow, Radius = 10 }; base.Content.AddRange(new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = BackgroundColour }, content = new Container { RelativeSizeAxes = Axes.Both } }); }
public HomePanel() { RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; Masking = true; EdgeEffect = new EdgeEffectParameters { Colour = Color4.Black.Opacity(0.25f), Type = EdgeEffectType.Shadow, Radius = 3, Offset = new Vector2(0, 1) }; AddRangeInternal(new Drawable[] { background = new Box { RelativeSizeAxes = Axes.Both }, content = new Container { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y } }); }
public void TestEdgeEffect() { //Given var code = @"new osu.Framework.Graphics.Containers.EdgeEffectParameters { Type = osu.Framework.Graphics.Containers.EdgeEffectType.Glow, Colour = new osuTK.Graphics.Color4(0.1F, 0.2F, 0.3F, 0.4F), Radius = 20F, Roundness = 30F, Offset = new osuTK.Vector2(0F, 20F), Hollow = true }"; var value = new EdgeEffectParameters { Type = EdgeEffectType.Glow, Colour = new Color4(0.1f, 0.2f, 0.3f, 0.4f), Radius = 20, Roundness = 30, Offset = new Vector2(0, 20), Hollow = true }; //Then testAssert(code, value); }
public OsuTooltip() { AutoSizeEasing = Easing.OutQuint; CornerRadius = 5; Masking = true; EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Shadow, Colour = Color4.Black.Opacity(40), Radius = 5, }; Children = new Drawable[] { background = new Box { RelativeSizeAxes = Axes.Both, Alpha = 0.9f, }, text = new OsuSpriteText { Padding = new MarginPadding(5), Font = OsuFont.GetFont(weight: FontWeight.Regular) } }; }
public OpaqueBackground() { RelativeSizeAxes = Axes.Both; Masking = true; MaskingSmoothness = 0; EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Shadow, Colour = Color4.Black.Opacity(40), Radius = 5, }; Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = OsuColour.Gray(30) }, new Triangles { RelativeSizeAxes = Axes.Both, ColourLight = OsuColour.Gray(40), ColourDark = OsuColour.Gray(20), }, }; }
public ToolSelector() { RelativeSizeAxes = Axes.Both; Masking = true; EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Shadow, Radius = 9f, Colour = Color4.Black.Opacity(0.4f), }; AddRangeInternal(new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = IWannaColour.GrayDark }, selectedTilePlaceholder = new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Spacing = new Vector2(0, 10), Direction = FillDirection.Vertical, Padding = new MarginPadding(10), }, control = new ToolSelectorTabControl { Anchor = Anchor.BottomCentre, Origin = Anchor.BottomCentre, Margin = new MarginPadding { Bottom = 20 } } }); }
public Cursor() { AutoSizeAxes = Axes.Both; Origin = Anchor.Centre; BorderThickness = 2; BorderColour = new Color4(247, 99, 164, 255); Masking = true; EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Glow, Colour = new Color4(247, 99, 164, 6), Radius = 50 }; Children = new[] { new Box { Size = new Vector2(8, 8), Origin = Anchor.Centre, Anchor = Anchor.Centre, } }; }
public FollowPoint() { Origin = Anchor.Centre; Masking = true; AutoSizeAxes = Axes.Both; CornerRadius = width / 2; EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Glow, Colour = Color4.White.Opacity(0.2f), Radius = 4, }; Children = new Drawable[] { new Box { Size = new Vector2(width), BlendingMode = BlendingMode.Additive, Origin = Anchor.Centre, Anchor = Anchor.Centre, Alpha = 0.5f, }, }; }
public Rhombus() { Anchor = Anchor.Centre; Origin = Anchor.Centre; RelativeSizeAxes = Axes.None; Size = new Vector2(450); Rotation = 45; Masking = true; BorderColour = Color4.Gray; BorderThickness = 10; EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Shadow, Hollow = true, Radius = 20, Colour = Color4.Gray, }; Child = new Box { Colour = Color4.Black, RelativeSizeAxes = Axes.Both, Alpha = .8f }; kiaiBindable.BindValueChanged(updateGlowState, true); }
public static string Serialize(EdgeEffectParameters p) { if (p.Type == EdgeEffectType.None) { return("None"); } var list = new List <string>(); if (p.Hollow) { list.Add("true"); } if (p.Offset != default || list.Count > 0) { list.Add($"({Vector2Converter.Serialize(p.Offset)})"); } if (p.Roundness != default || list.Count > 0) { list.Add(p.Roundness.ToString()); } if (p.Radius != default || list.Count > 0) { list.Add(p.Radius.ToString()); } list.Add(Color4Converter.Serialize(p.Colour)); list.Add(p.Type.ToString()); list.Reverse(); return(string.Join(", ", list)); }
public StreamGameTooltip() { AutoSizeEasing = Easing.OutQuint; CornerRadius = 5; Masking = true; EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Shadow, Colour = Color4.Black.Opacity(40), Radius = 5, }; Children = new Drawable[] { background = new Box { RelativeSizeAxes = Axes.Both, Alpha = 0.9f, Colour = StreamToolColors.FromHex("1f1f1f") }, text = new SpriteText { Padding = new MarginPadding(5), Font = GetFont(size: 25) } }; }
public IWannaTooltip() { AutoSizeEasing = Easing.OutQuint; CornerRadius = 5; Masking = true; EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Shadow, Colour = Color4.Black.Opacity(40), Radius = 5, }; Children = new Drawable[] { background = new Box { RelativeSizeAxes = Axes.Both, Colour = IWannaColour.GrayDarker }, text = new SpriteText { Padding = new MarginPadding(5) } }; }
public BeatmapSetOverlay() { Info info; ScoresContainer scores; Waves.FirstWaveColour = OsuColour.Gray(0.4f); Waves.SecondWaveColour = OsuColour.Gray(0.3f); Waves.ThirdWaveColour = OsuColour.Gray(0.2f); Waves.FourthWaveColour = OsuColour.Gray(0.1f); Anchor = Anchor.TopCentre; Origin = Anchor.TopCentre; RelativeSizeAxes = Axes.Both; Width = 0.85f; Masking = true; EdgeEffect = new EdgeEffectParameters { Colour = Color4.Black.Opacity(0), Type = EdgeEffectType.Shadow, Radius = 3, Offset = new Vector2(0f, 1f), }; Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = OsuColour.Gray(0.2f) }, scroll = new ScrollContainer { RelativeSizeAxes = Axes.Both, ScrollbarVisible = false, Child = new ReverseChildIDFillFlowContainer <Drawable> { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Direction = FillDirection.Vertical, Children = new Drawable[] { header = new Header(), info = new Info(), scores = new ScoresContainer(), }, }, }, }; header.BeatmapSet.BindTo(beatmapSet); info.BeatmapSet.BindTo(beatmapSet); header.Picker.Beatmap.ValueChanged += b => { info.Beatmap = b.NewValue; scores.Beatmap = b.NewValue; }; }
public DrawableTopScore(ScoreInfo score, int position = 1) { RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; Masking = true; CornerRadius = 10; EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Shadow, Colour = Color4.Black.Opacity(0.2f), Radius = 1, Offset = new Vector2(0, 1), }; InternalChildren = new Drawable[] { background = new Box { RelativeSizeAxes = Axes.Both, }, new Container { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Padding = new MarginPadding(10), Children = new Drawable[] { new AutoSizingGrid { RelativeSizeAxes = Axes.X, Content = new[] { new Drawable[] { new TopScoreUserSection { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, Score = score, ScorePosition = position, }, null, new TopScoreStatisticsSection { Anchor = Anchor.CentreRight, Origin = Anchor.CentreRight, Score = score, } }, }, ColumnDimensions = new[] { new Dimension(GridSizeMode.AutoSize), new Dimension(GridSizeMode.Absolute, 20) }, RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize) }, } } } }; }
public override void Apply(Drawable d) { base.Apply(d); IContainer c = (IContainer)d; EdgeEffectParameters e = c.EdgeEffect; e.Colour = CurrentValue; c.EdgeEffect = e; }
private void load(OsuColour colours) { EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Glow, Colour = isRim ? colours.BlueDarker : colours.PinkDarker, Radius = 60, }; }
private void updateAccentColour(ValueChangedEvent <Color4> colour) { EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Glow, Radius = Size.X / 2, Colour = colour.NewValue.Darken(0.2f).Opacity(0.75f) }; }
private void updateAccentColour() { EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Glow, Radius = Size.X / 2, Colour = accentColour.Darken(0.2f).Opacity(0.75f) }; }
private void load(OsuColour colours) { Size = new Vector2(50); Masking = true; CornerRadius = 25; CornerExponent = 2; activeColour = colours.PinkDarker; inactiveColour = OsuColour.Gray(0.8f); EdgeEffect = new EdgeEffectParameters { Colour = Color4.Black.Opacity(0.4f), Type = EdgeEffectType.Shadow, Radius = 5, }; Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = Color4.White, }, colouredPart = new CircularContainer { Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.Both, Size = new Vector2(0.8f), BorderThickness = 4, BorderColour = Color4.White, Colour = inactiveColour, Children = new Drawable[] { new Box { AlwaysPresent = true, //for border rendering RelativeSizeAxes = Axes.Both, Colour = Color4.Transparent, }, new SpriteIcon { Anchor = Anchor.Centre, Origin = Anchor.Centre, Shadow = false, Colour = OsuColour.Gray(0.95f), Icon = icon, Size = new Vector2(20), } } } }; }
public static EdgeEffectParameters ValueAt(double time, EdgeEffectParameters startParams, EdgeEffectParameters endParams, double startTime, double endTime, Easing easing = Easing.None) => new EdgeEffectParameters { Type = startParams.Type, Hollow = startParams.Hollow, Colour = ValueAt(time, startParams.Colour, endParams.Colour, startTime, endTime, easing), Offset = ValueAt(time, startParams.Offset, endParams.Offset, startTime, endTime, easing), Radius = ValueAt(time, startParams.Radius, endParams.Radius, startTime, endTime, easing), Roundness = ValueAt(time, startParams.Roundness, endParams.Roundness, startTime, endTime, easing), };
private void onAccentChanged(ValueChangedEvent <Color4> accent) { colouredBox.Colour = accent.NewValue.Lighten(0.9f); EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Glow, Colour = accent.NewValue.Lighten(1f).Opacity(0.2f), Radius = 10, }; }
public CollectionsMenu() { CornerRadius = 5; EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Shadow, Colour = Color4.Black.Opacity(0.3f), Radius = 3, Offset = new Vector2(0f, 1f), }; }
public Pulp() { Size = new Vector2(pulp_size); EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Glow, Radius = 5, Colour = AccentColour.Opacity(0.5f), }; }
public LovewingSidebar() { RelativeSizeAxes = Axes.Y; Width = 275; Masking = true; EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Shadow, Radius = 10, Colour = Color4.Black.Opacity(0.5f) }; }
public BeatmapSetHeader() { Masking = true; EdgeEffect = new EdgeEffectParameters { Colour = Color4.Black.Opacity(0.25f), Type = EdgeEffectType.Shadow, Radius = 3, Offset = new Vector2(0f, 1f), }; }
public BeatmapSetLayoutSection() { RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; Masking = true; EdgeEffect = new EdgeEffectParameters { Colour = Colour4.Black.Opacity(0.25f), Type = EdgeEffectType.Shadow, Radius = 3, Offset = new Vector2(0f, 1f), }; }
private void load(OsuColour colours) { EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Glow, Colour = colours.Blue.Opacity(0.5f), Radius = 5, }; this.MoveTo(positionForOffset(DISC_SIZE / 2 + 200), 500); this.FadeOut(500); Expire(); }
public DirectGridPanel(BeatmapSetInfo beatmap) : base(beatmap) { Height = 140 + vertical_padding; //full height of all the elements plus vertical padding (autosize uses the image) CornerRadius = 4; Masking = true; EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Shadow, Offset = new Vector2(0f, 1f), Radius = 3f, Colour = Color4.Black.Opacity(0.25f), }; }