Show held item next to cursor (option). (#4658)

* Show held item next to cursor (option).

* UI scale

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Pieter-Jan Briers
2021-10-22 04:26:02 +02:00
committed by GitHub
parent 7b7562f75b
commit 3d19a991d8
7 changed files with 105 additions and 4 deletions

View File

@@ -3,6 +3,7 @@ using Content.Client.Chat;
using Content.Client.Chat.Managers;
using Content.Client.Chat.UI;
using Content.Client.Construction.UI;
using Content.Client.Hands;
using Content.Client.HUD;
using Content.Client.HUD.UI;
using Content.Client.Voting;
@@ -29,6 +30,7 @@ namespace Content.Client.Viewport
[Dependency] private readonly IChatManager _chatManager = default!;
[Dependency] private readonly IVoteManager _voteManager = default!;
[Dependency] private readonly IEyeManager _eyeManager = default!;
[Dependency] private readonly IOverlayManager _overlayManager = default!;
[ViewVariables] private ChatBox? _gameChat;
private ConstructionMenuPresenter? _constructionMenu;
@@ -70,10 +72,13 @@ namespace Content.Client.Viewport
SetupPresenters();
_eyeManager.MainViewport = Viewport.Viewport;
_overlayManager.AddOverlay(new ShowHandItemOverlay());
}
public override void Shutdown()
{
_overlayManager.RemoveOverlay<ShowHandItemOverlay>();
DisposePresenters();
base.Shutdown();