Sentry turrets - Part 5: Reuseable UI components (#35149)

* Initial commit

* Updated how monotone buttons are styled

* Removed unnecessary textures

* Updated attributions

* Addressing reviewer comments

* Adjusted monotone checkbox styling
This commit is contained in:
chromiumboy
2025-05-03 12:19:08 -05:00
committed by GitHub
parent 885eb7bc35
commit f213753e2b
21 changed files with 496 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
using Robust.Client.UserInterface.Controls;
namespace Content.Client.UserInterface.Controls;
/// <summary>
/// A check box intended for use with a monotone color palette
/// </summary>
public sealed class MonotoneCheckBox : CheckBox
{
public const string StyleClassMonotoneCheckBox = "monotoneCheckBox";
public MonotoneCheckBox()
{
TextureRect.AddStyleClass(StyleClassMonotoneCheckBox);
}
protected override void DrawModeChanged()
{
base.DrawModeChanged();
// Appearance modulations
Modulate = Disabled ? Color.Gray : Color.White;
}
}