mirror of
https://github.com/ppy/osu
synced 2024-12-14 10:57:41 +00:00
Update currently playing search bar to resemble existing UI
This commit is contained in:
parent
a8e453e660
commit
4967d03606
@ -10,6 +10,8 @@ using osu.Framework.Bindables;
|
|||||||
using osu.Framework.Extensions;
|
using osu.Framework.Extensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Effects;
|
||||||
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
@ -35,35 +37,42 @@ namespace osu.Game.Overlays.Dashboard
|
|||||||
|
|
||||||
private SearchContainer<PlayingUserPanel> userFlow;
|
private SearchContainer<PlayingUserPanel> userFlow;
|
||||||
|
|
||||||
private FocusedTextBox searchBar;
|
private Box searchBarBackground;
|
||||||
private Container<FocusedTextBox> searchBarContainer;
|
private BasicSearchTextBox searchBar;
|
||||||
|
private Container<BasicSearchTextBox> searchBarContainer;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private SpectatorClient spectatorClient { get; set; }
|
private SpectatorClient spectatorClient { get; set; }
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load(OverlayColourProvider colourProvider)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
AutoSizeAxes = Axes.Y;
|
AutoSizeAxes = Axes.Y;
|
||||||
|
|
||||||
searchBarContainer = new Container<FocusedTextBox>
|
searchBarBackground = new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
Height = 10*2 + search_bar_height,
|
||||||
|
Colour = colourProvider.Background4,
|
||||||
|
};
|
||||||
|
|
||||||
|
searchBarContainer = new Container<BasicSearchTextBox>
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
Padding = new MarginPadding(10),
|
Padding = new MarginPadding(10),
|
||||||
Child = searchBar = new FocusedTextBox
|
|
||||||
|
Child = searchBar = new BasicSearchTextBox
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Height = search_bar_height,
|
Height = search_bar_height,
|
||||||
Width = search_bar_width,
|
|
||||||
|
|
||||||
Colour = OsuColour.Gray(0.8f),
|
RelativeSizeAxes = Axes.X,
|
||||||
|
|
||||||
PlaceholderText = "Search for User...",
|
PlaceholderText = "type to search",
|
||||||
HoldFocus = true,
|
|
||||||
ReleaseFocusOnCommit = true,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -72,7 +81,7 @@ namespace osu.Game.Overlays.Dashboard
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Padding = new MarginPadding {
|
Padding = new MarginPadding {
|
||||||
Top = 10 + 10 + search_bar_height,
|
Top = 10*3 + search_bar_height,
|
||||||
Bottom = 10,
|
Bottom = 10,
|
||||||
Right = 10,
|
Right = 10,
|
||||||
Left = 10,
|
Left = 10,
|
||||||
@ -82,6 +91,7 @@ namespace osu.Game.Overlays.Dashboard
|
|||||||
|
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
|
searchBarBackground,
|
||||||
searchBarContainer,
|
searchBarContainer,
|
||||||
userFlow,
|
userFlow,
|
||||||
};
|
};
|
||||||
@ -170,10 +180,7 @@ namespace osu.Game.Overlays.Dashboard
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool FilteringActive
|
public bool FilteringActive { set; get; }
|
||||||
{
|
|
||||||
set { }
|
|
||||||
}
|
|
||||||
|
|
||||||
public PlayingUserPanel(APIUser user)
|
public PlayingUserPanel(APIUser user)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user