Removed Control.Update, moved all update code to Control.FrameUpdate. UI controls have no business running code inside simulation Ticks. Because of how the update loop is ordered, this will actually make the UI elements more responsive to simulation changes.

Fixed multiple bugs in the action UI where the Control.Update method was calling the base Control.FrameUpdate.
This commit is contained in:
Acruid
2021-03-26 17:10:31 -07:00
parent f17ead47c1
commit 3e7e44df29
13 changed files with 41 additions and 38 deletions

View File

@@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using Content.Client.UserInterface.Stylesheets;
using Content.Client.Utility;
@@ -65,9 +65,9 @@ namespace Content.Client.GameObjects.Components
parent._uiUpdateNeeded = true;
}
protected override void Update(FrameEventArgs args)
protected override void FrameUpdate(FrameEventArgs args)
{
base.Update(args);
base.FrameUpdate(args);
if (!_parent._uiUpdateNeeded)
{