mirror of
https://github.com/osukey/osukey.git
synced 2025-07-04 09:49:55 +09:00
Fix incorrect line endings.
This commit is contained in:
@ -1,29 +1,29 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework;
|
using osu.Framework;
|
||||||
using osu.Framework.Desktop.Platform;
|
using osu.Framework.Desktop.Platform;
|
||||||
using SQLite.Net;
|
using SQLite.Net;
|
||||||
using SQLite.Net.Interop;
|
using SQLite.Net.Interop;
|
||||||
using SQLite.Net.Platform.Generic;
|
using SQLite.Net.Platform.Generic;
|
||||||
using SQLite.Net.Platform.Win32;
|
using SQLite.Net.Platform.Win32;
|
||||||
|
|
||||||
namespace osu.Desktop.VisualTests.Platform
|
namespace osu.Desktop.VisualTests.Platform
|
||||||
{
|
{
|
||||||
public class TestStorage : DesktopStorage
|
public class TestStorage : DesktopStorage
|
||||||
{
|
{
|
||||||
public TestStorage(string baseName) : base(baseName)
|
public TestStorage(string baseName) : base(baseName)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public override SQLiteConnection GetDatabase(string name)
|
public override SQLiteConnection GetDatabase(string name)
|
||||||
{
|
{
|
||||||
ISQLitePlatform platform;
|
ISQLitePlatform platform;
|
||||||
if (RuntimeInfo.IsWindows)
|
if (RuntimeInfo.IsWindows)
|
||||||
platform = new SQLitePlatformWin32();
|
platform = new SQLitePlatformWin32();
|
||||||
else
|
else
|
||||||
platform = new SQLitePlatformGeneric();
|
platform = new SQLitePlatformGeneric();
|
||||||
return new SQLiteConnection(platform, $@":memory:");
|
return new SQLiteConnection(platform, $@":memory:");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,44 +1,44 @@
|
|||||||
using System;
|
using System;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Overlays.Pause;
|
using osu.Game.Overlays.Pause;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.Colour;
|
using osu.Framework.Graphics.Colour;
|
||||||
using osu.Framework.GameModes.Testing;
|
using osu.Framework.GameModes.Testing;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Desktop.VisualTests.Tests
|
namespace osu.Desktop.VisualTests.Tests
|
||||||
{
|
{
|
||||||
class TestCasePauseOverlay : TestCase
|
class TestCasePauseOverlay : TestCase
|
||||||
{
|
{
|
||||||
public override string Name => @"PauseOverlay";
|
public override string Name => @"PauseOverlay";
|
||||||
|
|
||||||
public override string Description => @"Tests the pause overlay";
|
public override string Description => @"Tests the pause overlay";
|
||||||
|
|
||||||
private PauseOverlay pauseOverlay;
|
private PauseOverlay pauseOverlay;
|
||||||
private int retryCount;
|
private int retryCount;
|
||||||
|
|
||||||
public override void Reset()
|
public override void Reset()
|
||||||
{
|
{
|
||||||
base.Reset();
|
base.Reset();
|
||||||
|
|
||||||
Add(pauseOverlay = new PauseOverlay
|
Add(pauseOverlay = new PauseOverlay
|
||||||
{
|
{
|
||||||
Depth = -1,
|
Depth = -1,
|
||||||
OnResume = () => Logger.Log(@"Resume"),
|
OnResume = () => Logger.Log(@"Resume"),
|
||||||
OnRetry = () => Logger.Log(@"Retry"),
|
OnRetry = () => Logger.Log(@"Retry"),
|
||||||
OnQuit = () => Logger.Log(@"Quit")
|
OnQuit = () => Logger.Log(@"Quit")
|
||||||
});
|
});
|
||||||
AddButton("Pause", pauseOverlay.Show);
|
AddButton("Pause", pauseOverlay.Show);
|
||||||
AddButton("Add Retry", delegate
|
AddButton("Add Retry", delegate
|
||||||
{
|
{
|
||||||
retryCount++;
|
retryCount++;
|
||||||
pauseOverlay.Retries = retryCount;
|
pauseOverlay.Retries = retryCount;
|
||||||
});
|
});
|
||||||
|
|
||||||
retryCount = 0;
|
retryCount = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,55 +1,55 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Colour;
|
using osu.Framework.Graphics.Colour;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Modes;
|
using osu.Game.Modes;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Beatmaps.Drawables
|
namespace osu.Game.Beatmaps.Drawables
|
||||||
{
|
{
|
||||||
class DifficultyIcon : Container
|
class DifficultyIcon : Container
|
||||||
{
|
{
|
||||||
private readonly BeatmapInfo beatmap;
|
private readonly BeatmapInfo beatmap;
|
||||||
private OsuColour palette;
|
private OsuColour palette;
|
||||||
|
|
||||||
public DifficultyIcon(BeatmapInfo beatmap)
|
public DifficultyIcon(BeatmapInfo beatmap)
|
||||||
{
|
{
|
||||||
this.beatmap = beatmap;
|
this.beatmap = beatmap;
|
||||||
const float size = 20;
|
const float size = 20;
|
||||||
Size = new Vector2(size);
|
Size = new Vector2(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour palette)
|
private void load(OsuColour palette)
|
||||||
{
|
{
|
||||||
this.palette = palette;
|
this.palette = palette;
|
||||||
|
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
new TextAwesome
|
new TextAwesome
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
TextSize = Size.X,
|
TextSize = Size.X,
|
||||||
Colour = getColour(beatmap),
|
Colour = getColour(beatmap),
|
||||||
Icon = FontAwesome.fa_circle
|
Icon = FontAwesome.fa_circle
|
||||||
},
|
},
|
||||||
new TextAwesome
|
new TextAwesome
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
TextSize = Size.X,
|
TextSize = Size.X,
|
||||||
Colour = Color4.White,
|
Colour = Color4.White,
|
||||||
Icon = Ruleset.GetRuleset(beatmap.Mode).Icon
|
Icon = Ruleset.GetRuleset(beatmap.Mode).Icon
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
enum DifficultyRating
|
enum DifficultyRating
|
||||||
{
|
{
|
||||||
Easy,
|
Easy,
|
||||||
@ -57,35 +57,35 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
Hard,
|
Hard,
|
||||||
Insane,
|
Insane,
|
||||||
Expert
|
Expert
|
||||||
}
|
}
|
||||||
|
|
||||||
private DifficultyRating getDifficultyRating(BeatmapInfo beatmap)
|
private DifficultyRating getDifficultyRating(BeatmapInfo beatmap)
|
||||||
{
|
{
|
||||||
var rating = beatmap.StarDifficulty;
|
var rating = beatmap.StarDifficulty;
|
||||||
|
|
||||||
if (rating < 1.5) return DifficultyRating.Easy;
|
if (rating < 1.5) return DifficultyRating.Easy;
|
||||||
if (rating < 2.25) return DifficultyRating.Normal;
|
if (rating < 2.25) return DifficultyRating.Normal;
|
||||||
if (rating < 3.75) return DifficultyRating.Hard;
|
if (rating < 3.75) return DifficultyRating.Hard;
|
||||||
if (rating < 5.25) return DifficultyRating.Insane;
|
if (rating < 5.25) return DifficultyRating.Insane;
|
||||||
return DifficultyRating.Expert;
|
return DifficultyRating.Expert;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Color4 getColour(BeatmapInfo beatmap)
|
private Color4 getColour(BeatmapInfo beatmap)
|
||||||
{
|
{
|
||||||
switch (getDifficultyRating(beatmap))
|
switch (getDifficultyRating(beatmap))
|
||||||
{
|
{
|
||||||
case DifficultyRating.Easy:
|
case DifficultyRating.Easy:
|
||||||
return palette.Green;
|
return palette.Green;
|
||||||
default:
|
default:
|
||||||
case DifficultyRating.Normal:
|
case DifficultyRating.Normal:
|
||||||
return palette.Yellow;
|
return palette.Yellow;
|
||||||
case DifficultyRating.Hard:
|
case DifficultyRating.Hard:
|
||||||
return palette.Pink;
|
return palette.Pink;
|
||||||
case DifficultyRating.Insane:
|
case DifficultyRating.Insane:
|
||||||
return palette.Purple;
|
return palette.Purple;
|
||||||
case DifficultyRating.Expert:
|
case DifficultyRating.Expert:
|
||||||
return palette.Gray0;
|
return palette.Gray0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -63,4 +63,4 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace osu.Game.Configuration
|
namespace osu.Game.Configuration
|
||||||
{
|
{
|
||||||
public enum ProgressBarType
|
public enum ProgressBarType
|
||||||
{
|
{
|
||||||
Off,
|
Off,
|
||||||
Pie,
|
Pie,
|
||||||
[Description("Top Right")]
|
[Description("Top Right")]
|
||||||
TopRight,
|
TopRight,
|
||||||
[Description("Bottom Right")]
|
[Description("Bottom Right")]
|
||||||
BottomRight,
|
BottomRight,
|
||||||
Bottom
|
Bottom
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,16 +1,16 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace osu.Game.Configuration
|
namespace osu.Game.Configuration
|
||||||
{
|
{
|
||||||
public enum RankingType
|
public enum RankingType
|
||||||
{
|
{
|
||||||
Local,
|
Local,
|
||||||
[Description("Global")]
|
[Description("Global")]
|
||||||
Top,
|
Top,
|
||||||
[Description("Selected Mods")]
|
[Description("Selected Mods")]
|
||||||
SelectedMod,
|
SelectedMod,
|
||||||
Friends,
|
Friends,
|
||||||
Country
|
Country
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,11 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
namespace osu.Game.Configuration
|
namespace osu.Game.Configuration
|
||||||
{
|
{
|
||||||
public enum ReleaseStream
|
public enum ReleaseStream
|
||||||
{
|
{
|
||||||
Lazer,
|
Lazer,
|
||||||
//Stable40,
|
//Stable40,
|
||||||
//Beta40,
|
//Beta40,
|
||||||
//Stable
|
//Stable
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,10 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
namespace osu.Game.Configuration
|
namespace osu.Game.Configuration
|
||||||
{
|
{
|
||||||
public enum ScoreMeterType
|
public enum ScoreMeterType
|
||||||
{
|
{
|
||||||
None,
|
None,
|
||||||
Colour,
|
Colour,
|
||||||
Error
|
Error
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,32 +1,32 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using SQLite.Net.Attributes;
|
using SQLite.Net.Attributes;
|
||||||
using SQLiteNetExtensions.Attributes;
|
using SQLiteNetExtensions.Attributes;
|
||||||
|
|
||||||
namespace osu.Game.Database
|
namespace osu.Game.Database
|
||||||
{
|
{
|
||||||
public class BeatmapSetInfo
|
public class BeatmapSetInfo
|
||||||
{
|
{
|
||||||
[PrimaryKey, AutoIncrement]
|
[PrimaryKey, AutoIncrement]
|
||||||
public int ID { get; set; }
|
public int ID { get; set; }
|
||||||
|
|
||||||
public int? OnlineBeatmapSetID { get; set; } = null;
|
public int? OnlineBeatmapSetID { get; set; } = null;
|
||||||
|
|
||||||
[OneToOne(CascadeOperations = CascadeOperation.All)]
|
[OneToOne(CascadeOperations = CascadeOperation.All)]
|
||||||
public BeatmapMetadata Metadata { get; set; }
|
public BeatmapMetadata Metadata { get; set; }
|
||||||
|
|
||||||
[NotNull, ForeignKey(typeof(BeatmapMetadata))]
|
[NotNull, ForeignKey(typeof(BeatmapMetadata))]
|
||||||
public int BeatmapMetadataID { get; set; }
|
public int BeatmapMetadataID { get; set; }
|
||||||
|
|
||||||
[OneToMany(CascadeOperations = CascadeOperation.All)]
|
[OneToMany(CascadeOperations = CascadeOperation.All)]
|
||||||
public List<BeatmapInfo> Beatmaps { get; set; }
|
public List<BeatmapInfo> Beatmaps { get; set; }
|
||||||
|
|
||||||
public string Hash { get; set; }
|
public string Hash { get; set; }
|
||||||
|
|
||||||
public string Path { get; set; }
|
public string Path { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterface
|
namespace osu.Game.Graphics.UserInterface
|
||||||
{
|
{
|
||||||
public class LoadingAnimation : SpriteText
|
public class LoadingAnimation : SpriteText
|
||||||
{
|
{
|
||||||
public LoadingAnimation()
|
public LoadingAnimation()
|
||||||
{
|
{
|
||||||
Text = "Loading";
|
Text = "Loading";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,27 +1,27 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.Transformations;
|
using osu.Framework.Graphics.Transformations;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
using osu.Game.Graphics.Backgrounds;
|
using osu.Game.Graphics.Backgrounds;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterface
|
namespace osu.Game.Graphics.UserInterface
|
||||||
{
|
{
|
||||||
public class OsuButton : Button
|
public class OsuButton : Button
|
||||||
{
|
{
|
||||||
private Box hover;
|
private Box hover;
|
||||||
|
|
||||||
public OsuButton()
|
public OsuButton()
|
||||||
{
|
{
|
||||||
Height = 40;
|
Height = 40;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override SpriteText CreateText() => new OsuSpriteText
|
protected override SpriteText CreateText() => new OsuSpriteText
|
||||||
@ -32,14 +32,14 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Font = @"Exo2.0-Bold",
|
Font = @"Exo2.0-Bold",
|
||||||
};
|
};
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
Colour = colours.BlueDark;
|
Colour = colours.BlueDark;
|
||||||
|
|
||||||
Content.Masking = true;
|
Content.Masking = true;
|
||||||
Content.CornerRadius = 5;
|
Content.CornerRadius = 5;
|
||||||
|
|
||||||
Add(new Drawable[]
|
Add(new Drawable[]
|
||||||
{
|
{
|
||||||
new Triangles
|
new Triangles
|
||||||
@ -55,31 +55,31 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Colour = Color4.White.Opacity(0.1f),
|
Colour = Color4.White.Opacity(0.1f),
|
||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnHover(InputState state)
|
protected override bool OnHover(InputState state)
|
||||||
{
|
{
|
||||||
hover.FadeIn(200);
|
hover.FadeIn(200);
|
||||||
return base.OnHover(state);
|
return base.OnHover(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnHoverLost(InputState state)
|
protected override void OnHoverLost(InputState state)
|
||||||
{
|
{
|
||||||
hover.FadeOut(200);
|
hover.FadeOut(200);
|
||||||
base.OnHoverLost(state);
|
base.OnHoverLost(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||||
{
|
{
|
||||||
Content.ScaleTo(0.9f, 4000, EasingTypes.OutQuint);
|
Content.ScaleTo(0.9f, 4000, EasingTypes.OutQuint);
|
||||||
return base.OnMouseDown(state, args);
|
return base.OnMouseDown(state, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
||||||
{
|
{
|
||||||
Content.ScaleTo(1, 1000, EasingTypes.OutElastic);
|
Content.ScaleTo(1, 1000, EasingTypes.OutElastic);
|
||||||
return base.OnMouseUp(state, args);
|
return base.OnMouseUp(state, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,53 +1,53 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options
|
namespace osu.Game.Overlays.Options
|
||||||
{
|
{
|
||||||
public class OptionTextBox : OsuTextBox
|
public class OptionTextBox : OsuTextBox
|
||||||
{
|
{
|
||||||
private Bindable<string> bindable;
|
private Bindable<string> bindable;
|
||||||
|
|
||||||
public Bindable<string> Bindable
|
public Bindable<string> Bindable
|
||||||
{
|
{
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (bindable != null)
|
if (bindable != null)
|
||||||
bindable.ValueChanged -= bindableValueChanged;
|
bindable.ValueChanged -= bindableValueChanged;
|
||||||
bindable = value;
|
bindable = value;
|
||||||
if (bindable != null)
|
if (bindable != null)
|
||||||
{
|
{
|
||||||
base.Text = bindable.Value;
|
base.Text = bindable.Value;
|
||||||
bindable.ValueChanged += bindableValueChanged;
|
bindable.ValueChanged += bindableValueChanged;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string InternalText
|
protected override string InternalText
|
||||||
{
|
{
|
||||||
get { return base.InternalText; }
|
get { return base.InternalText; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
base.InternalText = value;
|
base.InternalText = value;
|
||||||
if (bindable != null)
|
if (bindable != null)
|
||||||
bindable.Value = value;
|
bindable.Value = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void bindableValueChanged(object sender, EventArgs e)
|
private void bindableValueChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Text = bindable.Value;
|
Text = bindable.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
protected override void Dispose(bool isDisposing)
|
||||||
{
|
{
|
||||||
if (bindable != null)
|
if (bindable != null)
|
||||||
bindable.ValueChanged -= bindableValueChanged;
|
bindable.ValueChanged -= bindableValueChanged;
|
||||||
base.Dispose(isDisposing);
|
base.Dispose(isDisposing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,44 +1,44 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Primitives;
|
using osu.Framework.Graphics.Primitives;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options
|
namespace osu.Game.Overlays.Options
|
||||||
{
|
{
|
||||||
public abstract class OptionsSubsection : FlowContainer
|
public abstract class OptionsSubsection : FlowContainer
|
||||||
{
|
{
|
||||||
private Container<Drawable> content;
|
private Container<Drawable> content;
|
||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => content;
|
||||||
|
|
||||||
protected abstract string Header { get; }
|
protected abstract string Header { get; }
|
||||||
|
|
||||||
public OptionsSubsection()
|
public OptionsSubsection()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
AutoSizeAxes = Axes.Y;
|
AutoSizeAxes = Axes.Y;
|
||||||
Direction = FlowDirection.VerticalOnly;
|
Direction = FlowDirection.VerticalOnly;
|
||||||
AddInternal(new Drawable[]
|
AddInternal(new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = Header.ToUpper(),
|
Text = Header.ToUpper(),
|
||||||
Margin = new MarginPadding { Bottom = 10 },
|
Margin = new MarginPadding { Bottom = 10 },
|
||||||
Font = @"Exo2.0-Black",
|
Font = @"Exo2.0-Black",
|
||||||
},
|
},
|
||||||
content = new FlowContainer
|
content = new FlowContainer
|
||||||
{
|
{
|
||||||
Direction = FlowDirection.VerticalOnly,
|
Direction = FlowDirection.VerticalOnly,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Spacing = new Vector2(0, 5),
|
Spacing = new Vector2(0, 5),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections.Audio
|
namespace osu.Game.Overlays.Options.Sections.Audio
|
||||||
{
|
{
|
||||||
public class AudioDevicesOptions : OptionsSubsection
|
public class AudioDevicesOptions : OptionsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Devices";
|
protected override string Header => "Devices";
|
||||||
|
|
||||||
public AudioDevicesOptions()
|
public AudioDevicesOptions()
|
||||||
{
|
{
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
new OptionLabel { Text = "Output device: TODO dropdown" }
|
new OptionLabel { Text = "Output device: TODO dropdown" }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,17 +1,17 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections.Audio
|
namespace osu.Game.Overlays.Options.Sections.Audio
|
||||||
{
|
{
|
||||||
public class OffsetOptions : OptionsSubsection
|
public class OffsetOptions : OptionsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Offset Adjustment";
|
protected override string Header => "Offset Adjustment";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
@ -29,6 +29,6 @@ namespace osu.Game.Overlays.Options.Sections.Audio
|
|||||||
Text = "Offset wizard"
|
Text = "Offset wizard"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,26 +1,26 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework;
|
using osu.Framework;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Overlays.Options.Sections.Audio;
|
using osu.Game.Overlays.Options.Sections.Audio;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections
|
namespace osu.Game.Overlays.Options.Sections
|
||||||
{
|
{
|
||||||
public class AudioSection : OptionsSection
|
public class AudioSection : OptionsSection
|
||||||
{
|
{
|
||||||
public override string Header => "Audio";
|
public override string Header => "Audio";
|
||||||
public override FontAwesome Icon => FontAwesome.fa_headphones;
|
public override FontAwesome Icon => FontAwesome.fa_headphones;
|
||||||
|
|
||||||
public AudioSection()
|
public AudioSection()
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new AudioDevicesOptions { Alpha = RuntimeInfo.IsWindows ? 1 : 0 },
|
new AudioDevicesOptions { Alpha = RuntimeInfo.IsWindows ? 1 : 0 },
|
||||||
new VolumeOptions(),
|
new VolumeOptions(),
|
||||||
new OffsetOptions(),
|
new OffsetOptions(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,16 +1,16 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections.Gameplay
|
namespace osu.Game.Overlays.Options.Sections.Gameplay
|
||||||
{
|
{
|
||||||
public class SongSelectOptions : OptionsSubsection
|
public class SongSelectOptions : OptionsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Song Select";
|
protected override string Header => "Song Select";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
@ -29,6 +29,6 @@ namespace osu.Game.Overlays.Options.Sections.Gameplay
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Overlays.Options.Sections.Gameplay;
|
using osu.Game.Overlays.Options.Sections.Gameplay;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections
|
namespace osu.Game.Overlays.Options.Sections
|
||||||
{
|
{
|
||||||
public class GameplaySection : OptionsSection
|
public class GameplaySection : OptionsSection
|
||||||
{
|
{
|
||||||
public override string Header => "Gameplay";
|
public override string Header => "Gameplay";
|
||||||
public override FontAwesome Icon => FontAwesome.fa_circle_o;
|
public override FontAwesome Icon => FontAwesome.fa_circle_o;
|
||||||
|
|
||||||
public GameplaySection()
|
public GameplaySection()
|
||||||
{
|
{
|
||||||
base.Children = new Drawable[]
|
base.Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new Gameplay.GeneralOptions(),
|
new Gameplay.GeneralOptions(),
|
||||||
new SongSelectOptions(),
|
new SongSelectOptions(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,148 +1,148 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Primitives;
|
using osu.Framework.Graphics.Primitives;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections.General
|
namespace osu.Game.Overlays.Options.Sections.General
|
||||||
{
|
{
|
||||||
public class LoginOptions : OptionsSubsection, IOnlineComponent
|
public class LoginOptions : OptionsSubsection, IOnlineComponent
|
||||||
{
|
{
|
||||||
private bool bounding = true;
|
private bool bounding = true;
|
||||||
|
|
||||||
protected override string Header => "Sign In";
|
protected override string Header => "Sign In";
|
||||||
|
|
||||||
public override RectangleF BoundingBox => bounding ? base.BoundingBox : RectangleF.Empty;
|
public override RectangleF BoundingBox => bounding ? base.BoundingBox : RectangleF.Empty;
|
||||||
|
|
||||||
public bool Bounding
|
public bool Bounding
|
||||||
{
|
{
|
||||||
get { return bounding; }
|
get { return bounding; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
bounding = value;
|
bounding = value;
|
||||||
Invalidate(Invalidation.Geometry);
|
Invalidate(Invalidation.Geometry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader(permitNulls: true)]
|
[BackgroundDependencyLoader(permitNulls: true)]
|
||||||
private void load(APIAccess api)
|
private void load(APIAccess api)
|
||||||
{
|
{
|
||||||
api?.Register(this);
|
api?.Register(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void APIStateChanged(APIAccess api, APIState state)
|
public void APIStateChanged(APIAccess api, APIState state)
|
||||||
{
|
{
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case APIState.Offline:
|
case APIState.Offline:
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new LoginForm()
|
new LoginForm()
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case APIState.Failing:
|
case APIState.Failing:
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = "Connection failing :(",
|
Text = "Connection failing :(",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case APIState.Connecting:
|
case APIState.Connecting:
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = "Connecting...",
|
Text = "Connecting...",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case APIState.Online:
|
case APIState.Online:
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = $"Connected as {api.Username}!",
|
Text = $"Connected as {api.Username}!",
|
||||||
},
|
},
|
||||||
new OsuButton
|
new OsuButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Text = "Sign out",
|
Text = "Sign out",
|
||||||
Action = api.Logout
|
Action = api.Logout
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class LoginForm : FlowContainer
|
class LoginForm : FlowContainer
|
||||||
{
|
{
|
||||||
private TextBox username;
|
private TextBox username;
|
||||||
private TextBox password;
|
private TextBox password;
|
||||||
private APIAccess api;
|
private APIAccess api;
|
||||||
|
|
||||||
private OsuCheckbox saveUsername;
|
private OsuCheckbox saveUsername;
|
||||||
private OsuCheckbox savePassword;
|
private OsuCheckbox savePassword;
|
||||||
|
|
||||||
private void performLogin()
|
private void performLogin()
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(username.Text) && !string.IsNullOrEmpty(password.Text))
|
if (!string.IsNullOrEmpty(username.Text) && !string.IsNullOrEmpty(password.Text))
|
||||||
api.Login(username.Text, password.Text);
|
api.Login(username.Text, password.Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader(permitNulls: true)]
|
[BackgroundDependencyLoader(permitNulls: true)]
|
||||||
private void load(APIAccess api, OsuConfigManager config)
|
private void load(APIAccess api, OsuConfigManager config)
|
||||||
{
|
{
|
||||||
this.api = api;
|
this.api = api;
|
||||||
Direction = FlowDirection.VerticalOnly;
|
Direction = FlowDirection.VerticalOnly;
|
||||||
AutoSizeAxes = Axes.Y;
|
AutoSizeAxes = Axes.Y;
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Spacing = new Vector2(0, 5);
|
Spacing = new Vector2(0, 5);
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
username = new OsuTextBox
|
username = new OsuTextBox
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Text = api?.Username ?? string.Empty
|
Text = api?.Username ?? string.Empty
|
||||||
},
|
},
|
||||||
password = new OsuPasswordTextBox
|
password = new OsuPasswordTextBox
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X
|
RelativeSizeAxes = Axes.X
|
||||||
},
|
},
|
||||||
saveUsername = new OsuCheckbox
|
saveUsername = new OsuCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Remember username",
|
LabelText = "Remember username",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.SaveUsername),
|
Bindable = config.GetBindable<bool>(OsuConfig.SaveUsername),
|
||||||
},
|
},
|
||||||
savePassword = new OsuCheckbox
|
savePassword = new OsuCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Stay logged in",
|
LabelText = "Stay logged in",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.SavePassword),
|
Bindable = config.GetBindable<bool>(OsuConfig.SavePassword),
|
||||||
},
|
},
|
||||||
new OsuButton
|
new OsuButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Text = "Sign in",
|
Text = "Sign in",
|
||||||
Action = performLogin
|
Action = performLogin
|
||||||
},
|
},
|
||||||
new OsuButton
|
new OsuButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Text = "Register new account",
|
Text = "Register new account",
|
||||||
//Action = registerLink
|
//Action = registerLink
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Overlays.Options.Sections.General;
|
using osu.Game.Overlays.Options.Sections.General;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections
|
namespace osu.Game.Overlays.Options.Sections
|
||||||
{
|
{
|
||||||
public class GeneralSection : OptionsSection
|
public class GeneralSection : OptionsSection
|
||||||
{
|
{
|
||||||
public override string Header => "General";
|
public override string Header => "General";
|
||||||
public override FontAwesome Icon => FontAwesome.fa_gear;
|
public override FontAwesome Icon => FontAwesome.fa_gear;
|
||||||
|
|
||||||
public GeneralSection()
|
public GeneralSection()
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new LanguageOptions(),
|
new LanguageOptions(),
|
||||||
new UpdateOptions(),
|
new UpdateOptions(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,28 +1,28 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Overlays.Options.Sections.Graphics;
|
using osu.Game.Overlays.Options.Sections.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections
|
namespace osu.Game.Overlays.Options.Sections
|
||||||
{
|
{
|
||||||
public class GraphicsSection : OptionsSection
|
public class GraphicsSection : OptionsSection
|
||||||
{
|
{
|
||||||
public override string Header => "Graphics";
|
public override string Header => "Graphics";
|
||||||
public override FontAwesome Icon => FontAwesome.fa_laptop;
|
public override FontAwesome Icon => FontAwesome.fa_laptop;
|
||||||
|
|
||||||
public GraphicsSection()
|
public GraphicsSection()
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new RendererOptions(),
|
new RendererOptions(),
|
||||||
new LayoutOptions(),
|
new LayoutOptions(),
|
||||||
new DetailOptions(),
|
new DetailOptions(),
|
||||||
new MainMenuOptions(),
|
new MainMenuOptions(),
|
||||||
new SongSelectGraphicsOptions(),
|
new SongSelectGraphicsOptions(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,30 +1,30 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections.Input
|
namespace osu.Game.Overlays.Options.Sections.Input
|
||||||
{
|
{
|
||||||
public class KeyboardOptions : OptionsSubsection
|
public class KeyboardOptions : OptionsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Keyboard";
|
protected override string Header => "Keyboard";
|
||||||
|
|
||||||
public KeyboardOptions()
|
public KeyboardOptions()
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuButton
|
new OsuButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Text = "Change keyboard bindings"
|
Text = "Change keyboard bindings"
|
||||||
},
|
},
|
||||||
new OsuButton
|
new OsuButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Text = "osu!mania layout"
|
Text = "osu!mania layout"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,26 +1,26 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Overlays.Options.Sections.Input;
|
using osu.Game.Overlays.Options.Sections.Input;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections
|
namespace osu.Game.Overlays.Options.Sections
|
||||||
{
|
{
|
||||||
public class InputSection : OptionsSection
|
public class InputSection : OptionsSection
|
||||||
{
|
{
|
||||||
public override string Header => "Input";
|
public override string Header => "Input";
|
||||||
public override FontAwesome Icon => FontAwesome.fa_keyboard_o;
|
public override FontAwesome Icon => FontAwesome.fa_keyboard_o;
|
||||||
|
|
||||||
public InputSection()
|
public InputSection()
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new MouseOptions(),
|
new MouseOptions(),
|
||||||
new KeyboardOptions(),
|
new KeyboardOptions(),
|
||||||
new OtherInputOptions(),
|
new OtherInputOptions(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,50 +1,50 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections
|
namespace osu.Game.Overlays.Options.Sections
|
||||||
{
|
{
|
||||||
public class MaintenanceSection : OptionsSection
|
public class MaintenanceSection : OptionsSection
|
||||||
{
|
{
|
||||||
public override string Header => "Maintenance";
|
public override string Header => "Maintenance";
|
||||||
public override FontAwesome Icon => FontAwesome.fa_wrench;
|
public override FontAwesome Icon => FontAwesome.fa_wrench;
|
||||||
|
|
||||||
public MaintenanceSection()
|
public MaintenanceSection()
|
||||||
{
|
{
|
||||||
content.Spacing = new Vector2(0, 5);
|
content.Spacing = new Vector2(0, 5);
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuButton
|
new OsuButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Text = "Delete all unranked maps",
|
Text = "Delete all unranked maps",
|
||||||
},
|
},
|
||||||
new OsuButton
|
new OsuButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Text = "Repair folder permissions",
|
Text = "Repair folder permissions",
|
||||||
},
|
},
|
||||||
new OsuButton
|
new OsuButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Text = "Mark all maps as played",
|
Text = "Mark all maps as played",
|
||||||
},
|
},
|
||||||
new OsuButton
|
new OsuButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Text = "Run osu! updater",
|
Text = "Run osu! updater",
|
||||||
},
|
},
|
||||||
new OptionLabel
|
new OptionLabel
|
||||||
{
|
{
|
||||||
Text = "TODO: osu version here",
|
Text = "TODO: osu version here",
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,55 +1,55 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections.Online
|
namespace osu.Game.Overlays.Options.Sections.Online
|
||||||
{
|
{
|
||||||
public class InGameChatOptions : OptionsSubsection
|
public class InGameChatOptions : OptionsSubsection
|
||||||
{
|
{
|
||||||
private OptionTextBox chatIgnoreList;
|
private OptionTextBox chatIgnoreList;
|
||||||
private OptionTextBox chatHighlightWords;
|
private OptionTextBox chatHighlightWords;
|
||||||
protected override string Header => "Chat";
|
protected override string Header => "Chat";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuCheckbox
|
new OsuCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Filter offensive words",
|
LabelText = "Filter offensive words",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.ChatFilter)
|
Bindable = config.GetBindable<bool>(OsuConfig.ChatFilter)
|
||||||
},
|
},
|
||||||
new OsuCheckbox
|
new OsuCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Filter foreign characters",
|
LabelText = "Filter foreign characters",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.ChatRemoveForeign)
|
Bindable = config.GetBindable<bool>(OsuConfig.ChatRemoveForeign)
|
||||||
},
|
},
|
||||||
new OsuCheckbox
|
new OsuCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Log private messages",
|
LabelText = "Log private messages",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.LogPrivateMessages)
|
Bindable = config.GetBindable<bool>(OsuConfig.LogPrivateMessages)
|
||||||
},
|
},
|
||||||
new OsuCheckbox
|
new OsuCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Block private messages from non-friends",
|
LabelText = "Block private messages from non-friends",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.BlockNonFriendPM)
|
Bindable = config.GetBindable<bool>(OsuConfig.BlockNonFriendPM)
|
||||||
},
|
},
|
||||||
new OptionLabel { Text = "Chat ignore list (space-seperated list)" },
|
new OptionLabel { Text = "Chat ignore list (space-seperated list)" },
|
||||||
chatIgnoreList = new OptionTextBox {
|
chatIgnoreList = new OptionTextBox {
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Bindable = config.GetBindable<string>(OsuConfig.IgnoreList)
|
Bindable = config.GetBindable<string>(OsuConfig.IgnoreList)
|
||||||
},
|
},
|
||||||
new OptionLabel { Text = "Chat highlight words (space-seperated list)" },
|
new OptionLabel { Text = "Chat highlight words (space-seperated list)" },
|
||||||
chatHighlightWords = new OptionTextBox {
|
chatHighlightWords = new OptionTextBox {
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Bindable = config.GetBindable<string>(OsuConfig.HighlightWords)
|
Bindable = config.GetBindable<string>(OsuConfig.HighlightWords)
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,26 +1,26 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Overlays.Options.Sections.Online;
|
using osu.Game.Overlays.Options.Sections.Online;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections
|
namespace osu.Game.Overlays.Options.Sections
|
||||||
{
|
{
|
||||||
public class OnlineSection : OptionsSection
|
public class OnlineSection : OptionsSection
|
||||||
{
|
{
|
||||||
public override string Header => "Online";
|
public override string Header => "Online";
|
||||||
public override FontAwesome Icon => FontAwesome.fa_globe;
|
public override FontAwesome Icon => FontAwesome.fa_globe;
|
||||||
|
|
||||||
public OnlineSection()
|
public OnlineSection()
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new InGameChatOptions(),
|
new InGameChatOptions(),
|
||||||
new PrivacyOptions(),
|
new PrivacyOptions(),
|
||||||
new NotificationsOptions(),
|
new NotificationsOptions(),
|
||||||
new IntegrationOptions(),
|
new IntegrationOptions(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,75 +1,75 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections
|
namespace osu.Game.Overlays.Options.Sections
|
||||||
{
|
{
|
||||||
public class SkinSection : OptionsSection
|
public class SkinSection : OptionsSection
|
||||||
{
|
{
|
||||||
public override string Header => "Skin";
|
public override string Header => "Skin";
|
||||||
public override FontAwesome Icon => FontAwesome.fa_paint_brush;
|
public override FontAwesome Icon => FontAwesome.fa_paint_brush;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
content.Spacing = new Vector2(0, 5);
|
content.Spacing = new Vector2(0, 5);
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OptionLabel { Text = "TODO: Skin preview textures" },
|
new OptionLabel { Text = "TODO: Skin preview textures" },
|
||||||
new OptionLabel { Text = "Current skin: TODO dropdown" },
|
new OptionLabel { Text = "Current skin: TODO dropdown" },
|
||||||
new OsuButton
|
new OsuButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Text = "Preview gameplay",
|
Text = "Preview gameplay",
|
||||||
},
|
},
|
||||||
new OsuButton
|
new OsuButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Text = "Open skin folder",
|
Text = "Open skin folder",
|
||||||
},
|
},
|
||||||
new OsuButton
|
new OsuButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Text = "Export as .osk",
|
Text = "Export as .osk",
|
||||||
},
|
},
|
||||||
new OsuCheckbox
|
new OsuCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Ignore all beatmap skins",
|
LabelText = "Ignore all beatmap skins",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.IgnoreBeatmapSkins)
|
Bindable = config.GetBindable<bool>(OsuConfig.IgnoreBeatmapSkins)
|
||||||
},
|
},
|
||||||
new OsuCheckbox
|
new OsuCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Use skin's sound samples",
|
LabelText = "Use skin's sound samples",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.SkinSamples)
|
Bindable = config.GetBindable<bool>(OsuConfig.SkinSamples)
|
||||||
},
|
},
|
||||||
new OsuCheckbox
|
new OsuCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Use Taiko skin for Taiko mode",
|
LabelText = "Use Taiko skin for Taiko mode",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.UseTaikoSkin)
|
Bindable = config.GetBindable<bool>(OsuConfig.UseTaikoSkin)
|
||||||
},
|
},
|
||||||
new OsuCheckbox
|
new OsuCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Always use skin cursor",
|
LabelText = "Always use skin cursor",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.UseSkinCursor)
|
Bindable = config.GetBindable<bool>(OsuConfig.UseSkinCursor)
|
||||||
},
|
},
|
||||||
new OptionSlider<double>
|
new OptionSlider<double>
|
||||||
{
|
{
|
||||||
LabelText = "Cursor size",
|
LabelText = "Cursor size",
|
||||||
Bindable = (BindableDouble)config.GetBindable<double>(OsuConfig.CursorSize)
|
Bindable = (BindableDouble)config.GetBindable<double>(OsuConfig.CursorSize)
|
||||||
},
|
},
|
||||||
new OsuCheckbox
|
new OsuCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Automatic cursor size",
|
LabelText = "Automatic cursor size",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.AutomaticCursorSizing)
|
Bindable = config.GetBindable<bool>(OsuConfig.AutomaticCursorSizing)
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,147 +1,147 @@
|
|||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Framework.Graphics.Primitives;
|
using osu.Framework.Graphics.Primitives;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Pause
|
namespace osu.Game.Overlays.Pause
|
||||||
{
|
{
|
||||||
public class PauseProgressBar : Container
|
public class PauseProgressBar : Container
|
||||||
{
|
{
|
||||||
private Color4 fillColour = new Color4(221, 255, 255, 255);
|
private Color4 fillColour = new Color4(221, 255, 255, 255);
|
||||||
private Color4 glowColour = new Color4(221, 255, 255, 150);
|
private Color4 glowColour = new Color4(221, 255, 255, 150);
|
||||||
|
|
||||||
private Container fill;
|
private Container fill;
|
||||||
private WorkingBeatmap current;
|
private WorkingBeatmap current;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuGameBase osuGame)
|
private void load(OsuGameBase osuGame)
|
||||||
{
|
{
|
||||||
current = osuGame.Beatmap.Value;
|
current = osuGame.Beatmap.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
if (current?.TrackLoaded ?? false)
|
if (current?.TrackLoaded ?? false)
|
||||||
{
|
{
|
||||||
fill.Width = (float)(current.Track.CurrentTime / current.Track.Length);
|
fill.Width = (float)(current.Track.CurrentTime / current.Track.Length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public PauseProgressBar()
|
public PauseProgressBar()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Height = 60;
|
Height = 60;
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new PauseProgressGraph
|
new PauseProgressGraph
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
Origin = Anchor.BottomCentre,
|
|
||||||
Anchor = Anchor.BottomCentre,
|
|
||||||
Height = 35,
|
|
||||||
Margin = new MarginPadding
|
|
||||||
{
|
|
||||||
Bottom = 5
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new Container
|
|
||||||
{
|
|
||||||
Origin = Anchor.BottomRight,
|
|
||||||
Anchor = Anchor.BottomRight,
|
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
Height = 5,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new Box
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Colour = Color4.Black,
|
|
||||||
Alpha = 0.5f
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fill = new Container
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomCentre,
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomCentre,
|
||||||
Width = 0,
|
Height = 35,
|
||||||
Height = 60,
|
Margin = new MarginPadding
|
||||||
Children = new Drawable[]
|
{
|
||||||
{
|
Bottom = 5
|
||||||
new Container
|
}
|
||||||
{
|
},
|
||||||
RelativeSizeAxes = Axes.Both,
|
new Container
|
||||||
Origin = Anchor.BottomLeft,
|
{
|
||||||
Anchor = Anchor.BottomLeft,
|
Origin = Anchor.BottomRight,
|
||||||
Masking = true,
|
Anchor = Anchor.BottomRight,
|
||||||
Children = new Drawable[]
|
RelativeSizeAxes = Axes.X,
|
||||||
{
|
Height = 5,
|
||||||
new Container
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
Origin = Anchor.BottomLeft,
|
new Box
|
||||||
Anchor = Anchor.BottomLeft,
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Height = 5,
|
Colour = Color4.Black,
|
||||||
Masking = true,
|
Alpha = 0.5f
|
||||||
EdgeEffect = new EdgeEffect
|
}
|
||||||
{
|
}
|
||||||
Type = EdgeEffectType.Glow,
|
},
|
||||||
Colour = glowColour,
|
fill = new Container
|
||||||
Radius = 5
|
{
|
||||||
},
|
RelativeSizeAxes = Axes.X,
|
||||||
Children = new Drawable[]
|
Origin = Anchor.BottomLeft,
|
||||||
{
|
Anchor = Anchor.BottomLeft,
|
||||||
new Box
|
Width = 0,
|
||||||
{
|
Height = 60,
|
||||||
RelativeSizeAxes = Axes.Both,
|
Children = new Drawable[]
|
||||||
Colour = fillColour
|
{
|
||||||
}
|
new Container
|
||||||
}
|
{
|
||||||
}
|
RelativeSizeAxes = Axes.Both,
|
||||||
}
|
Origin = Anchor.BottomLeft,
|
||||||
},
|
Anchor = Anchor.BottomLeft,
|
||||||
new Container
|
Masking = true,
|
||||||
{
|
Children = new Drawable[]
|
||||||
Origin = Anchor.BottomRight,
|
{
|
||||||
Anchor = Anchor.BottomRight,
|
new Container
|
||||||
Width = 2,
|
{
|
||||||
Height = 35,
|
Origin = Anchor.BottomLeft,
|
||||||
Children = new Drawable[]
|
Anchor = Anchor.BottomLeft,
|
||||||
{
|
RelativeSizeAxes = Axes.X,
|
||||||
new Box
|
Height = 5,
|
||||||
{
|
Masking = true,
|
||||||
RelativeSizeAxes = Axes.Both,
|
EdgeEffect = new EdgeEffect
|
||||||
Colour = Color4.White
|
{
|
||||||
},
|
Type = EdgeEffectType.Glow,
|
||||||
new Container
|
Colour = glowColour,
|
||||||
{
|
Radius = 5
|
||||||
Origin = Anchor.BottomCentre,
|
},
|
||||||
Anchor = Anchor.TopCentre,
|
Children = new Drawable[]
|
||||||
Width = 14,
|
{
|
||||||
Height = 25,
|
new Box
|
||||||
CornerRadius = 5,
|
{
|
||||||
Masking = true,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Colour = fillColour
|
||||||
{
|
}
|
||||||
new Box
|
}
|
||||||
{
|
}
|
||||||
RelativeSizeAxes = Axes.Both,
|
}
|
||||||
Colour = Color4.White
|
},
|
||||||
}
|
new Container
|
||||||
}
|
{
|
||||||
}
|
Origin = Anchor.BottomRight,
|
||||||
}
|
Anchor = Anchor.BottomRight,
|
||||||
}
|
Width = 2,
|
||||||
}
|
Height = 35,
|
||||||
}
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Colour = Color4.White
|
||||||
|
},
|
||||||
|
new Container
|
||||||
|
{
|
||||||
|
Origin = Anchor.BottomCentre,
|
||||||
|
Anchor = Anchor.TopCentre,
|
||||||
|
Width = 14,
|
||||||
|
Height = 25,
|
||||||
|
CornerRadius = 5,
|
||||||
|
Masking = true,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Colour = Color4.White
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Pause
|
namespace osu.Game.Overlays.Pause
|
||||||
{
|
{
|
||||||
public class PauseProgressGraph : Container
|
public class PauseProgressGraph : Container
|
||||||
{
|
{
|
||||||
// TODO: Implement the pause progress graph
|
// TODO: Implement the pause progress graph
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Pause
|
namespace osu.Game.Overlays.Pause
|
||||||
{
|
{
|
||||||
public class ResumeButton : PauseButton
|
public class ResumeButton : PauseButton
|
||||||
{
|
{
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio, OsuColour colours)
|
private void load(AudioManager audio, OsuColour colours)
|
||||||
{
|
|
||||||
ButtonColour = colours.Green;
|
|
||||||
SampleHover = audio.Sample.Get(@"Menu/menuclick");
|
|
||||||
SampleClick = audio.Sample.Get(@"Menu/menuback");
|
|
||||||
}
|
|
||||||
|
|
||||||
public ResumeButton()
|
|
||||||
{
|
{
|
||||||
Text = @"Continue";
|
ButtonColour = colours.Green;
|
||||||
}
|
SampleHover = audio.Sample.Get(@"Menu/menuclick");
|
||||||
}
|
SampleClick = audio.Sample.Get(@"Menu/menuback");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ResumeButton()
|
||||||
|
{
|
||||||
|
Text = @"Continue";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user