mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
* Created Debug Version Panel and Version Info Printer similar to DebugSystemPanel * dependency injection * remove VersionInformationPrinter * Fix sorting
40 lines
1.3 KiB
C#
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}";
|
|
}
|
|
}
|
|
}
|