mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* weldingOverlay * more universal * fixes * colors back to black * overlay image moved * fixes fixes * smal fixes * path * fixes * shader removal * cleanup * Added Activiate option * scrap metal helmet * png moved out of rsi * overlay sticking with zoom * Apply suggestions from code review Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * fixes * partial and readonly * again * whitespace * ws * refresh * Typos and inherits Signed-off-by: Connor Huffine <chuffine@gmail.com> * gasmask parent and merge mistake * fix for multi mask problems * fix for same shader toggle * turn this off on other viewports * docs * Implement scaling and scale down the textures --------- Signed-off-by: Connor Huffine <chuffine@gmail.com> Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: Connor Huffine <chuffine@gmail.com> Co-authored-by: SlamBamActionman <slambamactionman@gmail.com>
43 lines
1.4 KiB
C#
43 lines
1.4 KiB
C#
using System.Numerics;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Utility;
|
|
|
|
namespace Content.Shared.Overlays;
|
|
|
|
/// <summary>
|
|
/// Adds a image overlay on screen when wearing an entity with this component.
|
|
/// The border pixels of the image get stretched out to cover the rest of the viewport.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Need a blurred texture? Check out <see cref="Robust.Shared.Graphics.TextureLoadParameters"/> to include a filter sample.
|
|
/// </remarks>
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
|
|
public sealed partial class ImageOverlayComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// Path to image overlaid on the screen.
|
|
/// </summary>
|
|
[DataField(required: true), AutoNetworkedField]
|
|
public ResPath PathToOverlayImage = default!;
|
|
|
|
/// <summary>
|
|
/// The additional Color that can be overlaid over whole screen.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public Color AdditionalColorOverlay = new(0, 0, 0, 0);
|
|
|
|
/// <summary>
|
|
/// Scales the texture in x/y after it has been scaled to fit the user's viewport.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Avoid using large textures unless you really have to!
|
|
/// </remarks>
|
|
[DataField, AutoNetworkedField]
|
|
public Vector2 Scale = Vector2.One;
|
|
|
|
/// <summary>
|
|
/// Is this overlay active
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public bool Active = true;
|
|
}
|