Skip to content

Commit

Permalink
use darker colours for default background on wiki page
Browse files Browse the repository at this point in the history
  • Loading branch information
Flutterish committed Dec 31, 2021
1 parent b166267 commit eff10c3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
9 changes: 6 additions & 3 deletions osu.Game.Rulesets.RurusettoAddon/UI/Info/InfoTab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,15 @@ protected override void LoadContent () {
new RulesetLogo( ruleset ) {
Height = 170f * 14 / 20,
Width = 170f * 14 / 20,
Margin = new MarginPadding { Right = 16 }
Margin = new MarginPadding { Right = 16 },
UseDarkerBackground = true
},
new DrawableRurusettoUser( Users.GetUserIdentity( ruleset.Owner ), ruleset.IsVerified ) {
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
Height = 64f * 14 / 20,
Margin = new MarginPadding { Bottom = 4 }
Margin = new MarginPadding { Bottom = 4 },
UseDarkerBackground = true
}
},
Margin = new MarginPadding { Bottom = 20 }
Expand All @@ -137,7 +139,8 @@ protected override void LoadContent () {
Height = 40f * 14 / 20,
Width = 200f * 14 / 20,
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight
Origin = Anchor.CentreRight,
UseDarkerBackground = true
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion osu.Game.Rulesets.RurusettoAddon/UI/RulesetDownloadButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class RulesetDownloadButton : GrayButton, IHasContextMenu {
LoadingSpinner spinner;
RulesetIdentity ruleset;
Warning warning;
public bool UseDarkerBackground { get; init; }
public RulesetDownloadButton ( RulesetIdentity ruleset ) : base( FontAwesome.Solid.Download ) {
this.ruleset = ruleset;
Action = onClick;
Expand Down Expand Up @@ -139,6 +140,7 @@ private void updateVisuals () {
spinner.Alpha = 0;
Icon.Alpha = 1;
this.FadeTo( 0.6f, 200 );
Background.FadeColour( UseDarkerBackground ? overlayColours.Background4 : overlayColours.Background3, 200, Easing.InOutExpo );
TooltipText = "Unavailable Online";
warning.FadeOut( 200 );
Icon.Scale = new osuTK.Vector2( 1.5f );
Expand All @@ -150,7 +152,7 @@ private void updateVisuals () {
spinner.Alpha = 0;
Icon.Alpha = 1;
this.FadeTo( 1f, 200 );
Background.FadeColour( overlayColours.Background3, 200, Easing.InOutExpo );
Background.FadeColour( UseDarkerBackground ? overlayColours.Background4 : overlayColours.Background3, 200, Easing.InOutExpo );
Icon.Scale = new osuTK.Vector2( 1.5f );
Icon.Icon = FontAwesome.Solid.Download;
TooltipText = "Download";
Expand Down
3 changes: 2 additions & 1 deletion osu.Game.Rulesets.RurusettoAddon/UI/RulesetLogo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ public class RulesetLogo : CompositeDrawable {
protected RurusettoAPI API { get; private set; }

RulesetIdentity ruleset;
public bool UseDarkerBackground { get; init; }
public RulesetLogo ( RulesetIdentity ruleset ) {
this.ruleset = ruleset;
}

[BackgroundDependencyLoader]
private void load ( OverlayColourProvider colours ) {
var color = colours.Background3;
var color = UseDarkerBackground ? colours.Background4 : colours.Background3;

InternalChildren = new Drawable[] {
new Circle {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class DrawableRurusettoUser : CompositeDrawable, IHasTooltip {
private bool isVerified;
Drawable verifiedDrawable;
UserProfile profile;

public bool UseDarkerBackground { get; init; }
public DrawableRurusettoUser ( UserIdentity user, bool isVerified = false ) {
this.isVerified = isVerified;
this.user = user;
Expand All @@ -50,7 +50,7 @@ public DrawableRurusettoUser ( UserIdentity user, bool isVerified = false ) {

[BackgroundDependencyLoader]
private void load () {
var color = colours.Background3;
var color = UseDarkerBackground ? colours.Background4 : colours.Background3;

AddInternal( new HoverClickSounds( HoverSampleSet.Button ) );
AddInternal( usernameFlow = new FillFlowContainer {
Expand Down

0 comments on commit eff10c3

Please sign in to comment.