UI Layout v2. (#489)

* UI Layout v2.

* Lobby fixed.
This commit is contained in:
Pieter-Jan Briers
2019-12-05 16:00:03 +01:00
committed by GitHub
parent 4cf8e18d1f
commit 26da24c3c5
37 changed files with 220 additions and 229 deletions

View File

@@ -59,7 +59,7 @@ namespace Content.Client
{
var label = new PopupLabel {Text = message};
var minimumSize = label.CombinedMinimumSize;
label.InitialPos = label.Position = coordinates.Position - minimumSize / 2;
LayoutContainer.SetPosition(label, label.InitialPos = coordinates.Position - minimumSize / 2);
_userInterfaceManager.PopupRoot.AddChild(label);
_aliveLabels.Add(label);
}
@@ -94,7 +94,7 @@ namespace Content.Client
public void Update(FrameEventArgs eventArgs)
{
_timeLeft += eventArgs.DeltaSeconds;
Position = InitialPos - new Vector2(0, 20 * (_timeLeft * _timeLeft + _timeLeft));
LayoutContainer.SetPosition(this, InitialPos - (0, 20 * (_timeLeft * _timeLeft + _timeLeft)));
if (_timeLeft > 0.5f)
{
Modulate = Color.White.WithAlpha(1f - 0.2f * (float)Math.Pow(_timeLeft - 0.5f, 3f));