mirror of
https://github.com/ppy/osu
synced 2024-12-11 17:42:28 +00:00
More overlays and overall fixes
This commit is contained in:
parent
fd2150aa49
commit
e0625a9b30
@ -69,6 +69,8 @@ namespace osu.Game.Configuration
|
||||
Set(OsuSetting.ShowInterface, true);
|
||||
Set(OsuSetting.KeyOverlay, false);
|
||||
|
||||
Set(OsuSetting.FloatingComments, false);
|
||||
|
||||
// Update
|
||||
|
||||
Set(OsuSetting.ReleaseStream, ReleaseStream.Lazer);
|
||||
@ -88,6 +90,7 @@ namespace osu.Game.Configuration
|
||||
AutoCursorSize,
|
||||
DimLevel,
|
||||
KeyOverlay,
|
||||
FloatingComments,
|
||||
ShowInterface,
|
||||
MouseDisableButtons,
|
||||
MouseDisableWheel,
|
||||
|
31
osu.Game/Screens/Play/Options/CollectionOptions.cs
Normal file
31
osu.Game/Screens/Play/Options/CollectionOptions.cs
Normal 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) },
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
33
osu.Game/Screens/Play/Options/DiscussionOptions.cs
Normal file
33
osu.Game/Screens/Play/Options/DiscussionOptions.cs
Normal 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,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
@ -19,14 +19,17 @@ namespace osu.Game.Screens.Play.Options
|
||||
/// </summary>
|
||||
public abstract string Title { get; }
|
||||
|
||||
private Container header;
|
||||
private FillFlowContainer content;
|
||||
|
||||
public OptionContainer()
|
||||
{
|
||||
AutoSizeAxes = Axes.Y;
|
||||
Width = 250;
|
||||
Masking = true;
|
||||
Size = new Vector2(200, 100);
|
||||
CornerRadius = 5;
|
||||
BorderColour = Color4.Black;
|
||||
BorderThickness = 2;
|
||||
Depth = 10;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -36,24 +39,60 @@ namespace osu.Game.Screens.Play.Options
|
||||
Colour = Color4.Black,
|
||||
Alpha = 0.5f,
|
||||
},
|
||||
new OsuSpriteText
|
||||
new FillFlowContainer
|
||||
{
|
||||
Origin = Anchor.TopLeft,
|
||||
Anchor = Anchor.TopLeft,
|
||||
Text = Title,
|
||||
TextSize = 17,
|
||||
Margin = new MarginPadding { Top = 5, Left = 10 },
|
||||
Font = @"Exo2.0-Bold",
|
||||
},
|
||||
new SimpleButton
|
||||
{
|
||||
Origin = Anchor.TopRight,
|
||||
Anchor = Anchor.TopRight,
|
||||
Margin = new MarginPadding { Top = 5, Right = 10 },
|
||||
Icon = FontAwesome.fa_bars,
|
||||
Scale = new Vector2(0.7f),
|
||||
Direction = FillDirection.Vertical,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
header = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 30,
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,16 +6,16 @@ using osu.Framework.Graphics.Containers;
|
||||
|
||||
namespace osu.Game.Screens.Play.Options
|
||||
{
|
||||
public class OptionsDisplay : FillFlowContainer<OptionContainer>
|
||||
public class OptionsDisplay : FillFlowContainer
|
||||
{
|
||||
public OptionsDisplay()
|
||||
{
|
||||
Direction = FillDirection.Vertical;
|
||||
Spacing = new Vector2(0, 20);
|
||||
|
||||
Add(new PlaybackOption());
|
||||
Add(new PlaybackOption());
|
||||
Add(new PlaybackOption());
|
||||
Add(new CollectionOptions());
|
||||
Add(new DiscussionOptions());
|
||||
Add(new PlaybackOptions());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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";
|
||||
}
|
||||
}
|
26
osu.Game/Screens/Play/Options/PlaybackOptions.cs
Normal file
26
osu.Game/Screens/Play/Options/PlaybackOptions.cs
Normal 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),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
@ -78,6 +78,7 @@
|
||||
<Compile Include="Online\API\Requests\PostMessageRequest.cs" />
|
||||
<Compile Include="Online\Chat\ErrorMessage.cs" />
|
||||
<Compile Include="Overlays\Chat\ChatTabControl.cs" />
|
||||
<Compile Include="Overlays\Music\CollectionsDropdown.cs" />
|
||||
<Compile Include="Overlays\Music\FilterControl.cs" />
|
||||
<Compile Include="Overlays\Music\PlaylistItem.cs" />
|
||||
<Compile Include="Overlays\Music\PlaylistList.cs" />
|
||||
@ -232,9 +233,11 @@
|
||||
<Compile Include="Screens\Charts\ChartInfo.cs" />
|
||||
<Compile Include="Screens\Edit\Editor.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\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\HUD\ModDisplay.cs" />
|
||||
<Compile Include="Screens\Play\SquareGraph.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user