Re-enable context menus finally...
This commit is contained in:
@@ -59,36 +59,39 @@ public class Pair
|
|||||||
|
|
||||||
public void AddContextMenu(IMenuOpenedArgs args)
|
public void AddContextMenu(IMenuOpenedArgs args)
|
||||||
{
|
{
|
||||||
if (CachedPlayer == null || true /* TODO: Check target */ || IsPaused) return;
|
if (CachedPlayer == null || (args.Target is not MenuTargetDefault target) || target.TargetObjectId != CachedPlayer.PlayerCharacterId || IsPaused) return;
|
||||||
|
|
||||||
args.AddMenuItem(new MenuItem()
|
args.AddMenuItem(new MenuItem()
|
||||||
{
|
{
|
||||||
Name = "Open Profile",
|
Name = "Open Profile",
|
||||||
OnClicked = (a) => _mediator.Publish(new ProfileOpenStandaloneMessage(this)),
|
OnClicked = (a) => _mediator.Publish(new ProfileOpenStandaloneMessage(this)),
|
||||||
PrefixColor = 559,
|
PrefixColor = 559,
|
||||||
PrefixChar = '',
|
PrefixChar = 'L'
|
||||||
});
|
});
|
||||||
args.AddMenuItem(new MenuItem()
|
args.AddMenuItem(new MenuItem()
|
||||||
{
|
{
|
||||||
Name = "Reapply last data",
|
Name = "Reapply last data",
|
||||||
OnClicked = (a) => ApplyLastReceivedData(forced: true),
|
OnClicked = (a) => ApplyLastReceivedData(forced: true),
|
||||||
PrefixColor = 559,
|
PrefixColor = 559,
|
||||||
PrefixChar = '',
|
PrefixChar = 'L',
|
||||||
});
|
});
|
||||||
args.AddMenuItem(new MenuItem()
|
if (UserPair != null)
|
||||||
{
|
{
|
||||||
Name = "Change Permissions",
|
args.AddMenuItem(new MenuItem()
|
||||||
OnClicked = (a) => _mediator.Publish(new OpenPermissionWindow(this)),
|
{
|
||||||
PrefixColor = 559,
|
Name = "Change Permissions",
|
||||||
PrefixChar = '',
|
OnClicked = (a) => _mediator.Publish(new OpenPermissionWindow(this)),
|
||||||
});
|
PrefixColor = 559,
|
||||||
args.AddMenuItem(new MenuItem()
|
PrefixChar = 'L',
|
||||||
{
|
});
|
||||||
Name = "Cycle pause state",
|
args.AddMenuItem(new MenuItem()
|
||||||
OnClicked = (a) => _mediator.Publish(new CyclePauseMessage(UserData)),
|
{
|
||||||
PrefixColor = 559,
|
Name = "Cycle pause state",
|
||||||
PrefixChar = '',
|
OnClicked = (a) => _mediator.Publish(new CyclePauseMessage(UserData)),
|
||||||
});
|
PrefixColor = 559,
|
||||||
|
PrefixChar = 'L',
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ApplyData(OnlineUserCharaDataDto data)
|
public void ApplyData(OnlineUserCharaDataDto data)
|
||||||
|
|||||||
Reference in New Issue
Block a user