mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 08:02:55 +08:00
OsuCursorContainer -> OsuCursorVisualiser
This commit is contained in:
parent
34aee4fea0
commit
78441c05cb
@ -9,7 +9,10 @@ using osu.Framework.Input;
|
||||
|
||||
namespace osu.Game.Graphics.Cursor
|
||||
{
|
||||
public class OsuCursorContainer : Container, IProvideCursor
|
||||
/// <summary>
|
||||
/// Visualises different cursors depending on the currently-hovered <see cref="Drawable"/>s.
|
||||
/// </summary>
|
||||
public class OsuCursorVisualiser : Container, IProvideCursor
|
||||
{
|
||||
protected override Container<Drawable> Content => content;
|
||||
private readonly Container content;
|
||||
@ -22,7 +25,7 @@ namespace osu.Game.Graphics.Cursor
|
||||
public CursorContainer Cursor { get; }
|
||||
public bool ProvidesUserCursor => true;
|
||||
|
||||
public OsuCursorContainer()
|
||||
public OsuCursorVisualiser()
|
||||
{
|
||||
AddRangeInternal(new Drawable[]
|
||||
{
|
@ -445,7 +445,7 @@ namespace osu.Game
|
||||
|
||||
mainContent.Padding = new MarginPadding { Top = ToolbarOffset };
|
||||
|
||||
CursorContainer.CanShowCursor = currentScreen?.CursorVisible ?? false;
|
||||
CursorVisualiser.CanShowCursor = currentScreen?.CursorVisible ?? false;
|
||||
}
|
||||
|
||||
private void screenAdded(Screen newScreen)
|
||||
|
@ -44,7 +44,7 @@ namespace osu.Game
|
||||
|
||||
protected KeyBindingStore KeyBindingStore;
|
||||
|
||||
protected OsuCursorContainer CursorContainer;
|
||||
protected OsuCursorVisualiser CursorVisualiser;
|
||||
|
||||
protected override string MainResourceFile => @"osu.Game.Resources.dll";
|
||||
|
||||
@ -211,14 +211,14 @@ namespace osu.Game
|
||||
|
||||
GlobalKeyBindingInputManager globalBinding;
|
||||
|
||||
CursorContainer = new OsuCursorContainer { RelativeSizeAxes = Axes.Both };
|
||||
CursorContainer.Child = globalBinding = new GlobalKeyBindingInputManager(this)
|
||||
CursorVisualiser = new OsuCursorVisualiser { RelativeSizeAxes = Axes.Both };
|
||||
CursorVisualiser.Child = globalBinding = new GlobalKeyBindingInputManager(this)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Child = content = new OsuTooltipContainer(CursorContainer.Cursor) { RelativeSizeAxes = Axes.Both }
|
||||
Child = content = new OsuTooltipContainer(CursorVisualiser.Cursor) { RelativeSizeAxes = Axes.Both }
|
||||
};
|
||||
|
||||
base.Content.Add(new DrawSizePreservingFillContainer { Child = CursorContainer });
|
||||
base.Content.Add(new DrawSizePreservingFillContainer { Child = CursorVisualiser });
|
||||
|
||||
KeyBindingStore.Register(globalBinding);
|
||||
dependencies.Cache(globalBinding);
|
||||
|
@ -377,7 +377,7 @@
|
||||
<Compile Include="Graphics\Cursor\IProvideCursor.cs" />
|
||||
<Compile Include="Graphics\Cursor\MenuCursor.cs" />
|
||||
<Compile Include="Graphics\Cursor\OsuContextMenuContainer.cs" />
|
||||
<Compile Include="Graphics\Cursor\OsuCursorContainer.cs" />
|
||||
<Compile Include="Graphics\Cursor\OsuCursorVisualiser.cs" />
|
||||
<Compile Include="Graphics\Cursor\OsuTooltipContainer.cs" />
|
||||
<Compile Include="Graphics\IHasAccentColour.cs" />
|
||||
<Compile Include="Graphics\OsuColour.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user