From d68f17b697c0287f8c519ddf96807accad8c3c32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Thu, 6 Jul 2017 15:15:12 +0300 Subject: [PATCH 1/4] Use tooltip and context menu containers as newly required --- osu-framework | 2 +- osu-resources | 2 +- .../Cursor/OsuContextMenuContainer.cs | 4 ---- osu.Game/OsuGameBase.cs | 20 +++++++++---------- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/osu-framework b/osu-framework index 672e318d54..47ad455b71 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 672e318d541f6a7106a0a2b088dd3ec5e8bff5db +Subproject commit 47ad455b7160b9b936bac1610e4bae8db0c74165 diff --git a/osu-resources b/osu-resources index 900f47563f..76656c51f2 160000 --- a/osu-resources +++ b/osu-resources @@ -1 +1 @@ -Subproject commit 900f47563f5598eef7cbf203f0b3f2166508b6d5 +Subproject commit 76656c51f281e7934159e9ed4414378fef24d130 diff --git a/osu.Game/Graphics/Cursor/OsuContextMenuContainer.cs b/osu.Game/Graphics/Cursor/OsuContextMenuContainer.cs index 2cc6c3a46a..9162fd6893 100644 --- a/osu.Game/Graphics/Cursor/OsuContextMenuContainer.cs +++ b/osu.Game/Graphics/Cursor/OsuContextMenuContainer.cs @@ -10,9 +10,5 @@ namespace osu.Game.Graphics.Cursor public class OsuContextMenuContainer : ContextMenuContainer { protected override ContextMenu CreateContextMenu() => new OsuContextMenu(); - - public OsuContextMenuContainer(CursorContainer cursor) : base(cursor) - { - } } } \ No newline at end of file diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs index 5e73ea55e6..71ac8af08d 100644 --- a/osu.Game/OsuGameBase.cs +++ b/osu.Game/OsuGameBase.cs @@ -37,9 +37,9 @@ namespace osu.Game public APIAccess API; - protected override Container Content => ratioContainer; + private Container content; - private RatioAdjust ratioContainer; + protected override Container 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, + }, + } } }); From eb647658484bdfd6370fca0873476304885a4727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Thu, 6 Jul 2017 15:44:05 +0300 Subject: [PATCH 2/4] Update framework --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index 47ad455b71..862e478219 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 47ad455b7160b9b936bac1610e4bae8db0c74165 +Subproject commit 862e478219a376f769a7ecb32f6fa135fd69cb26 From 6de9776e05686e873af0124c13c4c7b19f6e3f68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Fri, 7 Jul 2017 08:59:17 +0300 Subject: [PATCH 3/4] Update framework with tooltip changes --- osu-framework | 2 +- osu.Game/Graphics/Cursor/OsuTooltipContainer.cs | 2 +- osu.Game/Overlays/ChatOverlay.cs | 2 +- osu.Game/Screens/Menu/OsuLogo.cs | 2 +- osu.Game/Screens/Play/SkipButton.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/osu-framework b/osu-framework index 862e478219..c966b1b9d0 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 862e478219a376f769a7ecb32f6fa135fd69cb26 +Subproject commit c966b1b9d035f8b1df5ee81db7aae112ac374847 diff --git a/osu.Game/Graphics/Cursor/OsuTooltipContainer.cs b/osu.Game/Graphics/Cursor/OsuTooltipContainer.cs index 133caf8040..7608a366dc 100644 --- a/osu.Game/Graphics/Cursor/OsuTooltipContainer.cs +++ b/osu.Game/Graphics/Cursor/OsuTooltipContainer.cs @@ -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) { diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index 5fcdf22122..700889ed26 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -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; diff --git a/osu.Game/Screens/Menu/OsuLogo.cs b/osu.Game/Screens/Menu/OsuLogo.cs index b26cbe02ba..efbd106cb5 100644 --- a/osu.Game/Screens/Menu/OsuLogo.cs +++ b/osu.Game/Screens/Menu/OsuLogo.cs @@ -236,7 +236,7 @@ namespace osu.Game.Screens.Menu if (beatIndex < 0) return; - if (Hovering) + if (IsHovered) { using (BeginDelayedSequence(early_activation)) Schedule(() => sampleBeat.Play()); diff --git a/osu.Game/Screens/Play/SkipButton.cs b/osu.Game/Screens/Play/SkipButton.cs index 4a81ce90ff..a3ee2aeb72 100644 --- a/osu.Game/Screens/Play/SkipButton.cs +++ b/osu.Game/Screens/Play/SkipButton.cs @@ -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; From 26c40105e2a4ed09923221f0de9dff4768901785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Fri, 7 Jul 2017 10:22:07 +0300 Subject: [PATCH 4/4] Update framework --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index c966b1b9d0..cd2b351de3 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit c966b1b9d035f8b1df5ee81db7aae112ac374847 +Subproject commit cd2b351de37f17b6d91d1fc062627208a09c3834