mirror of
https://github.com/osukey/osukey.git
synced 2025-06-08 04:48:04 +09:00
Small textbox adjustments
This commit is contained in:
parent
7228900361
commit
b6423dd92e
@ -17,18 +17,16 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
public SearchTextBox()
|
public SearchTextBox()
|
||||||
{
|
{
|
||||||
Height = 35;
|
Height = 35;
|
||||||
AddRange(new Drawable[]
|
Add(new SpriteIcon
|
||||||
{
|
{
|
||||||
new SpriteIcon
|
Icon = FontAwesome.Solid.Search,
|
||||||
{
|
Origin = Anchor.CentreRight,
|
||||||
Icon = FontAwesome.Solid.Search,
|
Anchor = Anchor.CentreRight,
|
||||||
Origin = Anchor.CentreRight,
|
Margin = new MarginPadding { Right = 10 },
|
||||||
Anchor = Anchor.CentreRight,
|
Size = new Vector2(20),
|
||||||
Margin = new MarginPadding { Right = 10 },
|
|
||||||
Size = new Vector2(20),
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
TextFlow.Padding = new MarginPadding { Right = 35 };
|
||||||
PlaceholderText = "type to search";
|
PlaceholderText = "type to search";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ using osu.Game.Beatmaps.Drawables;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.BeatmapListing
|
namespace osu.Game.Overlays.BeatmapListing
|
||||||
{
|
{
|
||||||
@ -28,7 +29,7 @@ namespace osu.Game.Overlays.BeatmapListing
|
|||||||
{
|
{
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value == null)
|
if (value == null || string.IsNullOrEmpty(value.OnlineInfo.Covers.Cover))
|
||||||
{
|
{
|
||||||
beatmapCover.FadeOut(600, Easing.OutQuint);
|
beatmapCover.FadeOut(600, Easing.OutQuint);
|
||||||
return;
|
return;
|
||||||
@ -39,7 +40,7 @@ namespace osu.Game.Overlays.BeatmapListing
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly SearchTextBox textBox;
|
private readonly BeatmapSearchTextBox textBox;
|
||||||
private readonly BeatmapSearchRulesetFilterRow modeFilter;
|
private readonly BeatmapSearchRulesetFilterRow modeFilter;
|
||||||
private readonly BeatmapSearchFilterRow<BeatmapSearchCategory> categoryFilter;
|
private readonly BeatmapSearchFilterRow<BeatmapSearchCategory> categoryFilter;
|
||||||
|
|
||||||
@ -83,7 +84,7 @@ namespace osu.Game.Overlays.BeatmapListing
|
|||||||
Spacing = new Vector2(0, 20),
|
Spacing = new Vector2(0, 20),
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
textBox = new SearchTextBox
|
textBox = new BeatmapSearchTextBox
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
},
|
},
|
||||||
@ -110,5 +111,15 @@ namespace osu.Game.Overlays.BeatmapListing
|
|||||||
{
|
{
|
||||||
background.Colour = colourProvider.Dark6;
|
background.Colour = colourProvider.Dark6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class BeatmapSearchTextBox : SearchTextBox
|
||||||
|
{
|
||||||
|
protected override Color4 SelectionColour => Color4.Gray;
|
||||||
|
|
||||||
|
public BeatmapSearchTextBox()
|
||||||
|
{
|
||||||
|
PlaceholderText = @"type in keywords...";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user