mirror of
https://github.com/wega-team/ss14-wega.git
synced 2026-06-09 10:06:49 +02:00
39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using Content.Client.Resources;
|
|
using Robust.Client.Graphics;
|
|
using Robust.Client.Input;
|
|
using Robust.Client.Player;
|
|
using Robust.Client.ResourceManagement;
|
|
using Robust.Shared.Enums;
|
|
|
|
namespace Content.Client.Offer;
|
|
|
|
public sealed class OfferItemIndicatorsOverlay : Overlay
|
|
{
|
|
[Dependency] private IInputManager _inputManager = default!;
|
|
[Dependency] private IPlayerManager _player = default!;
|
|
|
|
private readonly Texture _indicatorTexture;
|
|
|
|
public override OverlaySpace Space => OverlaySpace.ScreenSpace;
|
|
|
|
public OfferItemIndicatorsOverlay()
|
|
{
|
|
IoCManager.InjectDependencies(this);
|
|
|
|
var resourceCache = IoCManager.Resolve<IResourceCache>();
|
|
_indicatorTexture = resourceCache.GetTexture("/Textures/_Wega/Interface/Misc/give_item.rsi/give_item.png");
|
|
}
|
|
|
|
protected override void Draw(in OverlayDrawArgs args)
|
|
{
|
|
var player = _player.LocalEntity;
|
|
if (player == null)
|
|
return;
|
|
|
|
var screen = args.ScreenHandle;
|
|
var mousePos = _inputManager.MouseScreenPosition.Position;
|
|
|
|
screen.DrawTexture(_indicatorTexture, mousePos - _indicatorTexture.Size / 2, Color.White);
|
|
}
|
|
}
|