Applied suggested changes

This commit is contained in:
EVAST9919
2017-05-29 19:00:29 +03:00
parent 261f1f4e1f
commit 08219ccb42
9 changed files with 52 additions and 70 deletions

View File

@ -99,8 +99,13 @@ namespace osu.Game.Screens.Play
// in the case a replay isn't loaded, we want some elements to only appear briefly.
if (!hitRenderer.HasReplayLoaded)
{
ReplaySettingsOverlay.Hide();
ReplaySettingsOverlay.AlwaysPresent = false;
using (ModDisplay.BeginDelayedSequence(2000))
ModDisplay.FadeOut(200);
}
}
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)

View File

@ -202,7 +202,6 @@ namespace osu.Game.Screens.Play
hudOverlay.Progress.Objects = HitRenderer.Objects;
hudOverlay.Progress.AudioClock = decoupledClock;
hudOverlay.Progress.AllowSeeking = HitRenderer.HasReplayLoaded;
hudOverlay.ReplaySettingsOverlay.IsAvaliable = HitRenderer.HasReplayLoaded;
hudOverlay.Progress.OnSeek = pos => decoupledClock.Seek(pos);
hudOverlay.ModDisplay.Current.BindTo(Beatmap.Mods);

View File

@ -17,15 +17,18 @@ namespace osu.Game.Screens.Play.ReplaySettings
[BackgroundDependencyLoader]
private void load()
{
Add(new OsuSpriteText
Children = new Drawable[]
{
Text = @"Add current song to",
});
Add(new CollectionsDropdown<PlaylistCollection>
{
RelativeSizeAxes = Axes.X,
Items = new[] { new KeyValuePair<string, PlaylistCollection>(@"All", PlaylistCollection.All) },
});
new OsuSpriteText
{
Text = @"Add current song to",
},
new CollectionsDropdown<PlaylistCollection>
{
RelativeSizeAxes = Axes.X,
Items = new[] { new KeyValuePair<string, PlaylistCollection>(@"All", PlaylistCollection.All) },
},
};
}
}
}

View File

@ -16,18 +16,21 @@ namespace osu.Game.Screens.Play.ReplaySettings
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
Add(new SettingsCheckbox
Children = new Drawable[]
{
LabelText = "Show floating coments",
Bindable = config.GetBindable<bool>(OsuSetting.FloatingComments)
});
Add(new FocusedTextBox
{
RelativeSizeAxes = Axes.X,
Height = 30,
PlaceholderText = "Add Comment",
HoldFocus = false,
});
new SettingsCheckbox
{
LabelText = "Show floating coments",
Bindable = config.GetBindable<bool>(OsuSetting.FloatingComments)
},
new FocusedTextBox
{
RelativeSizeAxes = Axes.X,
Height = 30,
PlaceholderText = "Add Comment",
HoldFocus = false,
},
};
}
}
}

View File

@ -5,6 +5,7 @@ using osu.Framework.Allocation;
using osu.Game.Configuration;
using osu.Game.Overlays.Settings;
using osu.Game.Graphics.UserInterface;
using osu.Framework.Graphics;
namespace osu.Game.Screens.Play.ReplaySettings
{
@ -15,11 +16,14 @@ namespace osu.Game.Screens.Play.ReplaySettings
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
Add(new SettingsSlider<double>
Children = new Drawable[]
{
LabelText = "Playback speed",
Bindable = config.GetBindable<double>(OsuSetting.PlaybackSpeed),
});
new SettingsSlider<double>
{
LabelText = "Playback speed",
Bindable = config.GetBindable<double>(OsuSetting.PlaybackSpeed),
}
};
}
}
}

View File

@ -15,26 +15,6 @@ namespace osu.Game.Screens.Play.ReplaySettings
private bool isVisible;
private bool isAvaliable;
/// <summary>
/// Allow user to interact with this overlay.
/// </summary>
public bool IsAvaliable
{
set
{
isAvaliable = value;
if (isAvaliable)
Show();
else
Hide();
}
get
{
return isAvaliable;
}
}
public ReplaySettingsOverlay()
{
AlwaysPresent = true;
@ -54,20 +34,12 @@ namespace osu.Game.Screens.Play.ReplaySettings
switch (args.Key)
{
case Key.H:
toogleVisibility();
FadeTo(isVisible ? 1 : 0, fade_duration);
isVisible = !isVisible;
return true;
}
return base.OnKeyDown(state, args);
}
private void toogleVisibility()
{
if (isAvaliable)
{
FadeTo(isVisible ? 1 : 0, fade_duration);
isVisible = !isVisible;
}
}
}
}