mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Merge branch 'master' into modselect
This commit is contained in:
@ -132,7 +132,7 @@ namespace osu.Game.Overlays.Mods
|
||||
// 1.05x
|
||||
// 1.20x
|
||||
|
||||
multiplierLabel.Text = string.Format("{0:N2}x", multiplier);
|
||||
multiplierLabel.Text = $"{multiplier:N2}x";
|
||||
string rankedString = ranked ? "Ranked" : "Unranked";
|
||||
rankedLabel.Text = $@"{rankedString}, Score Multiplier: ";
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Threading.Tasks;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
@ -30,7 +31,7 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
private MusicControllerBackground backgroundSprite;
|
||||
private DragBar progress;
|
||||
private TextAwesome playButton, listButton;
|
||||
private TextAwesome playButton;
|
||||
private SpriteText title, artist;
|
||||
|
||||
private List<BeatmapSetInfo> playList;
|
||||
@ -59,6 +60,8 @@ namespace osu.Game.Overlays
|
||||
|
||||
protected override bool OnDrag(InputState state)
|
||||
{
|
||||
Trace.Assert(state.Mouse.PositionMouseDown != null, "state.Mouse.PositionMouseDown != null");
|
||||
|
||||
Vector2 change = state.Mouse.Position - state.Mouse.PositionMouseDown.Value;
|
||||
|
||||
// Diminish the drag distance as we go further to simulate "rubber band" feeling.
|
||||
@ -187,7 +190,7 @@ namespace osu.Game.Overlays
|
||||
Position = new Vector2(20, -30),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
listButton = new TextAwesome
|
||||
new TextAwesome
|
||||
{
|
||||
TextSize = 15,
|
||||
Icon = FontAwesome.fa_bars,
|
||||
|
@ -45,7 +45,7 @@ namespace osu.Game.Overlays.Notifications
|
||||
|
||||
public virtual bool Read { get; set; }
|
||||
|
||||
public Notification()
|
||||
protected Notification()
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
AutoSizeAxes = Axes.Y;
|
||||
|
@ -10,11 +10,8 @@ namespace osu.Game.Overlays.Notifications
|
||||
{
|
||||
public class ProgressCompletionNotification : SimpleNotification
|
||||
{
|
||||
private ProgressNotification progressNotification;
|
||||
|
||||
public ProgressCompletionNotification(ProgressNotification progressNotification)
|
||||
public ProgressCompletionNotification()
|
||||
{
|
||||
this.progressNotification = progressNotification;
|
||||
Icon = FontAwesome.fa_check;
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ namespace osu.Game.Overlays.Notifications
|
||||
|
||||
private ProgressNotificationState state;
|
||||
|
||||
protected virtual Notification CreateCompletionNotification() => new ProgressCompletionNotification(this)
|
||||
protected virtual Notification CreateCompletionNotification() => new ProgressCompletionNotification()
|
||||
{
|
||||
Activated = CompletionClickAction,
|
||||
Text = $"Task \"{Text}\" has completed!"
|
||||
|
@ -81,10 +81,8 @@ namespace osu.Game.Overlays.Notifications
|
||||
|
||||
set
|
||||
{
|
||||
if (base.Read = value)
|
||||
Light.FadeOut(100);
|
||||
else
|
||||
Light.FadeIn(100);
|
||||
base.Read = value;
|
||||
Light.FadeTo(value ? 1 : 0, 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ namespace osu.Game.Overlays.Options
|
||||
bindable.ValueChanged += bindable_ValueChanged;
|
||||
bindable_ValueChanged(null, null);
|
||||
|
||||
if (bindable?.Disabled ?? true)
|
||||
if (bindable.Disabled)
|
||||
Alpha = 0.3f;
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Overlays.Options
|
||||
|
||||
private SpriteText headerLabel;
|
||||
|
||||
public OptionsSection()
|
||||
protected OptionsSection()
|
||||
{
|
||||
Margin = new MarginPadding { Top = 20 };
|
||||
AutoSizeAxes = Axes.Y;
|
||||
|
@ -11,11 +11,13 @@ namespace osu.Game.Overlays.Options
|
||||
{
|
||||
public abstract class OptionsSubsection : FillFlowContainer
|
||||
{
|
||||
protected override Container<Drawable> Content { get; }
|
||||
protected override Container<Drawable> Content => content;
|
||||
|
||||
private Container<Drawable> content;
|
||||
|
||||
protected abstract string Header { get; }
|
||||
|
||||
public OptionsSubsection()
|
||||
protected OptionsSubsection()
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
AutoSizeAxes = Axes.Y;
|
||||
@ -28,7 +30,7 @@ namespace osu.Game.Overlays.Options
|
||||
Margin = new MarginPadding { Bottom = 10 },
|
||||
Font = @"Exo2.0-Black",
|
||||
},
|
||||
Content = new FillFlowContainer
|
||||
content = new FillFlowContainer
|
||||
{
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(0, 5),
|
||||
|
@ -118,7 +118,7 @@ namespace osu.Game.Overlays.Options.Sections.General
|
||||
PlaceholderText = "Password",
|
||||
RelativeSizeAxes = Axes.X,
|
||||
TabbableContentContainer = this,
|
||||
OnCommit = (TextBox sender, bool newText) => performLogin()
|
||||
OnCommit = (sender, newText) => performLogin()
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
|
@ -147,11 +147,8 @@ namespace osu.Game.Overlays
|
||||
|
||||
var previous = sidebarButtons.SingleOrDefault(sb => sb.Selected);
|
||||
var next = sidebarButtons.SingleOrDefault(sb => sb.Section == bestCandidate);
|
||||
if (next != null)
|
||||
{
|
||||
previous.Selected = false;
|
||||
next.Selected = true;
|
||||
}
|
||||
if (next != null) next.Selected = true;
|
||||
if (previous != null) previous.Selected = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
|
||||
protected override bool BlockPassThroughInput => false;
|
||||
|
||||
private const int transition_time = 500;
|
||||
private const double transition_time = 500;
|
||||
|
||||
private const float alpha_hovering = 0.8f;
|
||||
private const float alpha_normal = 0.6f;
|
||||
@ -56,7 +56,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
},
|
||||
modeSelector = new ToolbarModeSelector
|
||||
{
|
||||
OnPlayModeChange = (PlayMode mode) =>
|
||||
OnPlayModeChange = mode =>
|
||||
{
|
||||
OnPlayModeChange?.Invoke(mode);
|
||||
}
|
||||
|
@ -64,11 +64,8 @@ namespace osu.Game.Overlays.Toolbar
|
||||
}
|
||||
};
|
||||
|
||||
int amountButtons = 0;
|
||||
foreach (PlayMode m in Enum.GetValues(typeof(PlayMode)))
|
||||
{
|
||||
++amountButtons;
|
||||
|
||||
var localMode = m;
|
||||
modeButtons.Add(new ToolbarModeButton
|
||||
{
|
||||
|
@ -94,11 +94,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
|
||||
userId = value;
|
||||
|
||||
Sprite newSprite;
|
||||
if (userId > 1)
|
||||
newSprite = new OnlineSprite($@"https://a.ppy.sh/{userId}");
|
||||
else
|
||||
newSprite = new Sprite { Texture = guestTexture };
|
||||
var newSprite = userId > 1 ? new OnlineSprite($@"https://a.ppy.sh/{userId}") : new Sprite { Texture = guestTexture };
|
||||
|
||||
newSprite.FillMode = FillMode.Fit;
|
||||
|
||||
|
Reference in New Issue
Block a user