(0c3442136) Merge branch 'dev' into docking-interface

This commit is contained in:
Joonas Rikkonen
2019-05-03 13:41:23 +03:00
parent 45ba589d96
commit fbb7daed00
53 changed files with 1442 additions and 713 deletions
@@ -92,6 +92,25 @@ namespace Barotrauma.Items.Components
}
}
public void HighlightElement(int index, Color color, float duration, float pulsateAmount = 0.0f)
{
if (index < 0 || index >= uiElements.Count) { return; }
uiElements[index].Flash(color, duration);
if (pulsateAmount > 0.0f)
{
if (uiElements[index] is GUIButton button)
{
button.Frame.Pulsate(Vector2.One, Vector2.One * (1.0f + pulsateAmount), duration);
button.Frame.RectTransform.SetPosition(Anchor.Center);
}
else
{
uiElements[index].Pulsate(Vector2.One, Vector2.One * (1.0f + pulsateAmount), duration);
}
}
}
partial void UpdateLabelsProjSpecific()
{
for (int i = 0; i < labels.Length && i < uiElements.Count; i++)