mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 01:47:30 +09: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
|
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;
|
protected override Container<Drawable> Content => content;
|
||||||
private readonly Container content;
|
private readonly Container content;
|
||||||
@ -22,7 +25,7 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
public CursorContainer Cursor { get; }
|
public CursorContainer Cursor { get; }
|
||||||
public bool ProvidesUserCursor => true;
|
public bool ProvidesUserCursor => true;
|
||||||
|
|
||||||
public OsuCursorContainer()
|
public OsuCursorVisualiser()
|
||||||
{
|
{
|
||||||
AddRangeInternal(new Drawable[]
|
AddRangeInternal(new Drawable[]
|
||||||
{
|
{
|
@ -445,7 +445,7 @@ namespace osu.Game
|
|||||||
|
|
||||||
mainContent.Padding = new MarginPadding { Top = ToolbarOffset };
|
mainContent.Padding = new MarginPadding { Top = ToolbarOffset };
|
||||||
|
|
||||||
CursorContainer.CanShowCursor = currentScreen?.CursorVisible ?? false;
|
CursorVisualiser.CanShowCursor = currentScreen?.CursorVisible ?? false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void screenAdded(Screen newScreen)
|
private void screenAdded(Screen newScreen)
|
||||||
|
@ -44,7 +44,7 @@ namespace osu.Game
|
|||||||
|
|
||||||
protected KeyBindingStore KeyBindingStore;
|
protected KeyBindingStore KeyBindingStore;
|
||||||
|
|
||||||
protected OsuCursorContainer CursorContainer;
|
protected OsuCursorVisualiser CursorVisualiser;
|
||||||
|
|
||||||
protected override string MainResourceFile => @"osu.Game.Resources.dll";
|
protected override string MainResourceFile => @"osu.Game.Resources.dll";
|
||||||
|
|
||||||
@ -211,14 +211,14 @@ namespace osu.Game
|
|||||||
|
|
||||||
GlobalKeyBindingInputManager globalBinding;
|
GlobalKeyBindingInputManager globalBinding;
|
||||||
|
|
||||||
CursorContainer = new OsuCursorContainer { RelativeSizeAxes = Axes.Both };
|
CursorVisualiser = new OsuCursorVisualiser { RelativeSizeAxes = Axes.Both };
|
||||||
CursorContainer.Child = globalBinding = new GlobalKeyBindingInputManager(this)
|
CursorVisualiser.Child = globalBinding = new GlobalKeyBindingInputManager(this)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
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);
|
KeyBindingStore.Register(globalBinding);
|
||||||
dependencies.Cache(globalBinding);
|
dependencies.Cache(globalBinding);
|
||||||
|
@ -377,7 +377,7 @@
|
|||||||
<Compile Include="Graphics\Cursor\IProvideCursor.cs" />
|
<Compile Include="Graphics\Cursor\IProvideCursor.cs" />
|
||||||
<Compile Include="Graphics\Cursor\MenuCursor.cs" />
|
<Compile Include="Graphics\Cursor\MenuCursor.cs" />
|
||||||
<Compile Include="Graphics\Cursor\OsuContextMenuContainer.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\Cursor\OsuTooltipContainer.cs" />
|
||||||
<Compile Include="Graphics\IHasAccentColour.cs" />
|
<Compile Include="Graphics\IHasAccentColour.cs" />
|
||||||
<Compile Include="Graphics\OsuColour.cs" />
|
<Compile Include="Graphics\OsuColour.cs" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user