mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 08:52:55 +08:00
Merge pull request #991 from Tom94/update-framework
Use tooltip and context menu containers as newly required
This commit is contained in:
commit
621a4e892a
@ -1 +1 @@
|
|||||||
Subproject commit 672e318d541f6a7106a0a2b088dd3ec5e8bff5db
|
Subproject commit cd2b351de37f17b6d91d1fc062627208a09c3834
|
@ -10,9 +10,5 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
public class OsuContextMenuContainer : ContextMenuContainer
|
public class OsuContextMenuContainer : ContextMenuContainer
|
||||||
{
|
{
|
||||||
protected override ContextMenu<ContextMenuItem> CreateContextMenu() => new OsuContextMenu<ContextMenuItem>();
|
protected override ContextMenu<ContextMenuItem> CreateContextMenu() => new OsuContextMenu<ContextMenuItem>();
|
||||||
|
|
||||||
public OsuContextMenuContainer(CursorContainer cursor) : base(cursor)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -15,7 +15,7 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
{
|
{
|
||||||
public class OsuTooltipContainer : TooltipContainer
|
public class OsuTooltipContainer : TooltipContainer
|
||||||
{
|
{
|
||||||
protected override Tooltip CreateTooltip() => new OsuTooltip();
|
protected override ITooltip CreateTooltip() => new OsuTooltip();
|
||||||
|
|
||||||
public OsuTooltipContainer(CursorContainer cursor) : base(cursor)
|
public OsuTooltipContainer(CursorContainer cursor) : base(cursor)
|
||||||
{
|
{
|
||||||
|
@ -37,9 +37,9 @@ namespace osu.Game
|
|||||||
|
|
||||||
public APIAccess API;
|
public APIAccess API;
|
||||||
|
|
||||||
protected override Container<Drawable> Content => ratioContainer;
|
private Container content;
|
||||||
|
|
||||||
private RatioAdjust ratioContainer;
|
protected override Container<Drawable> Content => content;
|
||||||
|
|
||||||
protected MenuCursor Cursor;
|
protected MenuCursor Cursor;
|
||||||
|
|
||||||
@ -146,21 +146,19 @@ namespace osu.Game
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
base.Content.Add(ratioContainer = new RatioAdjust
|
base.Content.Add(new RatioAdjust
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new Container
|
Cursor = new MenuCursor(),
|
||||||
|
new OsuTooltipContainer(Cursor)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Depth = float.MinValue,
|
Child = content = new OsuContextMenuContainer
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
{
|
||||||
Cursor = new MenuCursor(),
|
RelativeSizeAxes = Axes.Both,
|
||||||
new OsuContextMenuContainer(Cursor) { Depth = -2 },
|
},
|
||||||
new OsuTooltipContainer(Cursor) { Depth = -1 },
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
protected override bool OnDragStart(InputState state)
|
protected override bool OnDragStart(InputState state)
|
||||||
{
|
{
|
||||||
if (!channelTabs.Hovering)
|
if (!channelTabs.IsHovered)
|
||||||
return base.OnDragStart(state);
|
return base.OnDragStart(state);
|
||||||
|
|
||||||
startDragChatHeight = chatHeight.Value;
|
startDragChatHeight = chatHeight.Value;
|
||||||
|
@ -236,7 +236,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
if (beatIndex < 0) return;
|
if (beatIndex < 0) return;
|
||||||
|
|
||||||
if (Hovering)
|
if (IsHovered)
|
||||||
{
|
{
|
||||||
using (BeginDelayedSequence(early_activation))
|
using (BeginDelayedSequence(early_activation))
|
||||||
Schedule(() => sampleBeat.Play());
|
Schedule(() => sampleBeat.Play());
|
||||||
|
@ -156,7 +156,7 @@ namespace osu.Game.Screens.Play
|
|||||||
if (lastState == Visibility.Hidden)
|
if (lastState == Visibility.Hidden)
|
||||||
FadeIn(500, EasingTypes.OutExpo);
|
FadeIn(500, EasingTypes.OutExpo);
|
||||||
|
|
||||||
if (!Hovering)
|
if (!IsHovered)
|
||||||
using (BeginDelayedSequence(1000))
|
using (BeginDelayedSequence(1000))
|
||||||
scheduledHide = Schedule(() => State = Visibility.Hidden);
|
scheduledHide = Schedule(() => State = Visibility.Hidden);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user