mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 19:27:26 +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
|
||||
{
|
||||
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
|
||||
{
|
||||
protected override Tooltip CreateTooltip() => new OsuTooltip();
|
||||
protected override ITooltip CreateTooltip() => new OsuTooltip();
|
||||
|
||||
public OsuTooltipContainer(CursorContainer cursor) : base(cursor)
|
||||
{
|
||||
|
@ -37,9 +37,9 @@ namespace osu.Game
|
||||
|
||||
public APIAccess API;
|
||||
|
||||
protected override Container<Drawable> Content => ratioContainer;
|
||||
private Container content;
|
||||
|
||||
private RatioAdjust ratioContainer;
|
||||
protected override Container<Drawable> Content => content;
|
||||
|
||||
protected MenuCursor Cursor;
|
||||
|
||||
@ -146,21 +146,19 @@ namespace osu.Game
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
base.Content.Add(ratioContainer = new RatioAdjust
|
||||
base.Content.Add(new RatioAdjust
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Container
|
||||
Cursor = new MenuCursor(),
|
||||
new OsuTooltipContainer(Cursor)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Depth = float.MinValue,
|
||||
Children = new Drawable[]
|
||||
Child = content = new OsuContextMenuContainer
|
||||
{
|
||||
Cursor = new MenuCursor(),
|
||||
new OsuContextMenuContainer(Cursor) { Depth = -2 },
|
||||
new OsuTooltipContainer(Cursor) { Depth = -1 },
|
||||
}
|
||||
},
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
},
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -194,7 +194,7 @@ namespace osu.Game.Overlays
|
||||
|
||||
protected override bool OnDragStart(InputState state)
|
||||
{
|
||||
if (!channelTabs.Hovering)
|
||||
if (!channelTabs.IsHovered)
|
||||
return base.OnDragStart(state);
|
||||
|
||||
startDragChatHeight = chatHeight.Value;
|
||||
|
@ -236,7 +236,7 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
if (beatIndex < 0) return;
|
||||
|
||||
if (Hovering)
|
||||
if (IsHovered)
|
||||
{
|
||||
using (BeginDelayedSequence(early_activation))
|
||||
Schedule(() => sampleBeat.Play());
|
||||
|
@ -156,7 +156,7 @@ namespace osu.Game.Screens.Play
|
||||
if (lastState == Visibility.Hidden)
|
||||
FadeIn(500, EasingTypes.OutExpo);
|
||||
|
||||
if (!Hovering)
|
||||
if (!IsHovered)
|
||||
using (BeginDelayedSequence(1000))
|
||||
scheduledHide = Schedule(() => State = Visibility.Hidden);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user