Skip to content

Commit 4bbcb48

Browse files
committed
Tweak accessibility and add InteractionHelper helper property
1 parent 875d196 commit 4bbcb48

4 files changed

Lines changed: 10 additions & 7 deletions

File tree

MonkeyLoader.Resonite.Integration/UI/ContextMenus/ContextMenuItemsGenerationEvent.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ public abstract class ContextMenuItemsGenerationEvent : AsyncEvent
3636
/// </summary>
3737
public ContextMenu ContextMenu { get; }
3838

39+
/// <summary>
40+
/// Gets the <see cref="FrooxEngine.InteractionHandler"/> that the <see cref="ContextMenu">ContextMenu</see> may be being summoned for.
41+
/// </summary>
42+
/// <value><see langword="null"/> if the <see cref="ContextMenu">ContextMenu</see> isn't being summoned by an
43+
/// <see cref="FrooxEngine.InteractionHandler"/>; otherwise, the summoning handler.
44+
public InteractionHandler? InteractionHandler => Summoner as InteractionHandler;
45+
3946
/// <summary>
4047
/// Gets whether the <see cref="ContextMenu">ContextMenu</see> is open.
4148
/// </summary>

MonkeyLoader.Resonite.Integration/UI/ContextMenus/ContextMenusConfig.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
using MonkeyLoader.Configuration;
33
using MonkeyLoader.Resonite.Configuration;
44
using MonkeyLoader.Resonite.DataFeeds.Settings;
5-
using System;
6-
using System.Collections.Generic;
7-
using System.Linq;
8-
using System.Text;
95

106
namespace MonkeyLoader.Resonite.UI.ContextMenus
117
{

MonkeyLoader.Resonite.Integration/UI/Inspectors/DriveReceiverMenuItemsGenerationEvents.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public sealed class FieldDriveReceiverMenuItemsGenerationEvent<T> : FieldDriveRe
172172
protected override sealed User? UserCore { get; }
173173

174174
/// <inheritdoc/>
175-
public FieldDriveReceiverMenuItemsGenerationEvent(ContextMenu contextMenu)
175+
internal FieldDriveReceiverMenuItemsGenerationEvent(ContextMenu contextMenu)
176176
: base(contextMenu)
177177
{
178178
Summoner = ContextMenu.CurrentSummoner as FieldDriveReceiver<T>
@@ -239,7 +239,7 @@ public sealed class ReferenceDriveReceiverMenuItemsGenerationEvent<T> : Referenc
239239
protected override sealed User? UserCore { get; }
240240

241241
/// <inheritdoc/>
242-
public ReferenceDriveReceiverMenuItemsGenerationEvent(ContextMenu contextMenu)
242+
internal ReferenceDriveReceiverMenuItemsGenerationEvent(ContextMenu contextMenu)
243243
: base(contextMenu)
244244
{
245245
Summoner = ContextMenu.CurrentSummoner as ReferenceDriveReceiver<T>

MonkeyLoader.Resonite.Integration/UI/Inspectors/InspectorMemberActionsMenuItemsGenerationEvent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public sealed class InspectorMemberActionsMenuItemsGenerationEvent : ContextMenu
6565
public User? User { get; }
6666

6767
/// <inheritdoc/>
68-
public InspectorMemberActionsMenuItemsGenerationEvent(ContextMenu contextMenu) : base(contextMenu)
68+
internal InspectorMemberActionsMenuItemsGenerationEvent(ContextMenu contextMenu) : base(contextMenu)
6969
{
7070
Target = Summoner.Member.Target;
7171
SkinnedMesh = Summoner.SkinnedMesh;

0 commit comments

Comments
 (0)