mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:57:36 +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
|
||||
{
|
||||
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()
|
||||
{
|
||||
@ -27,7 +27,7 @@ namespace osu.Game.Overlays
|
||||
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,
|
||||
};
|
||||
@ -36,7 +36,7 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
protected override float ChevronSize => 8;
|
||||
|
||||
public ControlTabItem(LocalisableString value)
|
||||
public ControlTabItem(LocalisableString? value)
|
||||
: base(value)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Y;
|
||||
|
@ -35,7 +35,7 @@ namespace osu.Game.Overlays.Wiki
|
||||
return;
|
||||
|
||||
TabControl.Clear();
|
||||
Current.Value = string.Empty;
|
||||
Current.Value = null;
|
||||
|
||||
TabControl.AddItem(index_page_string);
|
||||
|
||||
@ -52,7 +52,7 @@ namespace osu.Game.Overlays.Wiki
|
||||
Current.Value = e.NewValue.Title;
|
||||
}
|
||||
|
||||
private void onCurrentChange(ValueChangedEvent<LocalisableString> e)
|
||||
private void onCurrentChange(ValueChangedEvent<LocalisableString?> e)
|
||||
{
|
||||
if (e.NewValue == TabControl.Items.LastOrDefault())
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user