public FollowPoint() { Origin = Anchor.Centre; Alpha = 0; Masking = true; AutoSizeAxes = Axes.Both; CornerRadius = width / 2; EdgeEffect = new EdgeEffect { 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 Edge(SpriteBatch spriteBatch, Settings settings, Effect normalDepthMapEffect, Effect edgeEffect) : base(spriteBatch) { if (settings == null) throw new ArgumentNullException("settings"); if (normalDepthMapEffect == null) throw new ArgumentNullException("normalDepthMapEffect"); if (edgeEffect == null) throw new ArgumentNullException("edgeEffect"); this.settings = settings; var pp = GraphicsDevice.PresentationParameters; var width = (int) (pp.BackBufferWidth * settings.MapScale); var height = (int) (pp.BackBufferHeight * settings.MapScale); //---------------------------------------------------------------- // エフェクト // 法線深度マップ this.normalDepthMapEffect = new NormalDepthMapEffect(normalDepthMapEffect); // エッジ強調 this.edgeEffect = new EdgeEffect(edgeEffect); this.edgeEffect.MapWidth = width; this.edgeEffect.MapHeight = height; //---------------------------------------------------------------- // レンダ ターゲット normalDepthMap = new RenderTarget2D(GraphicsDevice, width, height, false, SurfaceFormat.Vector4, DepthFormat.Depth24, 0, RenderTargetUsage.DiscardContents); }
private void load(OsuColour colours) { if (nubType == 0) { Colour = idleColour = colours.Pink; glowingColour = colours.PinkLighter; EdgeEffect = new EdgeEffect { Colour = colours.PinkDarker, Type = EdgeEffectType.Glow, Radius = 10, Roundness = 8, }; FadeEdgeEffectTo(0); } else if (nubType == 1) { Colour = idleColour = Color4.White; glowingColour = colours.YellowLighter; EdgeEffect = new EdgeEffect { Colour = colours.YellowDarker, Type = EdgeEffectType.Glow, Radius = 6, Roundness = 2, }; FadeEdgeEffectTo(0); } }
public Cursor() { AutoSizeAxes = Axes.Both; Origin = Anchor.Centre; BorderThickness = 2; BorderColour = new Color4(247, 99, 164, 255); Masking = true; EdgeEffect = new EdgeEffect { 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 OsuTooltip() { AutoSizeEasing = EasingTypes.OutQuint; CornerRadius = 5; Masking = true; EdgeEffect = new EdgeEffect { 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 { TextSize = text_size, Padding = new MarginPadding(5), Font = @"Exo2.0-Regular", } }; }
public OpaqueBackground() { RelativeSizeAxes = Axes.Both; Masking = true; MaskingSmoothness = 0; EdgeEffect = new EdgeEffect { 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 Light() { Size = new Vector2(40, 12); Masking = true; Colour = defaultColour; EdgeEffect = new EdgeEffect { Colour = glowColour, Type = EdgeEffectType.Glow, Radius = 10, Roundness = 8, }; CornerRadius = Height / 2; Masking = true; BorderColour = Color4.White; BorderThickness = border_width; Children = new[] { fill = new Box { RelativeSizeAxes = Axes.Both, Alpha = 0.01f, //todo: remove once we figure why containers aren't drawing at all times }, }; }
public UserDropdownHeader() { Foreground.Padding = new MarginPadding { Left = 10, Right = 10 }; Margin = new MarginPadding { Bottom = 5 }; Masking = true; CornerRadius = 5; EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Shadow, Colour = Color4.Black.Opacity(0.25f), Radius = 4, }; Icon.TextSize = 14; Icon.Margin = new MarginPadding(0); Foreground.Add(statusIcon = new TextAwesome { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, Icon = FontAwesome.fa_circle_o, TextSize = 14, }); Text.Margin = new MarginPadding { Left = LABEL_LEFT_MARGIN }; }
private void Awake() { Renderer = GetComponent <Renderer>(); effect = Camera.main.GetComponent <EdgeEffect>(); effectOff = Camera.main.GetComponent <EdgeEffectOff>(); powerAttached = this.GetComponent <PowerExchanger>().ConnectedPowerable; powerAttached.OnPoweredOn += PowerOn; powerAttached.OnPoweredOff += PowerOff; }
private void load(OsuColour colours) { EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Glow, Colour = isRim ? colours.BlueDarker : colours.PinkDarker, Radius = 60, }; }
public override void Apply(Drawable d) { base.Apply(d); Container c = (Container)d; EdgeEffect e = c.EdgeEffect; e.Colour.Linear.A = CurrentValue; c.EdgeEffect = e; }
public override void Apply(ITransformable t) { base.Apply(t); Container c = t as Container; EdgeEffect e = c.EdgeEffect; e.Colour.Linear.A = CurrentValue; c.EdgeEffect = e; }
private void load(OsuColour colours) { Size = new Vector2(50); Masking = true; CornerRadius = 25; activeColour = colours.PinkDarker; inactiveColour = OsuColour.Gray(0.8f); EdgeEffect = new EdgeEffect { 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 TextAwesome { Anchor = Anchor.Centre, Origin = Anchor.Centre, Shadow = false, Colour = OsuColour.Gray(0.95f), Icon = icon, TextSize = 20, } } } }; }
public CollectionsMenu() { CornerRadius = 5; EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Shadow, Colour = Color4.Black.Opacity(0.3f), Radius = 3, Offset = new Vector2(0f, 1f), }; }
protected virtual void Selected() { BorderThickness = 2.5f; EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Glow, Colour = new Color4(130, 204, 255, 150), Radius = 20, Roundness = 10, }; }
protected virtual void Deselected() { BorderThickness = 0; EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Shadow, Offset = new Vector2(1), Radius = 10, Colour = new Color4(0, 0, 0, 100), }; }
public BeatmapInfoWedge() { Shear = wedged_container_shear; Masking = true; BorderColour = new Color4(221, 255, 255, 255); BorderThickness = 2.5f; EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Glow, Colour = new Color4(130, 204, 255, 150), Radius = 20, Roundness = 15, }; }
private void load(OsuColour colours) { AccentColour = colours.Pink; GlowingAccentColour = colours.PinkLighter; GlowColour = colours.PinkDarker; EdgeEffect = new EdgeEffect { Colour = GlowColour, Type = EdgeEffectType.Glow, Radius = 10, Roundness = 8, }; }
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 EdgeEffect { Type = EdgeEffectType.Shadow, Offset = new Vector2(0f, 1f), Radius = 3f, Colour = Color4.Black.Opacity(0.25f), }; }
public DirectListPanel(BeatmapSetInfo beatmap) : base(beatmap) { RelativeSizeAxes = Axes.X; Height = height; CornerRadius = 5; Masking = true; EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Shadow, Offset = new Vector2(0f, 1f), Radius = 3f, Colour = Color4.Black.Opacity(0.25f), }; }
public BeatmapInfoWedge() { Shear = wedged_container_shear; Masking = true; BorderColour = new Color4(221, 255, 255, 255); BorderThickness = 2.5f; EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Glow, Colour = new Color4(130, 204, 255, 150), Radius = 20, Roundness = 15, }; }
private void load(OsuColour colours) { Colour = idleColour = colours.Pink; glowingColour = colours.PinkLighter; EdgeEffect = new EdgeEffect { Colour = colours.PinkDarker, Type = EdgeEffectType.Glow, Radius = 10, Roundness = 8, }; FadeEdgeEffectTo(0); }
public UserDropdownMenu() { Margin = new MarginPadding { Bottom = 5 }; CornerRadius = 5; ItemsContainer.Padding = new MarginPadding(0); Masking = true; EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Shadow, Colour = Color4.Black.Opacity(0.25f), Radius = 4, }; }
public CollectionsHeader() { CornerRadius = 5; Height = 30; Icon.TextSize = 14; Icon.Margin = new MarginPadding(0); Foreground.Padding = new MarginPadding { Top = 4, Bottom = 4, Left = 10, Right = 10 }; EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Shadow, Colour = Color4.Black.Opacity(0.3f), Radius = 3, Offset = new Vector2(0f, 1f), }; }
public Avatar() { Size = new Vector2(32); Anchor = Anchor.CentreLeft; Origin = Anchor.CentreLeft; CornerRadius = Size.X / 8; EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Shadow, Radius = 4, Colour = new Color4(0, 0, 0, 0.1f), }; Masking = true; }
public MusicController() { Width = 400; Height = 130; CornerRadius = 5; EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Shadow, Colour = Color4.Black.Opacity(40), Radius = 5, }; Masking = true; Anchor = Anchor.TopRight;//placeholder Origin = Anchor.TopRight; Position = start_position; Margin = new MarginPadding(10); }
public Wave() { RelativeSizeAxes = Axes.X; Width = 1.5f; Masking = true; EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Shadow, Colour = Color4.Black.Opacity(50), Radius = 20f, }; Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, }, }; }
public Edge(SpriteBatch spriteBatch, Settings settings, Effect normalDepthMapEffect, Effect edgeEffect) : base(spriteBatch) { if (settings == null) { throw new ArgumentNullException("settings"); } if (normalDepthMapEffect == null) { throw new ArgumentNullException("normalDepthMapEffect"); } if (edgeEffect == null) { throw new ArgumentNullException("edgeEffect"); } this.settings = settings; var pp = GraphicsDevice.PresentationParameters; var width = (int)(pp.BackBufferWidth * settings.MapScale); var height = (int)(pp.BackBufferHeight * settings.MapScale); //---------------------------------------------------------------- // エフェクト // 法線深度マップ this.normalDepthMapEffect = new NormalDepthMapEffect(normalDepthMapEffect); // エッジ強調 this.edgeEffect = new EdgeEffect(edgeEffect); this.edgeEffect.MapWidth = width; this.edgeEffect.MapHeight = height; //---------------------------------------------------------------- // レンダ ターゲット normalDepthMap = new RenderTarget2D(GraphicsDevice, width, height, false, SurfaceFormat.Vector4, DepthFormat.Depth24, 0, RenderTargetUsage.DiscardContents); }
private void load(OsuColour colours) { fill.Colour = idleColour = Color4.White.Opacity(0.4f); glowingColour = Color4.White; Size = new Vector2(25, 5); Masking = true; CornerRadius = 3; EdgeEffect = new EdgeEffect { Colour = colours.BlueDark.Opacity(glow_strength), Type = EdgeEffectType.Glow, Radius = 8, }; FadeEdgeEffectTo(0); updateGlow(); Flush(true); }
public override void Reset() { base.Reset(); var effect = new EdgeEffect { CornerRadius = 3f, Parameters = new EdgeEffectParameters { Colour = Color4.LightBlue, Hollow = true, Radius = 5f, Type = EdgeEffectType.Glow } }; Add(new FillFlowContainer { Position = new Vector2(10f, 10f), Spacing = new Vector2(25f, 25f), RelativeSizeAxes = Axes.Both, Children = new Drawable[] { new SpriteText { Text = "Blur Test", TextSize = 32f }.WithEffect(new BlurEffect { Sigma = new Vector2(2f, 0f), Strength = 2f, BlurRotation = 45f, }), new SpriteText { Text = "EdgeEffect Test", TextSize = 32f }.WithEffect(new EdgeEffect { CornerRadius = 3f, Parameters = new EdgeEffectParameters { Colour = Color4.Yellow, Hollow = true, Radius = 5f, Type = EdgeEffectType.Shadow } }), new SpriteText { Text = "Repeated usage of same effect test", TextSize = 32f }.WithEffect(effect), new SpriteText { Text = "Repeated usage of same effect test", TextSize = 32f }.WithEffect(effect), new SpriteText { Text = "Repeated usage of same effect test", TextSize = 32f }.WithEffect(effect), new SpriteText { Text = "Multiple effects Test", TextSize = 32f }.WithEffect(new BlurEffect { Sigma = new Vector2(2f, 2f), Strength = 2f }).WithEffect(new EdgeEffect { CornerRadius = 3f, Parameters = new EdgeEffectParameters { Colour = Color4.Yellow, Hollow = true, Radius = 5f, Type = EdgeEffectType.Shadow } }), } }); }
public Avatar() { Size = new Vector2(32); Anchor = Anchor.CentreLeft; Origin = Anchor.CentreLeft; CornerRadius = Size.X / 8; EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Shadow, Radius = 4, Colour = Color4.Black.Opacity(0.1f), }; Masking = true; }
public UserPanel(User user) { Height = height - status_height; Masking = true; CornerRadius = 5; EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Shadow, Colour = Color4.Black.Opacity(0.25f), Radius = 4, }; Children = new Drawable[] { new AsyncLoadWrapper(new CoverBackgroundSprite(user) { Anchor = Anchor.Centre, Origin = Anchor.Centre, FillMode = FillMode.Fill, OnLoadComplete = d => d.FadeInFromZero(200), }) { RelativeSizeAxes = Axes.Both }, new Box { RelativeSizeAxes = Axes.Both, Colour = Color4.Black.Opacity(0.7f), }, new Container { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Padding = new MarginPadding { Top = content_padding, Left = content_padding, Right = content_padding }, Children = new Drawable[] { new UpdateableAvatar { Size = new Vector2(height - status_height - content_padding * 2), User = user, Masking = true, CornerRadius = 5, EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Shadow, Colour = Color4.Black.Opacity(0.25f), Radius = 4, }, }, new Container { RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Left = height - status_height - content_padding }, Children = new Drawable[] { new OsuSpriteText { Text = user.Username, TextSize = 18, Font = @"Exo2.0-SemiBoldItalic", }, new FillFlowContainer { Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, AutoSizeAxes = Axes.X, Height = 20f, Direction = FillDirection.Horizontal, Spacing = new Vector2(5f, 0f), Children = new Drawable[] { new DrawableFlag(user.Country?.FlagName ?? @"__") { Width = 30f, RelativeSizeAxes = Axes.Y, }, new Container { Width = 40f, RelativeSizeAxes = Axes.Y, }, new CircularContainer { Width = 20f, RelativeSizeAxes = Axes.Y, }, }, }, }, }, }, }, statusBar = new Container { Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, RelativeSizeAxes = Axes.X, Alpha = 0f, Children = new Drawable[] { statusBg = new Box { RelativeSizeAxes = Axes.Both, Alpha = 0.5f, }, new FillFlowContainer { Anchor = Anchor.Centre, Origin = Anchor.Centre, AutoSizeAxes = Axes.Both, Spacing = new Vector2(5f, 0f), Children = new[] { new TextAwesome { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, Icon = FontAwesome.fa_circle_o, Shadow = true, TextSize = 14, }, statusMessage = new OsuSpriteText { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, Font = @"Exo2.0-Semibold", }, }, }, }, }, }; }
public TestCaseEffects() { var effect = new EdgeEffect { CornerRadius = 3f, Parameters = new EdgeEffectParameters { Colour = Color4.LightBlue, Hollow = true, Radius = 5f, Type = EdgeEffectType.Glow } }; Add(new FillFlowContainer { Position = new Vector2(10f, 10f), Spacing = new Vector2(25f, 25f), RelativeSizeAxes = Axes.Both, Children = new Drawable[] { new SpriteText { Text = "Blur Test", Font = new FontUsage(size: 32), }.WithEffect(new BlurEffect { Sigma = new Vector2(2f, 0f), Strength = 2f, Rotation = 45f, }), new SpriteText { Text = "EdgeEffect Test", Font = new FontUsage(size: 32), }.WithEffect(new EdgeEffect { CornerRadius = 3f, Parameters = new EdgeEffectParameters { Colour = Color4.Yellow, Hollow = true, Radius = 5f, Type = EdgeEffectType.Shadow } }), new SpriteText { Text = "Repeated usage of same effect test", Font = new FontUsage(size: 32), }.WithEffect(effect), new SpriteText { Text = "Repeated usage of same effect test", Font = new FontUsage(size: 32), }.WithEffect(effect), new SpriteText { Text = "Repeated usage of same effect test", Font = new FontUsage(size: 32), }.WithEffect(effect), new SpriteText { Text = "Multiple effects Test", Font = new FontUsage(size: 32), }.WithEffect(new BlurEffect { Sigma = new Vector2(2f, 2f), Strength = 2f }).WithEffect(new EdgeEffect { CornerRadius = 3f, Parameters = new EdgeEffectParameters { Colour = Color4.Yellow, Hollow = true, Radius = 5f, Type = EdgeEffectType.Shadow } }), new Container { AutoSizeAxes = Axes.Both, Children = new Drawable[] { new Box { Colour = Color4.CornflowerBlue, RelativeSizeAxes = Axes.Both, }, new SpriteText { Text = "Outlined Text", Font = new FontUsage(size: 32), }.WithEffect(new OutlineEffect { BlurSigma = new Vector2(3f), Strength = 3f, Colour = Color4.Red, PadExtent = true, }) } }, new Container { AutoSizeAxes = Axes.Both, Children = new Drawable[] { new Box { Colour = Color4.CornflowerBlue, RelativeSizeAxes = Axes.Both, }, new SpriteText { Text = "Glowing Text", Font = new FontUsage(size: 32), }.WithEffect(new GlowEffect { BlurSigma = new Vector2(3f), Strength = 3f, Colour = ColourInfo.GradientHorizontal(new Color4(1.2f, 0, 0, 1f), new Color4(0, 1f, 0, 1f)), PadExtent = true, }), } }, new Container { AutoSizeAxes = Axes.Both, Children = new Drawable[] { new Box { Anchor = Anchor.Centre, Origin = Anchor.Centre, Colour = Color4.White, Size = new Vector2(150, 40), }.WithEffect(new GlowEffect { BlurSigma = new Vector2(3f), Strength = 3f, Colour = ColourInfo.GradientHorizontal(new Color4(1.2f, 0, 0, 1f), new Color4(0, 1f, 0, 1f)), PadExtent = true, }), changeColourText = new SpriteText { Anchor = Anchor.Centre, Origin = Anchor.Centre, Text = "Absolute Size", Font = new FontUsage(size: 32), Colour = Color4.Red, Shadow = true, } } }, new Container { AutoSizeAxes = Axes.Both, Children = new Drawable[] { new Box { Anchor = Anchor.Centre, Origin = Anchor.Centre, Colour = Color4.White, RelativeSizeAxes = Axes.Both, Size = new Vector2(1.1f, 1.1f), }.WithEffect(new GlowEffect { BlurSigma = new Vector2(3f), Strength = 3f, Colour = ColourInfo.GradientHorizontal(new Color4(1.2f, 0, 0, 1f), new Color4(0, 1f, 0, 1f)), PadExtent = true, }), new SpriteText { Anchor = Anchor.Centre, Origin = Anchor.Centre, Text = "Relative Size", Font = new FontUsage(size: 32), Colour = Color4.Red, Shadow = true, }, } }, new Container { AutoSizeAxes = Axes.Both, Children = new Drawable[] { new Box { Anchor = Anchor.Centre, Origin = Anchor.Centre, Colour = Color4.White, RelativeSizeAxes = Axes.Both, Size = new Vector2(1.1f, 1.1f), Rotation = 10, }.WithEffect(new GlowEffect { BlurSigma = new Vector2(3f), Strength = 3f, Colour = ColourInfo.GradientHorizontal(new Color4(1.2f, 0, 0, 1f), new Color4(0, 1f, 0, 1f)), PadExtent = true, }), new SpriteText { Anchor = Anchor.Centre, Origin = Anchor.Centre, Text = "Rotation", Font = new FontUsage(size: 32), Colour = Color4.Red, Shadow = true, }, } }, } }); }
public ChannelTabItem(Channel value) : base(value) { Width = 150; RelativeSizeAxes = Axes.Y; Anchor = Anchor.BottomLeft; Origin = Anchor.BottomLeft; Shear = new Vector2(shear_width / ChatOverlay.TAB_AREA_HEIGHT, 0); Masking = true; EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Shadow, Radius = 10, Colour = Color4.Black.Opacity(0.2f), }; Children = new Drawable[] { box = new Box { EdgeSmoothness = new Vector2(1, 0), RelativeSizeAxes = Axes.Both, }, highlightBox = new Box { Width = 5, Alpha = 0, Anchor = Anchor.BottomRight, Origin = Anchor.BottomRight, EdgeSmoothness = new Vector2(1, 0), RelativeSizeAxes = Axes.Y, }, new Container { Shear = new Vector2(-shear_width / ChatOverlay.TAB_AREA_HEIGHT, 0), RelativeSizeAxes = Axes.Both, Children = new Drawable[] { new TextAwesome { Icon = FontAwesome.fa_hashtag, Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, Colour = Color4.Black, X = -10, Alpha = 0.2f, TextSize = ChatOverlay.TAB_AREA_HEIGHT, }, text = new OsuSpriteText { Margin = new MarginPadding(5), Origin = Anchor.CentreLeft, Anchor = Anchor.CentreLeft, Text = value.ToString(), TextSize = 18, }, textBold = new OsuSpriteText { Alpha = 0, Margin = new MarginPadding(5), Origin = Anchor.CentreLeft, Anchor = Anchor.CentreLeft, Text = value.ToString(), Font = @"Exo2.0-Bold", TextSize = 18, }, } } }; }