Merge branch 'master' into beatmap-detail-tabs

This commit is contained in:
Dean Herbert
2017-03-23 14:26:00 +09:00
committed by GitHub
120 changed files with 345 additions and 289 deletions

View File

@ -81,9 +81,14 @@ namespace osu.Game.Graphics.UserInterface
public SampleChannel SampleClick, SampleHover;
private Container backgroundContainer, colourContainer, glowContainer;
private Box leftGlow, centerGlow, rightGlow, background;
private SpriteText spriteText;
private readonly Container backgroundContainer;
private readonly Container colourContainer;
private readonly Container glowContainer;
private readonly Box leftGlow;
private readonly Box centerGlow;
private readonly Box rightGlow;
private readonly Box background;
private readonly SpriteText spriteText;
private Vector2 hoverSpacing => new Vector2(3f, 0f);
private bool didClick; // Used for making sure that the OnMouseDown animation can call instead of OnHoverLost's when clicking

View File

@ -18,7 +18,7 @@ namespace osu.Game.Graphics.UserInterface
public const float COLLAPSED_SIZE = 20;
public const float EXPANDED_SIZE = 40;
private Box fill;
private readonly Box fill;
private const float border_width = 3;
private Color4 glowingColour, idleColour;

View File

@ -64,8 +64,8 @@ namespace osu.Game.Graphics.UserInterface
}
}
private Nub nub;
private SpriteText labelSpriteText;
private readonly Nub nub;
private readonly SpriteText labelSpriteText;
private SampleChannel sampleChecked;
private SampleChannel sampleUnchecked;

View File

@ -85,7 +85,7 @@ namespace osu.Game.Graphics.UserInterface
private Color4? accentColour;
private TextAwesome chevron;
private readonly TextAwesome chevron;
protected override void FormatForeground(bool hover = false)
{
@ -116,7 +116,7 @@ namespace osu.Game.Graphics.UserInterface
protected class OsuDropdownHeader : DropdownHeader
{
private SpriteText label;
private readonly SpriteText label;
protected override string Label
{
get { return label.Text; }

View File

@ -18,7 +18,7 @@ namespace osu.Game.Graphics.UserInterface
public class PasswordMaskChar : Container
{
private CircularContainer circle;
private readonly CircularContainer circle;
public PasswordMaskChar(float size)
{

View File

@ -19,8 +19,9 @@ namespace osu.Game.Graphics.UserInterface
private SampleChannel sample;
private double lastSampleTime;
private Nub nub;
private Box leftBox, rightBox;
private readonly Nub nub;
private readonly Box leftBox;
private readonly Box rightBox;
public OsuSliderBar()
{

View File

@ -61,8 +61,8 @@ namespace osu.Game.Graphics.UserInterface
private class OsuTabItem : TabItem<T>
{
private SpriteText text;
private Box box;
private readonly SpriteText text;
private readonly Box box;
private Color4? accentColour;
public Color4 AccentColour

View File

@ -147,7 +147,7 @@ namespace osu.Game.Graphics.UserInterface
private class Star : Container
{
public TextAwesome Icon;
public readonly TextAwesome Icon;
public Star()
{
Size = new Vector2(star_size);

View File

@ -16,7 +16,7 @@ namespace osu.Game.Graphics.UserInterface
{
public class TwoLayerButton : ClickableContainer
{
private TextAwesome icon;
private readonly TextAwesome icon;
public Box IconLayer;
public Box TextLayer;
@ -29,11 +29,11 @@ namespace osu.Game.Graphics.UserInterface
public static readonly Vector2 SIZE_EXTENDED = new Vector2(140, 50);
public static readonly Vector2 SIZE_RETRACTED = new Vector2(100, 50);
public SampleChannel ActivationSound;
private SpriteText text;
private readonly SpriteText text;
public Color4 HoverColour;
private Container c1;
private Container c2;
private readonly Container c1;
private readonly Container c2;
public Color4 BackgroundColour
{
@ -171,7 +171,7 @@ namespace osu.Game.Graphics.UserInterface
IconLayer.FadeColour(HoverColour, transform_time, EasingTypes.OutElastic);
double offset = 0; //(1 - Game.Audio.SyncBeatProgress) * duration;
const double offset = 0; //(1 - Game.Audio.SyncBeatProgress) * duration;
double startTime = Time.Current + offset;
// basic pulse
@ -200,7 +200,7 @@ namespace osu.Game.Graphics.UserInterface
int duration = 0; //(int)(Game.Audio.BeatLength);
if (duration == 0) duration = pulse_length * 2;
double offset = 0; //(1 - Game.Audio.SyncBeatProgress) * duration;
const double offset = 0; //(1 - Game.Audio.SyncBeatProgress) * duration;
double startTime = Time.Current + offset;
// slow pulse

View File

@ -15,7 +15,7 @@ namespace osu.Game.Graphics.UserInterface.Volume
{
internal class VolumeControl : OverlayContainer
{
private VolumeMeter volumeMeterMaster;
private readonly VolumeMeter volumeMeterMaster;
protected override bool HideOnEscape => false;
@ -89,8 +89,8 @@ namespace osu.Game.Graphics.UserInterface.Volume
private ScheduledDelegate popOutDelegate;
private VolumeMeter volumeMeterEffect;
private VolumeMeter volumeMeterMusic;
private readonly VolumeMeter volumeMeterEffect;
private readonly VolumeMeter volumeMeterMusic;
protected override void PopIn()
{

View File

@ -15,7 +15,7 @@ namespace osu.Game.Graphics.UserInterface.Volume
{
internal class VolumeMeter : Container
{
private Box meterFill;
private readonly Box meterFill;
public BindableDouble Bindable { get; } = new BindableDouble();
public VolumeMeter(string meterName)