mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Fix tab controls overflowing
This commit is contained in:
@ -20,6 +20,7 @@ namespace osu.Game.Screens.Select
|
||||
public static readonly float HEIGHT = 24;
|
||||
private readonly OsuTabControlCheckbox modsCheckbox;
|
||||
private readonly OsuTabControl<BeatmapDetailTab> tabs;
|
||||
private readonly Container tabsContainer;
|
||||
|
||||
public Action<BeatmapDetailTab, bool> OnFilter; //passed the selected tab and if mods is checked
|
||||
|
||||
@ -39,11 +40,15 @@ namespace osu.Game.Screens.Select
|
||||
Height = 1,
|
||||
Colour = Color4.White.Opacity(0.2f),
|
||||
},
|
||||
tabs = new OsuTabControl<BeatmapDetailTab>
|
||||
tabsContainer = new Container
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Child = tabs = new OsuTabControl<BeatmapDetailTab>
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
},
|
||||
},
|
||||
modsCheckbox = new OsuTabControlCheckbox
|
||||
{
|
||||
@ -69,6 +74,13 @@ namespace osu.Game.Screens.Select
|
||||
tabs.Current.TriggerChange();
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
tabsContainer.Padding = new MarginPadding { Right = modsCheckbox.Width };
|
||||
}
|
||||
|
||||
private void invokeOnFilter()
|
||||
{
|
||||
OnFilter?.Invoke(tabs.Current.Value, modsCheckbox.Current.Value);
|
||||
|
Reference in New Issue
Block a user