Skip to content

Commit

Permalink
update icon
Browse files Browse the repository at this point in the history
  • Loading branch information
Flutterish committed Dec 28, 2021
1 parent 418df0f commit 621e817
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 26 deletions.
13 changes: 0 additions & 13 deletions osu.Game.Rulesets.RurusettoAddon.Tests/TestSceneOsuPlayer.cs

This file was deleted.

21 changes: 13 additions & 8 deletions osu.Game.Rulesets.RurusettoAddon/RurusettoAddonRuleset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,30 @@ public override IEnumerable<Mod> GetModsFor ( ModType type )
public override IEnumerable<KeyBinding> GetDefaultKeyBindings ( int variant = 0 )
=> Array.Empty<KeyBinding>();

public override Drawable CreateIcon() => new Icon(ShortName[0], this);
public override Drawable CreateIcon() => new Icon( this );

public class Icon : CompositeDrawable
{
private RurusettoAddonRuleset ruleset;

public Icon ( char c, RurusettoAddonRuleset ruleset ) {
public Icon ( RurusettoAddonRuleset ruleset ) {
this.ruleset = ruleset;

RelativeSizeAxes = Axes.Both;

InternalChildren = new Drawable[] {
new Circle {
Size = new Vector2(20),
Colour = Color4.White,
new SpriteIcon {
Icon = FontAwesome.Regular.Circle,
RelativeSizeAxes = Axes.Both,
Origin = Anchor.Centre,
Anchor = Anchor.Centre
},
new SpriteText {
Anchor = Anchor.Centre,
UseFullGlyphHeight = false,
Text = "r",
Font = OsuFont.GetFont( size: 24 ),
Origin = Anchor.Centre,
Text = c.ToString(),
Font = OsuFont.Default.With(size: 18)
Anchor = Anchor.Centre
}
};
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
using osu.Framework.Graphics;
using osu.Framework.Input.Events;
using osu.Game.Graphics.Containers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace osu.Game.Rulesets.RurusettoAddon.UI {
public class TogglableScrollContainer : OsuScrollContainer {
Expand Down

0 comments on commit 621e817

Please sign in to comment.