ContextMenu (#3286)

* ContextMenu

* Updating to WPF.

* Updating to WPF.

* Margins
This commit is contained in:
Daniel Castro Razo
2021-02-25 19:42:16 -06:00
committed by GitHub
parent 51182c8469
commit f30a4d8a52
10 changed files with 1059 additions and 231 deletions

View File

@@ -1,3 +1,4 @@
using Robust.Shared;
using Robust.Shared.Configuration;
@@ -269,5 +270,10 @@ namespace Content.Shared
public static readonly CVarDef<bool> AdminOocEnabled =
CVarDef.Create("ooc.enabled_admin", true, CVar.NOTIFY);
/*
* Context Menu Grouping Types
*/
public static readonly CVarDef<int> ContextMenuGroupingType = CVarDef.Create("context_menu", 0, CVar.CLIENTONLY);
}
}

View File

@@ -22,8 +22,9 @@ namespace Content.Shared.GameObjects
Objects = DrawDepthTag.Default,
Items = DrawDepthTag.Default + 1,
Mobs = DrawDepthTag.Default + 2,
Effects = DrawDepthTag.Default + 3,
Ghosts = DrawDepthTag.Default + 4,
Overlays = DrawDepthTag.Default + 5,
HighlightedItems = DrawDepthTag.Default + 3,
Effects = DrawDepthTag.Default + 4,
Ghosts = DrawDepthTag.Default + 5,
Overlays = DrawDepthTag.Default + 6,
}
}

View File

@@ -20,7 +20,7 @@ namespace Content.Shared.GameObjects.Verbs
/// <param name="contextEntities"></param>
/// <param name="buffer">Whether we should slightly extend out the ignored range for the ray predicated</param>
/// <returns></returns>
protected bool TryGetContextEntities(IEntity player, MapCoordinates targetPos, [NotNullWhen(true)] out List<IEntity>? contextEntities, bool buffer = false)
public bool TryGetContextEntities(IEntity player, MapCoordinates targetPos, [NotNullWhen(true)] out List<IEntity>? contextEntities, bool buffer = false)
{
contextEntities = null;
var length = buffer ? 1.0f: 0.5f;