mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
125 lines
3.8 KiB
C#
125 lines
3.8 KiB
C#
using System.Numerics;
|
|
using Robust.Shared.Utility;
|
|
|
|
namespace Content.Client.Paper.UI;
|
|
|
|
/// <summary>
|
|
/// Adjusts the UI styling of paper.
|
|
/// </summary>
|
|
[RegisterComponent]
|
|
public sealed partial class PaperVisualsComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The path to the image which will be used as a background for the paper itself
|
|
/// </summary>
|
|
[DataField]
|
|
public string? BackgroundImagePath;
|
|
|
|
/// <summary>
|
|
/// An optional patch to configure tiling stretching of the background. Used to set
|
|
/// the PatchMargin in a <code>StyleBoxTexture</code>
|
|
/// </summary>
|
|
[DataField]
|
|
public Thickness BackgroundPatchMargin;
|
|
|
|
/// <summary>
|
|
/// Modulate the background image by this color. Can be used to add colorful
|
|
/// variants of images, without having to create new textures.
|
|
/// </summary>
|
|
[DataField]
|
|
public Color BackgroundModulate = Color.White;
|
|
|
|
/// <summary>
|
|
/// Should the background image tile, or be streched? Sets <code>StyleBoxTexture.StrechMode</code>
|
|
/// </summary>
|
|
[DataField]
|
|
public bool BackgroundImageTile;
|
|
|
|
/// <summary>
|
|
/// An additional scale to apply to the background image
|
|
/// </summary>
|
|
[DataField]
|
|
public Vector2 BackgroundScale = Vector2.One;
|
|
|
|
/// <summary>
|
|
/// A path to an image which will be used as a header on the paper
|
|
/// </summary>
|
|
[DataField]
|
|
public string? HeaderImagePath;
|
|
|
|
/// <summary>
|
|
/// Modulate the header image by this color
|
|
/// </summary>
|
|
[DataField]
|
|
public Color HeaderImageModulate = Color.White;
|
|
|
|
/// <summary>
|
|
/// Any additional margin to add around the header
|
|
/// </summary>
|
|
[DataField]
|
|
public Thickness HeaderMargin;
|
|
|
|
/// <summary>
|
|
/// A path to an image which will be used as a footer on the paper
|
|
/// </summary>
|
|
[DataField]
|
|
public ResPath? FooterImagePath;
|
|
|
|
/// <summary>
|
|
/// Modulate the footer image by this color
|
|
/// </summary>
|
|
[DataField]
|
|
public Color FooterImageModulate = Color.White;
|
|
|
|
/// <summary>
|
|
/// Any additional margin to add around the footer
|
|
/// </summary>
|
|
[DataField]
|
|
public Thickness FooterMargin;
|
|
|
|
/// <summary>
|
|
/// Path to an image to use as the background to the "content" of the paper
|
|
/// The header and actual written text will use this as a background. The
|
|
/// image will be tiled vertically with the property that the bottom of the
|
|
/// written text will line up with the bottom of this image.
|
|
/// </summary>
|
|
[DataField]
|
|
public string? ContentImagePath;
|
|
|
|
/// <summary>
|
|
/// Modulate the content image by this color
|
|
/// </summary>
|
|
[DataField]
|
|
public Color ContentImageModulate = Color.White;
|
|
|
|
/// <summary>
|
|
/// An additional margin around the content (including header)
|
|
/// </summary>
|
|
[DataField]
|
|
public Thickness ContentMargin;
|
|
|
|
/// <summary>
|
|
/// The number of lines that the content image represents. The
|
|
/// content image will be vertically tiled after this many lines
|
|
/// of text.
|
|
/// </summary>
|
|
[DataField]
|
|
public int ContentImageNumLines = 1;
|
|
|
|
/// <summary>
|
|
/// Optional default color for text written on the paper. Useful to
|
|
/// specify light color text for use on dark backgrounds. Paper text
|
|
/// can still use markup to override color for subsections.
|
|
/// </summary>
|
|
[DataField]
|
|
public Color? DefaultTextColor = null;
|
|
|
|
/// <summary>
|
|
/// This can enforce that your paper has a limited area to write in.
|
|
/// If you wish to constrain only one direction, the other direction
|
|
/// can be unlimited by specifying a value of zero.
|
|
/// This will be scaled according to UI scale.
|
|
/// </summary>
|
|
[DataField]
|
|
public Vector2? MaxWritableArea;
|
|
}
|