Files
tbd-station-14/Content.Client/PDA/PDAWindow.xaml.cs
Julian Giebel e11cf969fa PDA UI refactor and cartridges (#11335)
* Work on cartridges

* Work on PDA UI

* Work on PDA UIs program list

* Work on PDA UI borders

* Add DeviceNetworkingComponent to the pda base prototype

* Fix submodule version

* Fix cartridge loader ui key

* Fix pda menu xaml

* Implement relaying ui messages

* Finish implementing the notekeeper cartridge

* Fix submodule version

* Fix errors from merging master

* Fix test failing

* Implement setting preinstalled programs

* Add some documentation to CartridgeLoaderSystem

* Add more doc comments

* Add localization to program names

* Implement review suggestions

* Fix background programs receiving events twice when active
2022-11-08 14:00:20 -06:00

57 lines
1.3 KiB
C#

using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
namespace Content.Client.PDA;
[Virtual]
[GenerateTypedNameReferences]
public partial class PDAWindow : BaseWindow
{
public string? BorderColor
{
get => Background.ActualModulateSelf.ToHex();
set => Background.ModulateSelfOverride = Color.FromHex(value, Color.White);
}
public string? AccentHColor
{
get => AccentH.ActualModulateSelf.ToHex();
set
{
AccentH.ModulateSelfOverride = Color. FromHex(value, Color.White);
AccentH.Visible = value != null;
}
}
public string? AccentVColor
{
get => AccentV.ActualModulateSelf.ToHex();
set
{
AccentV.ModulateSelfOverride = Color. FromHex(value, Color.White);
AccentV.Visible = value != null;
}
}
public PDAWindow()
{
RobustXamlLoader.Load(this);
CloseButton.OnPressed += _ => Close();
XamlChildren = ContentsContainer.Children;
AccentH.Visible = false;
AccentV.Visible = false;
}
protected override DragMode GetDragModeFor(Vector2 relativeMousePos)
{
return DragMode.Move;
}
}