Merge branch 'master' of git://github.com/ppy/osu into most-played-beatmaps-section

This commit is contained in:
jorolf
2017-11-22 21:14:11 +01:00
99 changed files with 1072 additions and 353 deletions

View File

@ -58,7 +58,7 @@ namespace osu.Game.Overlays
private readonly Box chatBackground;
private readonly Box tabBackground;
public Bindable<double> ChatHeight { get; internal set; }
public Bindable<double> ChatHeight { get; set; }
private readonly Container channelSelectionContainer;
private readonly ChannelSelectionOverlay channelSelection;

View File

@ -19,7 +19,7 @@ using OpenTK.Input;
namespace osu.Game.Overlays.KeyBinding
{
internal class KeyBindingRow : Container, IFilterable
public class KeyBindingRow : Container, IFilterable
{
private readonly object action;
private readonly IEnumerable<Framework.Input.Bindings.KeyBinding> bindings;

View File

@ -55,7 +55,7 @@ namespace osu.Game.Overlays.KeyBinding
}
}
internal class ResetButton : OsuButton
public class ResetButton : OsuButton
{
[BackgroundDependencyLoader]
private void load(OsuColour colours)

View File

@ -13,7 +13,7 @@ using osu.Game.Graphics.Cursor;
namespace osu.Game.Overlays
{
internal class LoginOverlay : OsuFocusedOverlayContainer
public class LoginOverlay : OsuFocusedOverlayContainer
{
private LoginSettings settingsSection;

View File

@ -13,7 +13,7 @@ using System;
namespace osu.Game.Overlays.Music
{
internal class FilterControl : Container
public class FilterControl : Container
{
public readonly FilterTextBox Search;

View File

@ -17,7 +17,7 @@ using OpenTK;
namespace osu.Game.Overlays.Music
{
internal class PlaylistItem : Container, IFilterable, IDraggable
public class PlaylistItem : Container, IFilterable, IDraggable
{
private const float fade_duration = 100;

View File

@ -14,7 +14,7 @@ using OpenTK;
namespace osu.Game.Overlays.Music
{
internal class PlaylistList : CompositeDrawable
public class PlaylistList : CompositeDrawable
{
public Action<BeatmapSetInfo> OnSelect;

View File

@ -37,7 +37,7 @@ namespace osu.Game.Overlays
private const float bottom_black_area_height = 55;
private Drawable currentBackground;
private Drawable background;
private ProgressBar progressBar;
private IconButton prevButton;
@ -120,7 +120,7 @@ namespace osu.Game.Overlays
},
Children = new[]
{
currentBackground = new Background(),
background = new Background(),
title = new OsuSpriteText
{
Origin = Anchor.BottomCentre,
@ -334,6 +334,7 @@ namespace osu.Game.Overlays
pendingBeatmapSwitch = Schedule(delegate
{
// todo: this can likely be replaced with WorkingBeatmap.GetBeatmapAsync()
Task.Run(() =>
{
if (beatmap?.Beatmap == null) //this is not needed if a placeholder exists
@ -352,29 +353,26 @@ namespace osu.Game.Overlays
}
});
playerContainer.Add(new AsyncLoadWrapper(new Background(beatmap)
LoadComponentAsync(new Background(beatmap) { Depth = float.MaxValue }, newBackground =>
{
OnLoadComplete = newBackground =>
switch (direction)
{
switch (direction)
{
case TransformDirection.Next:
newBackground.Position = new Vector2(400, 0);
newBackground.MoveToX(0, 500, Easing.OutCubic);
currentBackground.MoveToX(-400, 500, Easing.OutCubic);
break;
case TransformDirection.Prev:
newBackground.Position = new Vector2(-400, 0);
newBackground.MoveToX(0, 500, Easing.OutCubic);
currentBackground.MoveToX(400, 500, Easing.OutCubic);
break;
}
currentBackground.Expire();
currentBackground = newBackground;
case TransformDirection.Next:
newBackground.Position = new Vector2(400, 0);
newBackground.MoveToX(0, 500, Easing.OutCubic);
background.MoveToX(-400, 500, Easing.OutCubic);
break;
case TransformDirection.Prev:
newBackground.Position = new Vector2(-400, 0);
newBackground.MoveToX(0, 500, Easing.OutCubic);
background.MoveToX(400, 500, Easing.OutCubic);
break;
}
})
{
Depth = float.MaxValue,
background.Expire();
background = newBackground;
playerContainer.Add(newBackground);
});
});
}

View File

@ -40,7 +40,7 @@ namespace osu.Game.Overlays.Profile.Sections.Beatmaps
ShowMoreButton.FadeTo(sets.Count == ItemsPerPage ? 1 : 0);
ShowMoreLoading.Hide();
if (!sets.Any())
if (!sets.Any() && VisiblePages == 1)
{
MissingText.Show();
return;

View File

@ -41,7 +41,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
ShowMoreButton.FadeTo(scores.Count == ItemsPerPage ? 1 : 0);
ShowMoreLoading.Hide();
if (!scores.Any())
if (!scores.Any() && VisiblePages == 1)
{
MissingText.Show();
return;

View File

@ -135,7 +135,7 @@ namespace osu.Game.Overlays.Settings
private class RestoreDefaultValueButton : Box, IHasTooltip
{
private Bindable<T> bindable;
internal Bindable<T> Bindable
public Bindable<T> Bindable
{
get { return bindable; }
set
@ -185,13 +185,13 @@ namespace osu.Game.Overlays.Settings
UpdateState();
}
internal void SetButtonColour(Color4 buttonColour)
public void SetButtonColour(Color4 buttonColour)
{
this.buttonColour = buttonColour;
UpdateState();
}
internal void UpdateState()
public void UpdateState()
{
if (bindable == null)
return;

View File

@ -7,7 +7,7 @@ using osu.Game.Graphics;
namespace osu.Game.Overlays.Settings
{
internal class SettingsLabel : SettingsItem<string>
public class SettingsLabel : SettingsItem<string>
{
protected override Drawable CreateControl() => null;

View File

@ -18,8 +18,8 @@ namespace osu.Game.Overlays.Settings
public class Sidebar : Container<SidebarButton>, IStateful<ExpandedState>
{
private readonly FillFlowContainer<SidebarButton> content;
internal const float DEFAULT_WIDTH = ToolbarButton.WIDTH;
internal const int EXPANDED_WIDTH = 200;
public const float DEFAULT_WIDTH = ToolbarButton.WIDTH;
public const int EXPANDED_WIDTH = 200;
public event Action<ExpandedState> StateChanged;
@ -137,4 +137,4 @@ namespace osu.Game.Overlays.Settings
Contracted,
Expanded,
}
}
}

View File

@ -20,7 +20,7 @@ namespace osu.Game.Overlays
{
public abstract class SettingsOverlay : OsuFocusedOverlayContainer
{
internal const float CONTENT_MARGINS = 10;
public const float CONTENT_MARGINS = 10;
public const float TRANSITION_LENGTH = 600;

View File

@ -6,7 +6,7 @@ using osu.Game.Graphics;
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarChatButton : ToolbarOverlayToggleButton
public class ToolbarChatButton : ToolbarOverlayToggleButton
{
public ToolbarChatButton()
{
@ -19,4 +19,4 @@ namespace osu.Game.Overlays.Toolbar
StateContainer = chat;
}
}
}
}

View File

@ -6,7 +6,7 @@ using osu.Game.Graphics;
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarDirectButton : ToolbarOverlayToggleButton
public class ToolbarDirectButton : ToolbarOverlayToggleButton
{
public ToolbarDirectButton()
{
@ -19,4 +19,4 @@ namespace osu.Game.Overlays.Toolbar
StateContainer = direct;
}
}
}
}

View File

@ -5,7 +5,7 @@ using osu.Game.Graphics;
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarHomeButton : ToolbarButton
public class ToolbarHomeButton : ToolbarButton
{
public ToolbarHomeButton()
{
@ -14,4 +14,4 @@ namespace osu.Game.Overlays.Toolbar
TooltipSub = "Return to the main menu";
}
}
}
}

View File

@ -14,7 +14,7 @@ using osu.Game.Rulesets;
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarModeSelector : Container
public class ToolbarModeSelector : Container
{
private const float padding = 10;

View File

@ -6,7 +6,7 @@ using osu.Game.Graphics;
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarMusicButton : ToolbarOverlayToggleButton
public class ToolbarMusicButton : ToolbarOverlayToggleButton
{
public ToolbarMusicButton()
{
@ -19,4 +19,4 @@ namespace osu.Game.Overlays.Toolbar
StateContainer = music;
}
}
}
}

View File

@ -7,7 +7,7 @@ using osu.Game.Graphics;
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarNotificationButton : ToolbarOverlayToggleButton
public class ToolbarNotificationButton : ToolbarOverlayToggleButton
{
protected override Anchor TooltipAnchor => Anchor.TopRight;
@ -24,4 +24,4 @@ namespace osu.Game.Overlays.Toolbar
StateContainer = notificationOverlay;
}
}
}
}

View File

@ -9,7 +9,7 @@ using osu.Game.Graphics;
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarOverlayToggleButton : ToolbarButton
public class ToolbarOverlayToggleButton : ToolbarButton
{
private readonly Box stateBackground;

View File

@ -6,7 +6,7 @@ using osu.Game.Graphics;
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarSettingsButton : ToolbarOverlayToggleButton
public class ToolbarSettingsButton : ToolbarOverlayToggleButton
{
public ToolbarSettingsButton()
{
@ -21,4 +21,4 @@ namespace osu.Game.Overlays.Toolbar
StateContainer = settings;
}
}
}
}

View File

@ -6,7 +6,7 @@ using osu.Game.Graphics;
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarSocialButton : ToolbarOverlayToggleButton
public class ToolbarSocialButton : ToolbarOverlayToggleButton
{
public ToolbarSocialButton()
{
@ -19,4 +19,4 @@ namespace osu.Game.Overlays.Toolbar
StateContainer = chat;
}
}
}
}

View File

@ -9,7 +9,7 @@ using OpenTK;
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarUserArea : Container
public class ToolbarUserArea : Container
{
public LoginOverlay LoginOverlay;
private ToolbarUserButton button;

View File

@ -12,7 +12,7 @@ using OpenTK.Graphics;
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarUserButton : ToolbarButton, IOnlineComponent
public class ToolbarUserButton : ToolbarButton, IOnlineComponent
{
private readonly UpdateableAvatar avatar;