mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 17:37:23 +09:00
Make classes private for now.
This commit is contained in:
parent
511fccdba7
commit
26a4238a38
@ -92,93 +92,93 @@ namespace osu.Desktop.Tests.Visual
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public class EditorMenuBar : MenuBar
|
private class EditorMenuBar : MenuBar
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public class EditorMenuBarItem : MenuBarItem
|
|
||||||
{
|
|
||||||
private const int fade_duration = 250;
|
|
||||||
private const float text_size = 17;
|
|
||||||
|
|
||||||
private readonly Container background;
|
|
||||||
|
|
||||||
private Color4 normalColour;
|
|
||||||
|
|
||||||
public EditorMenuBarItem(string title)
|
|
||||||
: base(title)
|
|
||||||
{
|
{
|
||||||
Content.Padding = new MarginPadding(8);
|
}
|
||||||
|
|
||||||
AddInternal(background = new Container
|
private class EditorMenuBarItem : MenuBarItem
|
||||||
|
{
|
||||||
|
private const int fade_duration = 250;
|
||||||
|
private const float text_size = 17;
|
||||||
|
|
||||||
|
private readonly Container background;
|
||||||
|
|
||||||
|
private Color4 normalColour;
|
||||||
|
|
||||||
|
public EditorMenuBarItem(string title)
|
||||||
|
: base(title)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
Content.Padding = new MarginPadding(8);
|
||||||
Masking = true,
|
|
||||||
Depth = float.MaxValue,
|
AddInternal(background = new Container
|
||||||
Alpha = 0,
|
|
||||||
Child = new Container<Box>
|
|
||||||
{
|
{
|
||||||
// The following is done so we can have top rounded corners but not bottom corners
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Height = 2,
|
|
||||||
Masking = true,
|
Masking = true,
|
||||||
CornerRadius = 5,
|
Depth = float.MaxValue,
|
||||||
Child = new Box { RelativeSizeAxes = Axes.Both }
|
Alpha = 0,
|
||||||
}
|
Child = new Container<Box>
|
||||||
});
|
{
|
||||||
|
// The following is done so we can have top rounded corners but not bottom corners
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Height = 2,
|
||||||
|
Masking = true,
|
||||||
|
CornerRadius = 5,
|
||||||
|
Child = new Box { RelativeSizeAxes = Axes.Both }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours)
|
||||||
|
{
|
||||||
|
background.Colour = colours.Gray3;
|
||||||
|
ContextMenu.Menu.Background.Colour = colours.Gray3;
|
||||||
|
TitleText.Colour = normalColour = colours.BlueLight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Open()
|
||||||
|
{
|
||||||
|
base.Open();
|
||||||
|
|
||||||
|
background.FadeIn(fade_duration, Easing.OutQuint);
|
||||||
|
TitleText.FadeColour(Color4.White, fade_duration, Easing.OutQuint);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Close()
|
||||||
|
{
|
||||||
|
base.Close();
|
||||||
|
|
||||||
|
background.FadeOut(fade_duration, Easing.OutQuint);
|
||||||
|
TitleText.FadeColour(normalColour, fade_duration, Easing.OutQuint);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override SpriteText CreateTitleText() => new OsuSpriteText { TextSize = text_size };
|
||||||
|
|
||||||
|
protected override ContextMenu<ContextMenuItem> CreateContextMenu() => new OsuContextMenu<ContextMenuItem>
|
||||||
|
{
|
||||||
|
OriginPosition = new Vector2(8, 0)
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
private class EditorContextMenuSpacer : EditorContextMenuItem
|
||||||
private void load(OsuColour colours)
|
|
||||||
{
|
{
|
||||||
background.Colour = colours.Gray3;
|
public override bool HandleInput => false;
|
||||||
ContextMenu.Menu.Background.Colour = colours.Gray3;
|
|
||||||
TitleText.Colour = normalColour = colours.BlueLight;
|
public EditorContextMenuSpacer()
|
||||||
|
: base(" ")
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Open()
|
private class EditorContextMenuItem : OsuContextMenuItem
|
||||||
{
|
{
|
||||||
base.Open();
|
private const int min_text_length = 40;
|
||||||
|
|
||||||
background.FadeIn(fade_duration, Easing.OutQuint);
|
public EditorContextMenuItem(string title, MenuItemType type = MenuItemType.Standard)
|
||||||
TitleText.FadeColour(Color4.White, fade_duration, Easing.OutQuint);
|
: base(title.PadRight(min_text_length), type)
|
||||||
}
|
{
|
||||||
|
}
|
||||||
public override void Close()
|
|
||||||
{
|
|
||||||
base.Close();
|
|
||||||
|
|
||||||
background.FadeOut(fade_duration, Easing.OutQuint);
|
|
||||||
TitleText.FadeColour(normalColour, fade_duration, Easing.OutQuint);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override SpriteText CreateTitleText() => new OsuSpriteText { TextSize = text_size };
|
|
||||||
|
|
||||||
protected override ContextMenu<ContextMenuItem> CreateContextMenu() => new OsuContextMenu<ContextMenuItem>
|
|
||||||
{
|
|
||||||
OriginPosition = new Vector2(8, 0)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public class EditorContextMenuSpacer : EditorContextMenuItem
|
|
||||||
{
|
|
||||||
public override bool HandleInput => false;
|
|
||||||
|
|
||||||
public EditorContextMenuSpacer()
|
|
||||||
: base(" ")
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class EditorContextMenuItem : OsuContextMenuItem
|
|
||||||
{
|
|
||||||
private const int min_text_length = 40;
|
|
||||||
|
|
||||||
public EditorContextMenuItem(string title, MenuItemType type = MenuItemType.Standard)
|
|
||||||
: base(title.PadRight(min_text_length), type)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user