ThiefBackpackSet.xaml.cs 817 B

12345678910111213141516171819202122
  1. using Robust.Client.AutoGenerated;
  2. using Robust.Client.UserInterface;
  3. using Robust.Client.UserInterface.XAML;
  4. using Content.Shared.Thief;
  5. using Robust.Client.GameObjects;
  6. namespace Content.Client.Thief;
  7. [GenerateTypedNameReferences]
  8. public sealed partial class ThiefBackpackSet : Control
  9. {
  10. public ThiefBackpackSet(ThiefBackpackSetInfo set, SpriteSystem spriteSystem)
  11. {
  12. RobustXamlLoader.Load(this);
  13. Icon.Texture = spriteSystem.Frame0(set.Sprite);
  14. SetName.Text = Loc.GetString(set.Name);
  15. SetDescription.Text = Loc.GetString(set.Description);
  16. SetButton.Text = Loc.GetString(set.Selected ? "thief-backpack-button-deselect" : "thief-backpack-button-select");
  17. SetButton.ModulateSelfOverride = set.Selected ? new Color(40, 84, 35) : new Color(68, 75, 103);
  18. }
  19. }