Files
RobustToolbox/Robust.Client/UserInterface/CustomControls/DebugMonitorControls/DebugVersionPanel.cs
Andi Lilaj b2ab247b5b Created Debug Version Panel and Version Info Printer similar to DebugSystemPanel (#5624)
* Created Debug Version Panel and Version Info Printer similar to DebugSystemPanel

* dependency injection

* remove VersionInformationPrinter

* Fix sorting
2025-09-17 17:32:25 +10:00

40 lines
1.3 KiB
C#

using Robust.Client.Graphics;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Configuration;
using Robust.Shared.Maths;
using Robust.Shared.Utility;
namespace Robust.Client.UserInterface.CustomControls.DebugMonitorControls
{
internal sealed class DebugVersionPanel : PanelContainer
{
public DebugVersionPanel(IConfigurationManager cfg)
{
var contents = new Label
{
FontColorShadowOverride = Color.Black,
};
AddChild(contents);
PanelOverride = new StyleBoxFlat
{
BackgroundColor = new Color(35, 134, 37, 138),
ContentMarginLeftOverride = 5,
ContentMarginRightOverride = 5,
ContentMarginTopOverride = 5,
ContentMarginBottomOverride = 5,
};
MouseFilter = contents.MouseFilter = MouseFilterMode.Ignore;
// Set visible explicitly
Visible = true;
HorizontalAlignment = HAlignment.Left;
VerticalAlignment = VAlignment.Top;
var buildInfo = GameBuildInformation.GetBuildInfoFromConfig(cfg);
contents.Text = $"Fork ID: {buildInfo.ForkId}\nFork Version: {buildInfo.Version}";
}
}
}