Replaces cooldown circle (#956)

This commit is contained in:
Tomeno
2020-05-23 11:26:59 +02:00
committed by GitHub
parent cad59d2cb4
commit af0ec2aeb9
6 changed files with 46 additions and 54 deletions

View File

@@ -1,4 +1,5 @@
using System;
using Content.Client.UserInterface;
using Content.Shared.Input;
using Robust.Client.Graphics;
using Robust.Client.UserInterface;
@@ -13,7 +14,7 @@ namespace Content.Client.GameObjects
public TextureRect Button { get; }
public SpriteView SpriteView { get; }
public BaseButton StorageButton { get; }
public TextureRect CooldownCircle { get; }
public CooldownGraphic CooldownDisplay { get; }
public Action<GUIBoundKeyEventArgs> OnPressed { get; set; }
public Action<GUIBoundKeyEventArgs> OnStoragePressed { get; set; }
@@ -56,12 +57,10 @@ namespace Content.Client.GameObjects
StorageButton.OnPressed += OnStorageButtonPressed;
AddChild(CooldownCircle = new TextureRect
AddChild(CooldownDisplay = new CooldownGraphic
{
SizeFlagsHorizontal = SizeFlags.ShrinkCenter,
SizeFlagsVertical = SizeFlags.ShrinkCenter,
Stretch = TextureRect.StretchMode.KeepCentered,
TextureScale = (2, 2),
SizeFlagsHorizontal = SizeFlags.Fill,
SizeFlagsVertical = SizeFlags.Fill,
Visible = false,
});
}