mirror of https://github.com/ppy/osu
Rename OsuCursorVisualiser -> CursorOverrideContainer
This commit is contained in:
parent
d0b177e233
commit
43f8a8e8c5
|
@ -10,9 +10,9 @@
|
||||||
namespace osu.Game.Graphics.Cursor
|
namespace osu.Game.Graphics.Cursor
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Visualises different cursors depending on the currently-hovered <see cref="Drawable"/>s.
|
/// A container which provides a <see cref="MenuCursor"/> which can be overridden by hovered <see cref="Drawable"/>s.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class OsuCursorVisualiser : Container, IProvideCursor
|
public class CursorOverrideContainer : Container, IProvideCursor
|
||||||
{
|
{
|
||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => content;
|
||||||
private readonly Container content;
|
private readonly Container content;
|
||||||
|
@ -25,7 +25,7 @@ public class OsuCursorVisualiser : Container, IProvideCursor
|
||||||
public CursorContainer Cursor { get; }
|
public CursorContainer Cursor { get; }
|
||||||
public bool ProvidesUserCursor => true;
|
public bool ProvidesUserCursor => true;
|
||||||
|
|
||||||
public OsuCursorVisualiser()
|
public CursorOverrideContainer()
|
||||||
{
|
{
|
||||||
AddRangeInternal(new Drawable[]
|
AddRangeInternal(new Drawable[]
|
||||||
{
|
{
|
|
@ -445,7 +445,7 @@ protected override void UpdateAfterChildren()
|
||||||
|
|
||||||
mainContent.Padding = new MarginPadding { Top = ToolbarOffset };
|
mainContent.Padding = new MarginPadding { Top = ToolbarOffset };
|
||||||
|
|
||||||
CursorVisualiser.CanShowCursor = currentScreen?.CursorVisible ?? false;
|
CursorOverrideContainer.CanShowCursor = currentScreen?.CursorVisible ?? false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void screenAdded(Screen newScreen)
|
private void screenAdded(Screen newScreen)
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class OsuGameBase : Framework.Game, IOnlineComponent
|
||||||
|
|
||||||
protected KeyBindingStore KeyBindingStore;
|
protected KeyBindingStore KeyBindingStore;
|
||||||
|
|
||||||
protected OsuCursorVisualiser CursorVisualiser;
|
protected CursorOverrideContainer CursorOverrideContainer;
|
||||||
|
|
||||||
protected override string MainResourceFile => @"osu.Game.Resources.dll";
|
protected override string MainResourceFile => @"osu.Game.Resources.dll";
|
||||||
|
|
||||||
|
@ -211,14 +211,14 @@ protected override void LoadComplete()
|
||||||
|
|
||||||
GlobalKeyBindingInputManager globalBinding;
|
GlobalKeyBindingInputManager globalBinding;
|
||||||
|
|
||||||
CursorVisualiser = new OsuCursorVisualiser { RelativeSizeAxes = Axes.Both };
|
CursorOverrideContainer = new CursorOverrideContainer { RelativeSizeAxes = Axes.Both };
|
||||||
CursorVisualiser.Child = globalBinding = new GlobalKeyBindingInputManager(this)
|
CursorOverrideContainer.Child = globalBinding = new GlobalKeyBindingInputManager(this)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Child = content = new OsuTooltipContainer(CursorVisualiser.Cursor) { RelativeSizeAxes = Axes.Both }
|
Child = content = new OsuTooltipContainer(CursorOverrideContainer.Cursor) { RelativeSizeAxes = Axes.Both }
|
||||||
};
|
};
|
||||||
|
|
||||||
base.Content.Add(new DrawSizePreservingFillContainer { Child = CursorVisualiser });
|
base.Content.Add(new DrawSizePreservingFillContainer { Child = CursorOverrideContainer });
|
||||||
|
|
||||||
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\OsuCursorVisualiser.cs" />
|
<Compile Include="Graphics\Cursor\CursorOverrideContainer.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…
Reference in New Issue