2023-07-08 14:08:32 +10:00
|
|
|
|
using System.Numerics;
|
|
|
|
|
|
using Robust.Client.AutoGenerated;
|
2022-11-08 21:00:20 +01:00
|
|
|
|
using Robust.Client.UserInterface.CustomControls;
|
|
|
|
|
|
using Robust.Client.UserInterface.XAML;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Client.PDA;
|
|
|
|
|
|
|
|
|
|
|
|
[Virtual]
|
|
|
|
|
|
[GenerateTypedNameReferences]
|
2023-06-15 03:44:28 +02:00
|
|
|
|
public partial class PdaWindow : BaseWindow
|
2022-11-08 21:00:20 +01:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
public string? BorderColor
|
|
|
|
|
|
{
|
|
|
|
|
|
get => Background.ActualModulateSelf.ToHex();
|
|
|
|
|
|
|
|
|
|
|
|
set => Background.ModulateSelfOverride = Color.FromHex(value, Color.White);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public string? AccentHColor
|
|
|
|
|
|
{
|
|
|
|
|
|
get => AccentH.ActualModulateSelf.ToHex();
|
|
|
|
|
|
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
2023-06-07 07:22:19 -07:00
|
|
|
|
AccentH.ModulateSelfOverride = Color.FromHex(value, Color.White);
|
2022-11-08 21:00:20 +01:00
|
|
|
|
AccentH.Visible = value != null;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public string? AccentVColor
|
|
|
|
|
|
{
|
|
|
|
|
|
get => AccentV.ActualModulateSelf.ToHex();
|
|
|
|
|
|
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
2023-06-07 07:22:19 -07:00
|
|
|
|
AccentV.ModulateSelfOverride = Color.FromHex(value, Color.White);
|
2022-11-08 21:00:20 +01:00
|
|
|
|
AccentV.Visible = value != null;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-06-15 03:44:28 +02:00
|
|
|
|
public PdaWindow()
|
2022-11-08 21:00:20 +01:00
|
|
|
|
{
|
|
|
|
|
|
RobustXamlLoader.Load(this);
|
|
|
|
|
|
|
|
|
|
|
|
CloseButton.OnPressed += _ => Close();
|
|
|
|
|
|
XamlChildren = ContentsContainer.Children;
|
|
|
|
|
|
|
|
|
|
|
|
AccentH.Visible = false;
|
|
|
|
|
|
AccentV.Visible = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected override DragMode GetDragModeFor(Vector2 relativeMousePos)
|
|
|
|
|
|
{
|
|
|
|
|
|
return DragMode.Move;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|