1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 13:37:25 +08:00

More overlays and overall fixes

This commit is contained in:
EVAST9919 2017-05-17 15:39:26 +03:00
parent fd2150aa49
commit e0625a9b30
8 changed files with 157 additions and 32 deletions

View File

@ -69,6 +69,8 @@ namespace osu.Game.Configuration
Set(OsuSetting.ShowInterface, true); Set(OsuSetting.ShowInterface, true);
Set(OsuSetting.KeyOverlay, false); Set(OsuSetting.KeyOverlay, false);
Set(OsuSetting.FloatingComments, false);
// Update // Update
Set(OsuSetting.ReleaseStream, ReleaseStream.Lazer); Set(OsuSetting.ReleaseStream, ReleaseStream.Lazer);
@ -88,6 +90,7 @@ namespace osu.Game.Configuration
AutoCursorSize, AutoCursorSize,
DimLevel, DimLevel,
KeyOverlay, KeyOverlay,
FloatingComments,
ShowInterface, ShowInterface,
MouseDisableButtons, MouseDisableButtons,
MouseDisableWheel, MouseDisableWheel,

View File

@ -0,0 +1,31 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Configuration;
using osu.Game.Graphics.Sprites;
using osu.Game.Overlays.Music;
using System.Collections.Generic;
namespace osu.Game.Screens.Play.Options
{
public class CollectionOptions : OptionContainer
{
public override string Title => @"COLLECTIONS";
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
Add(new OsuSpriteText
{
Text = @"Add current song to",
});
Add(new CollectionsDropdown<PlaylistCollection>
{
RelativeSizeAxes = Axes.X,
Items = new[] { new KeyValuePair<string, PlaylistCollection>(@"All", PlaylistCollection.All) },
});
}
}
}

View File

@ -0,0 +1,33 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Configuration;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays.Settings;
namespace osu.Game.Screens.Play.Options
{
public class DiscussionOptions : OptionContainer
{
public override string Title => @"DISCUSSIONS";
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
Add(new SettingsCheckbox
{
LabelText = "Show floating coments",
Bindable = config.GetBindable<bool>(OsuSetting.FloatingComments)
});
Add(new FocusedTextBox
{
RelativeSizeAxes = Axes.X,
Height = 30,
PlaceholderText = "Add Comment",
HoldFocus = false,
});
}
}
}

View File

@ -19,14 +19,17 @@ namespace osu.Game.Screens.Play.Options
/// </summary> /// </summary>
public abstract string Title { get; } public abstract string Title { get; }
private Container header;
private FillFlowContainer content;
public OptionContainer() public OptionContainer()
{ {
AutoSizeAxes = Axes.Y;
Width = 250;
Masking = true; Masking = true;
Size = new Vector2(200, 100);
CornerRadius = 5; CornerRadius = 5;
BorderColour = Color4.Black; BorderColour = Color4.Black;
BorderThickness = 2; BorderThickness = 2;
Depth = 10;
Children = new Drawable[] Children = new Drawable[]
{ {
@ -36,24 +39,60 @@ namespace osu.Game.Screens.Play.Options
Colour = Color4.Black, Colour = Color4.Black,
Alpha = 0.5f, Alpha = 0.5f,
}, },
new OsuSpriteText new FillFlowContainer
{ {
Origin = Anchor.TopLeft, Direction = FillDirection.Vertical,
Anchor = Anchor.TopLeft, RelativeSizeAxes = Axes.X,
Text = Title, AutoSizeAxes = Axes.Y,
TextSize = 17,
Margin = new MarginPadding { Top = 5, Left = 10 }, Children = new Drawable[]
Font = @"Exo2.0-Bold", {
}, header = new Container
new SimpleButton {
{ RelativeSizeAxes = Axes.X,
Origin = Anchor.TopRight, Height = 30,
Anchor = Anchor.TopRight, Origin = Anchor.TopCentre,
Margin = new MarginPadding { Top = 5, Right = 10 }, Anchor = Anchor.TopCentre,
Icon = FontAwesome.fa_bars,
Scale = new Vector2(0.7f), Children = new Drawable[]
{
new OsuSpriteText
{
Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft,
Text = Title,
TextSize = 17,
Font = @"Exo2.0-Bold",
Margin = new MarginPadding { Left = 10 },
},
new SimpleButton
{
Origin = Anchor.Centre,
Anchor = Anchor.CentreRight,
Position = new Vector2(-15,0),
Icon = FontAwesome.fa_bars,
Scale = new Vector2(0.7f),
},
}
},
content = new FillFlowContainer
{
Direction = FillDirection.Vertical,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,
Padding = new MarginPadding(15),
Spacing = new Vector2(0, 10),
}
}
}, },
}; };
} }
public new void Add(Drawable drawable)
{
content.Add(drawable);
}
} }
} }

View File

@ -6,16 +6,16 @@ using osu.Framework.Graphics.Containers;
namespace osu.Game.Screens.Play.Options namespace osu.Game.Screens.Play.Options
{ {
public class OptionsDisplay : FillFlowContainer<OptionContainer> public class OptionsDisplay : FillFlowContainer
{ {
public OptionsDisplay() public OptionsDisplay()
{ {
Direction = FillDirection.Vertical; Direction = FillDirection.Vertical;
Spacing = new Vector2(0, 20); Spacing = new Vector2(0, 20);
Add(new PlaybackOption()); Add(new CollectionOptions());
Add(new PlaybackOption()); Add(new DiscussionOptions());
Add(new PlaybackOption()); Add(new PlaybackOptions());
} }
} }
} }

View File

@ -1,10 +0,0 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
namespace osu.Game.Screens.Play.Options
{
public class PlaybackOption : OptionContainer
{
public override string Title => "PLAYBACK";
}
}

View File

@ -0,0 +1,26 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Configuration;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays.Settings;
namespace osu.Game.Screens.Play.Options
{
public class PlaybackOptions : OptionContainer
{
public override string Title => @"PLAYBACK";
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
Add(new SettingsSlider<double>
{
LabelText = "Playback speed",
Bindable = config.GetBindable<double>(OsuSetting.DimLevel),
});
}
}
}

View File

@ -78,6 +78,7 @@
<Compile Include="Online\API\Requests\PostMessageRequest.cs" /> <Compile Include="Online\API\Requests\PostMessageRequest.cs" />
<Compile Include="Online\Chat\ErrorMessage.cs" /> <Compile Include="Online\Chat\ErrorMessage.cs" />
<Compile Include="Overlays\Chat\ChatTabControl.cs" /> <Compile Include="Overlays\Chat\ChatTabControl.cs" />
<Compile Include="Overlays\Music\CollectionsDropdown.cs" />
<Compile Include="Overlays\Music\FilterControl.cs" /> <Compile Include="Overlays\Music\FilterControl.cs" />
<Compile Include="Overlays\Music\PlaylistItem.cs" /> <Compile Include="Overlays\Music\PlaylistItem.cs" />
<Compile Include="Overlays\Music\PlaylistList.cs" /> <Compile Include="Overlays\Music\PlaylistList.cs" />
@ -232,9 +233,11 @@
<Compile Include="Screens\Charts\ChartInfo.cs" /> <Compile Include="Screens\Charts\ChartInfo.cs" />
<Compile Include="Screens\Edit\Editor.cs" /> <Compile Include="Screens\Edit\Editor.cs" />
<Compile Include="Screens\Play\HotkeyRetryOverlay.cs" /> <Compile Include="Screens\Play\HotkeyRetryOverlay.cs" />
<Compile Include="Screens\Play\Options\CollectionOptions.cs" />
<Compile Include="Screens\Play\Options\DiscussionOptions.cs" />
<Compile Include="Screens\Play\Options\OptionContainer.cs" /> <Compile Include="Screens\Play\Options\OptionContainer.cs" />
<Compile Include="Screens\Play\Options\OptionsDisplay.cs" /> <Compile Include="Screens\Play\Options\OptionsDisplay.cs" />
<Compile Include="Screens\Play\Options\PlaybackOption.cs" /> <Compile Include="Screens\Play\Options\PlaybackOptions.cs" />
<Compile Include="Screens\Play\SongProgressInfo.cs" /> <Compile Include="Screens\Play\SongProgressInfo.cs" />
<Compile Include="Screens\Play\HUD\ModDisplay.cs" /> <Compile Include="Screens\Play\HUD\ModDisplay.cs" />
<Compile Include="Screens\Play\SquareGraph.cs" /> <Compile Include="Screens\Play\SquareGraph.cs" />