mirror of
https://github.com/ppy/osu.git
synced 2024-09-22 01:27:29 +08:00
Allow null for breadcrumb control
This commit is contained in:
parent
e3c10e3994
commit
7859d02c5b
@ -9,11 +9,11 @@ using osu.Game.Graphics.UserInterface;
|
|||||||
|
|
||||||
namespace osu.Game.Overlays
|
namespace osu.Game.Overlays
|
||||||
{
|
{
|
||||||
public abstract class BreadcrumbControlOverlayHeader : TabControlOverlayHeader<LocalisableString>
|
public abstract class BreadcrumbControlOverlayHeader : TabControlOverlayHeader<LocalisableString?>
|
||||||
{
|
{
|
||||||
protected override OsuTabControl<LocalisableString> CreateTabControl() => new OverlayHeaderBreadcrumbControl();
|
protected override OsuTabControl<LocalisableString?> CreateTabControl() => new OverlayHeaderBreadcrumbControl();
|
||||||
|
|
||||||
public class OverlayHeaderBreadcrumbControl : BreadcrumbControl<LocalisableString>
|
public class OverlayHeaderBreadcrumbControl : BreadcrumbControl<LocalisableString?>
|
||||||
{
|
{
|
||||||
public OverlayHeaderBreadcrumbControl()
|
public OverlayHeaderBreadcrumbControl()
|
||||||
{
|
{
|
||||||
@ -27,7 +27,7 @@ namespace osu.Game.Overlays
|
|||||||
AccentColour = colourProvider.Light2;
|
AccentColour = colourProvider.Light2;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override TabItem<LocalisableString> CreateTabItem(LocalisableString value) => new ControlTabItem(value)
|
protected override TabItem<LocalisableString?> CreateTabItem(LocalisableString? value) => new ControlTabItem(value)
|
||||||
{
|
{
|
||||||
AccentColour = AccentColour,
|
AccentColour = AccentColour,
|
||||||
};
|
};
|
||||||
@ -36,7 +36,7 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
protected override float ChevronSize => 8;
|
protected override float ChevronSize => 8;
|
||||||
|
|
||||||
public ControlTabItem(LocalisableString value)
|
public ControlTabItem(LocalisableString? value)
|
||||||
: base(value)
|
: base(value)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Y;
|
RelativeSizeAxes = Axes.Y;
|
||||||
|
@ -35,7 +35,7 @@ namespace osu.Game.Overlays.Wiki
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
TabControl.Clear();
|
TabControl.Clear();
|
||||||
Current.Value = string.Empty;
|
Current.Value = null;
|
||||||
|
|
||||||
TabControl.AddItem(index_page_string);
|
TabControl.AddItem(index_page_string);
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ namespace osu.Game.Overlays.Wiki
|
|||||||
Current.Value = e.NewValue.Title;
|
Current.Value = e.NewValue.Title;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onCurrentChange(ValueChangedEvent<LocalisableString> e)
|
private void onCurrentChange(ValueChangedEvent<LocalisableString?> e)
|
||||||
{
|
{
|
||||||
if (e.NewValue == TabControl.Items.LastOrDefault())
|
if (e.NewValue == TabControl.Items.LastOrDefault())
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user