using Robust.Client.Graphics; using Robust.Shared.Enums; using Robust.Shared.Prototypes; namespace Content.Client._White.Overlays; public sealed class AtmOverlay : Overlay { [Dependency] private readonly IPrototypeManager _prototype = default!; private readonly ShaderInstance _shader; public AtmOverlay() { IoCManager.InjectDependencies(this); _shader = _prototype.Index("ATM").Instance().Duplicate(); } public override OverlaySpace Space => OverlaySpace.WorldSpace; public override bool RequestScreenTexture => true; protected override void Draw(in OverlayDrawArgs args) { if (ScreenTexture is null) return; var worldHandle = args.WorldHandle; _shader.SetParameter("SCREEN_TEXTURE", ScreenTexture); worldHandle.UseShader(_shader); worldHandle.DrawRect(args.WorldBounds, Color.White); worldHandle.UseShader(null); } }