fish-station/Content.Shared/_Sunrise/CartridgeLoader/Cartridges/PhotoUiState.cs

42 lines
1.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Robust.Shared.Serialization;
namespace Content.Shared._Sunrise.CartridgeLoader.Cartridges;
/// <summary>
/// Состояние UI фото-картриджа
/// </summary>
[Serializable, NetSerializable]
public sealed class PhotoUiState : BoundUserInterfaceState
{
/// <summary>
/// Список фотографий в галерее (PhotoId -> PhotoMetadata)
/// </summary>
public Dictionary<string, PhotoMetadata> Photos { get; }
/// <summary>
/// Статус камеры (готовность к съемке)
/// </summary>
public bool CameraReady { get; }
/// <summary>
/// Включена ли вспышка
/// </summary>
public bool FlashEnabled { get; }
/// <summary>
/// Сообщение об ошибке (если есть)
/// </summary>
public string? ErrorMessage { get; }
public PhotoUiState(
Dictionary<string, PhotoMetadata> photos,
bool cameraReady,
bool flashEnabled,
string? errorMessage = null)
{
Photos = photos;
CameraReady = cameraReady;
FlashEnabled = flashEnabled;
ErrorMessage = errorMessage;
}
}